Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class CarListViewModel
- {
- public List<Car> cars{ get; set; }
- public int selectedCar { get; set; }
- public List<Material> materials { get; set; }
- // (...)
- }
- public class Material
- {
- public string name { get; set; }
- public string lot { get; set; }
- public int quantity { get; set; }
- }
- @model CarListViewModel
- @{
- ViewData["Title"] = "Registar material";
- }
- <div class="material-registration-wrapper">
- <h2 class="title">Registo materiais - Carro</h2>
- @using (Html.BeginForm("MaterialDummy", "Material", FormMethod.Post, new { id = "materialRegistrationForm" }))
- {
- <table class="material-registration-insertion">
- <tr>
- <th>Material</th>
- <th>Lote</th>
- <th>Quantidade</th>
- </tr>
- <tr>
- @{List<Material> mList = new List<Material>();}
- @{Material m1 = new Material();}
- <td>@Html.TextBoxFor(model => m1.name, null, new { type = "text" })</td>
- <td>@Html.TextBoxFor(model => m1.lot, null, new { type = "text" })</td>
- <td>@Html.TextBoxFor(model => m1.quantity, null, new { type = "text" })</td>
- </tr>
- @{ mList.Add(m1); }
- @Html.HiddenFor(model => mList, Model.materials)
- </table>
- <table class="submit-table">
- <tr>
- <td>
- <div class="submit-table">
- <input type="submit" value="Submeter" class="submit-button" />-->
- </div>
- </td>
- </tr>
- </table>
- }
- </div>
Add Comment
Please, Sign In to add comment