Advertisement
Guest User

View

a guest
May 22nd, 2018
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 8.95 KB | None | 0 0
  1. @model MaterialSolutions.Models.ViewModels.ForkliftViewModel
  2.  
  3.  
  4. @{
  5.     ViewBag.Title = "Edit";
  6. }
  7.  
  8. <br />
  9.  
  10. @*<h2>Edit</h2>*@
  11.  
  12.  
  13. @using (Html.BeginForm())
  14. {
  15.     @Html.AntiForgeryToken()
  16.  
  17.     <div class="form-horizontal">
  18.  
  19.         <br />
  20.  
  21.         <h3>Attributes/Properties</h3>
  22.         <hr />
  23.         @Html.ValidationSummary(true, "", new { @class = "text-danger" })
  24.         @Html.HiddenFor(model => model.Forklift.ForkliftID)
  25.  
  26.         <div class="row">
  27.             <div class="col-md-4">
  28.                 <div class="form-group">
  29.                     @Html.LabelFor(model => model.Forklift.SerialNumber, htmlAttributes: new { @class = "control-label col-md-2" })
  30.                     <div class="col-md-12">
  31.                         @Html.EditorFor(model => model.Forklift.SerialNumber, new { htmlAttributes = new { @class = "form-control" } })
  32.                         @Html.ValidationMessageFor(model => model.Forklift.SerialNumber, "", new { @class = "text-danger" })
  33.                     </div>
  34.                 </div>
  35.             </div>
  36.             <div class="col-md-4">
  37.                 <div class="form-group">
  38.                     @Html.LabelFor(model => model.Forklift.ModelNumber, htmlAttributes: new { @class = "control-label col-md-2" })
  39.                     <div class="col-md-12">
  40.                         @Html.EditorFor(model => model.Forklift.ModelNumber, new { htmlAttributes = new { @class = "form-control" } })
  41.                         @Html.ValidationMessageFor(model => model.Forklift.ModelNumber, "", new { @class = "text-danger" })
  42.                     </div>
  43.                 </div>
  44.             </div>
  45.             <div class="col-md-4">
  46.                 <div class="form-group">
  47.                     @Html.LabelFor(model => model.Forklift.Manufacturer, htmlAttributes: new { @class = "control-label col-md-2" })
  48.                     <div class="col-md-12">
  49.                         @{
  50.                             List<SelectListItem> test = new List<SelectListItem>();
  51.  
  52.                             test.Add(new SelectListItem
  53.                             {
  54.                                 Text = "Test",
  55.                                 Value = "1"
  56.                             });
  57.                         }
  58.                         @Html.DropDownListFor(model => model.Forklift.ManufacturerID, Model.ManufacturerDropdownList, "-- Select Location --", new { @class = "form-control" })
  59.                         @Html.ValidationMessageFor(model => model.Forklift.ManufacturerID, "", new { @class = "text-danger" })
  60.                     </div>
  61.                 </div>
  62.             </div>
  63.         </div>
  64.  
  65.         <div class="row">
  66.             <div class="col-md-4">
  67.                 <div class="form-group">
  68.                     @Html.LabelFor(model => model.Forklift.Power, htmlAttributes: new { @class = "control-label col-md-2" })
  69.                     <div class="col-md-12">
  70.                         @Html.EnumDropDownListFor(model => model.Forklift.Power, "-- Select Power --", new { @class = "form-control" })
  71.                         @Html.ValidationMessageFor(model => model.Forklift.Power, "", new { @class = "text-danger" })
  72.                     </div>
  73.                 </div>
  74.             </div>
  75.             <div class="col-md-4">
  76.                 <div class="form-group">
  77.                     @Html.LabelFor(model => model.Forklift.Capacity, htmlAttributes: new { @class = "control-label col-md-2" })
  78.                     <div class="col-md-12">
  79.                         @Html.EditorFor(model => model.Forklift.Capacity, new { htmlAttributes = new { @class = "form-control" } })
  80.                         @Html.ValidationMessageFor(model => model.Forklift.Capacity, "", new { @class = "text-danger" })
  81.                     </div>
  82.                 </div>
  83.             </div>
  84.             <div class="col-md-4">
  85.                 <div class="form-group">
  86.                     @Html.LabelFor(model => model.Forklift.Year, htmlAttributes: new { @class = "control-label col-md-2" })
  87.                     <div class="col-md-12">
  88.                         @Html.EditorFor(model => model.Forklift.Year, new { htmlAttributes = new { @class = "form-control" } })
  89.                         @Html.ValidationMessageFor(model => model.Forklift.Year, "", new { @class = "text-danger" })
  90.                     </div>
  91.                 </div>
  92.             </div>
  93.         </div>
  94.  
  95.         <div class="row">
  96.             <div class="col-md-4">
  97.                 <div class="form-group">
  98.                     @Html.LabelFor(model => model.Forklift.LoweredHeight, htmlAttributes: new { @class = "control-label col-md-2" })
  99.                     <div class="col-md-12">
  100.                         @Html.EditorFor(model => model.Forklift.LoweredHeight, new { htmlAttributes = new { @class = "form-control" } })
  101.                         @Html.ValidationMessageFor(model => model.Forklift.LoweredHeight, "", new { @class = "text-danger" })
  102.                     </div>
  103.                 </div>
  104.             </div>
  105.             <div class="col-md-4">
  106.                 <div class="form-group">
  107.                     @Html.LabelFor(model => model.Forklift.RaisedHeight, htmlAttributes: new { @class = "control-label col-md-2" })
  108.                     <div class="col-md-12">
  109.                         @Html.EditorFor(model => model.Forklift.RaisedHeight, new { htmlAttributes = new { @class = "form-control" } })
  110.                         @Html.ValidationMessageFor(model => model.Forklift.RaisedHeight, "", new { @class = "text-danger" })
  111.                     </div>
  112.                 </div>
  113.             </div>
  114.             <div class="col-md-4">
  115.                 <div class="form-group">
  116.                     @Html.LabelFor(model => model.Forklift.Location, htmlAttributes: new { @class = "control-label col-md-2" })
  117.                     <div class="col-md-12">
  118.                         @Html.DropDownListFor(model => model.Forklift.LocationID, Model.LocationDropdownList, "-- Select Location --", new { @class = "form-control" })
  119.                         @Html.ValidationMessageFor(model => model.Forklift.LocationID, "", new { @class = "text-danger" })
  120.                     </div>
  121.                 </div>
  122.             </div>
  123.         </div>
  124.  
  125.         <div class="row">
  126.             <div class="col-md-12">
  127.                 <div class="form-group">
  128.                     @Html.LabelFor(model => model.Forklift.Comments, htmlAttributes: new { @class = "control-label col-md-2" })
  129.                     <div class="col-md-12">
  130.                         @Html.TextAreaFor(model => model.Forklift.Comments, 5, 20, new { @class = "form-control" })
  131.                         @Html.ValidationMessageFor(model => model.Forklift.Comments, "", new { @class = "text-danger" })
  132.                     </div>
  133.                 </div>
  134.             </div>
  135.         </div>
  136.  
  137.         <br />
  138.  
  139.         <h3>Pricing Information</h3>
  140.         <hr />
  141.  
  142.         <div class="row">
  143.             <div class="col-md-4">
  144.                 <div class="form-group">
  145.                     @Html.LabelFor(model => model.Forklift.PurchasedPrice, htmlAttributes: new { @class = "control-label col-md-2" })
  146.                     <div class="col-md-12">
  147.                         @Html.EditorFor(model => model.Forklift.PurchasedPrice, new { htmlAttributes = new { @class = "form-control" } })
  148.                         @Html.ValidationMessageFor(model => model.Forklift.PurchasedPrice, "", new { @class = "text-danger" })
  149.                     </div>
  150.                 </div>
  151.             </div>
  152.             <div class="col-md-4">
  153.                 <div class="form-group">
  154.                     @Html.LabelFor(model => model.Forklift.WholesalePrice, htmlAttributes: new { @class = "control-label col-md-2" })
  155.                     <div class="col-md-12">
  156.                         @Html.EditorFor(model => model.Forklift.WholesalePrice, new { htmlAttributes = new { @class = "form-control" } })
  157.                         @Html.ValidationMessageFor(model => model.Forklift.WholesalePrice, "", new { @class = "text-danger" })
  158.                     </div>
  159.                 </div>
  160.             </div>
  161.             <div class="col-md-4">
  162.                 <div class="form-group">
  163.                     @Html.LabelFor(model => model.Forklift.RetailPrice, htmlAttributes: new { @class = "control-label col-md-2" })
  164.                     <div class="col-md-12">
  165.                         @Html.EditorFor(model => model.Forklift.RetailPrice, new { htmlAttributes = new { @class = "form-control" } })
  166.                         @Html.ValidationMessageFor(model => model.Forklift.RetailPrice, "", new { @class = "text-danger" })
  167.                     </div>
  168.                 </div>
  169.             </div>
  170.         </div>
  171.  
  172.         <br />
  173.  
  174.         <div class="form-group">
  175.             <div class="col-md-offset-2 col-md-10">
  176.                 <input type="submit" value="Save" class="btn btn-primary" />
  177.             </div>
  178.         </div>
  179.     </div>
  180. }
  181.  
  182. <br />
  183.  
  184. <div>
  185.     @Html.ActionLink("Back to List", "Index")
  186. </div>
  187.  
  188. @section Scripts {
  189.     @Scripts.Render("~/bundles/jqueryval")
  190. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement