@model IEnumerable @{ ViewBag.Title = "patientList"; Layout = "~/Views/Shared/_LayoutPat.cshtml"; } <p> @Html.ActionLink("Create New", "Create") </p> <table> <tr style="width:200px;"> <th> First Name </th> <th> Last Name </th> <th> Insurance </th> <th> Plan name </th> <th> Sickness Detail </th> <th> Email </th> <th> Phone </th> <th> Address </th> <th> Photo </th> <th> City </th> <th> State </th> <th> Country </th> <th> Zip </th> @* <th> @Html.DisplayNameFor(model => model.username) </th> <th> @Html.DisplayNameFor(model => model.password) </th>*@ @* <th></th>*@ </tr> @foreach (var item in Model) { <tr> <td> @Html.DisplayFor(modelItem => item.Firstname) </td> <td> @Html.DisplayFor(modelItem => item.Lastname) </td> <td> @item.insurance </td> <td> @Html.DisplayFor(modelItem => item.planname) </td> <td> @Html.DisplayFor(modelItem => item.sicknessdetails) </td> <td> @Html.DisplayFor(modelItem => item.email) </td> <td> @Html.DisplayFor(modelItem => item.telephone) </td> <td> @Html.DisplayFor(modelItem => item.address) </td> <td> @Html.DisplayFor(modelItem => item.photo) </td> <td> @Html.DisplayFor(modelItem => item.city) </td> <td> @Html.DisplayFor(modelItem => item.state) </td> <td> @Html.DisplayFor(modelItem => item.country) </td> <td> @Html.DisplayFor(modelItem => item.Zip) </td> <td> @Html.ActionLink("Edit", "editpatient", new { id=item.PID }) | @Html.ActionLink("Details", "detailpatient", new { id=item.PID }) | @Html.ActionLink("Delete","delemp", new { id=item.PID }) </td> </tr> } </table>
@if (@item.insurance) { //Assign item.insurance with Yes <span>Yes</span> } else { //Assign item.insurance with No <span>No</span> }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)