This is my Contract Month Controller: <pre> public ActionResult Index(int id) { var contractMonth = _context.ContractMonth.Where(c => c.ContractsId == id).Include(s => s.contracts).Include(d => d.dailyTransactions).ToList(); return View(contractMonth); }
<table class="table table-bordered f" cellspacing="0" id="employeetable"> <thead> <tr> <th>@Html.DisplayNameFor(model => model.ContractsId)</th> <th>@Html.DisplayNameFor(model => model.Monthe)</th> <th>@Html.DisplayNameFor(model => model.Amount)</th> <th>@Html.DisplayNameFor(model => model.Receipt)</th> </tr> </thead> <tbody> @foreach (var item in Model) { <tr> <td> @Html.DisplayFor(modelItem => item.contracts.Contract_Num) </td> <td> @Html.DisplayFor(modelItem => item.dailyTransactions.Date) </td> <td> @Html.DisplayFor(modelItem => item.contracts.AmountOfRent) </td> </tr> } </tbody> </table>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)