@model BuildFeed.Models.Build @{ ViewBag.Title = (string)(ViewContext.RouteData.Values["action"]) == "addBuild" ? "Add a Build | BuildFeed" : string.Format("Edit build {0} | BuildFeed", Model.FullBuildString); Html.EnableClientValidation(); Html.EnableUnobtrusiveJavaScript(); } @if ((string)(ViewContext.RouteData.Values["action"]) == "addBuild") {

Add a Build

} else {

Edit build @Model.FullBuildString

}
@using (Html.BeginForm()) { @Html.AntiForgeryToken()
@Html.ValidationSummary(true)
@Html.LabelFor(model => model.MajorVersion, new { @class = "control-label col-sm-2" })
@Html.TextBoxFor(model => model.MajorVersion, new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.MajorVersion)
@Html.LabelFor(model => model.MinorVersion, new { @class = "control-label col-sm-2" })
@Html.TextBoxFor(model => model.MinorVersion, new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.MinorVersion)
@Html.LabelFor(model => model.Number, new { @class = "control-label col-sm-2" })
@Html.TextBoxFor(model => model.Number, new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.Number)
@Html.LabelFor(model => model.Revision, new { @class = "control-label col-sm-2" })
@Html.TextBoxFor(model => model.Revision, new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.Revision)
@Html.LabelFor(model => model.Lab, new { @class = "control-label col-sm-2" })
@Html.TextBoxFor(model => model.Lab, new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.Lab)
@Html.LabelFor(model => model.BuildTime, new { @class = "control-label col-sm-2" })
@Html.TextBoxFor(model => model.BuildTime, "{0:yyMMdd-HHmm}", new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.BuildTime)
@Html.LabelFor(model => model.SourceType, new { @class = "control-label col-sm-2" })
@Html.DropDownListFor(model => model.SourceType, EnumHelper.GetSelectList(typeof(BuildFeed.Models.TypeOfSource)), new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.SourceType)
@Html.LabelFor(model => model.LeakDate, new { @class = "control-label col-sm-2" })
@Html.TextBoxFor(model => model.LeakDate, "{0:dd/MM/yyyy}", new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.LeakDate)
@Html.LabelFor(model => model.SourceDetails, new { @class = "control-label col-sm-2" })
@Html.TextAreaFor(model => model.SourceDetails, new { @class = "form-control", rows = "5" })
@Html.ValidationMessageFor(model => model.SourceDetails)
@Html.LabelFor(model => model.FlightLevel, new { @class = "control-label col-sm-2" })
@Html.DropDownListFor(model => model.FlightLevel, EnumHelper.GetSelectList(typeof(BuildFeed.Models.LevelOfFlight)), new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.FlightLevel)
} @section Scripts { @Scripts.Render("~/bundles/jqueryval") }