@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Index</title>
</head>
<body>
@using (Html.BeginForm())
{
<div>
Emp Name @Html.TextBox("Name",Model.Name) <br/><br/>
Address @Html.TextBox("Address",Model.Address) <br/><br/>
Contact @Html.TextBox("Contact",Model.Contact) <br/><br/>
@{
for (int i = 0; i < @ViewBag.totalDays; i++)
{
<span>@Html.DisplayFor(m => m.DeptList[i].OneDay, new { disabled = "disabled" })</span>
<span>@Html.EditorFor(m => m.DeptList[i].AttendThisDay)</span>
ViewBag.i = Model.DeptList[i].OneDay;
}
}
<div>
<input type="submit" value="Submit" /> <br /><br />
</div>
@{
if (Model.Name != null)
{
<div>
Employee Name : @Model.Name <br/>
Address : @Model.Address <br/>
Contact : @Model.Contact <br/>
@{
if (Model.DeptList != null)
{
<table>
<tr>
<th>Dept code</th>
<th>Dept Name</th>
</tr>
@{
foreach (var dept in Model.DeptList)
{
<tr>
<td>@dept.OneDay</td>
<td>@dept.AttendThisDay </td>
</tr>
}
}
</table>
}
}
</div>
}
}
</div>
}
</body>
</html>
No comments:
Post a Comment