-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ebb421c
commit 1cf16b6
Showing
4 changed files
with
224 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
@model List<Appointment> | ||
|
||
<div class="row"> | ||
<div class="col-md-8 offset-2"> | ||
<div class="row"> | ||
<div class="col-md-8 offset-2"> | ||
@foreach (var item in Model) | ||
{ | ||
<form asp-action="Edit" method="post"> | ||
<div asp-validation-summary="ModelOnly" class="text-danger"></div> | ||
|
||
<div class="form-group"> | ||
<label class="control-label">First Name</label> | ||
<input asp-for=@item.PatientFName type="text" class="form-control" readonly /> | ||
</div> | ||
<div class="form-group"> | ||
<label class="control-label">Last Name</label> | ||
<input asp-for=@item.PatientLName type="text" class="form-control" readonly /> | ||
</div> | ||
<div class="form-group"> | ||
<label class="control-label">Age</label> | ||
<input asp-for=@item.Age type="text" class="form-control" readonly /> | ||
</div> | ||
<div class="form-group"> | ||
<label class="control-label">Phone</label> | ||
<input asp-for=@item.Phone type="text" class="form-control" readonly /> | ||
</div> | ||
<div class="form-group"> | ||
<label class="control-label">Disease</label> | ||
<input asp-for=@item.Disease type="text" class="form-control" readonly /> | ||
</div> | ||
<div class="form-group"> | ||
<label asp-for="@item.DoctorId" class="control-label">Doctor</label> | ||
@Html.DropDownListFor(x => @item.DoctorId, (List<SelectListItem>)ViewData["Doctors"], "Select", new { @class = "form-control", @disabled = "disabled" })<br /> | ||
</div> | ||
<div class="form-group"> | ||
<label class="control-label">Date & Time</label> | ||
<input asp-for=@item.DateAndTime type="date" class="form-control" readonly /> | ||
</div> | ||
<div class="form-group"> | ||
<a class="alert-primary" href="/Appointment/Edit/@item.Id">Edit</a> <a class="alert-danger" href="/Appointment/Delete/@item.Id">Delete</a> | ||
</div> | ||
<div class="form-group"> | ||
<a class="btn btn-outline-secondary" asp-controller="Appointment" asp-action="Index">Back</a> | ||
</div> | ||
</form> | ||
} | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
@model Appointment | ||
|
||
<h2>Create Appointment</h2> | ||
|
||
<div class="row"> | ||
<div class="col-md-8 offset-2"> | ||
<div class="row"> | ||
<div class="col-md-8 offset-2"> | ||
<div class="form-group"> | ||
<a class="btn btn-outline-secondary" asp-controller="Appointment" asp-action="Appointments">Appointments</a> | ||
</div> | ||
<p class="alert-primary">Doctor, @ViewData["DoctorInfo"] Number of Patients: @ViewData["patientCount"]</p> | ||
<form asp-action="Create" method="post"> | ||
<div asp-validation-summary="ModelOnly" class="text-danger"></div> | ||
|
||
<div class="form-group"> | ||
<label asp-for="PatientFName" class="control-label">First Name</label> | ||
<input asp-for="PatientFName" type="text" class="form-control" /> | ||
<span asp-validation-for="PatientFName" class="text-danger"></span> | ||
</div> | ||
<div class="form-group"> | ||
<label asp-for="PatientLName" class="control-label">Last Name</label> | ||
<input asp-for="PatientLName" type="text" class="form-control" /> | ||
<span asp-validation-for="PatientLName" class="text-danger"></span> | ||
</div> | ||
<div class="form-group"> | ||
<label asp-for="Age" class="control-label">Age</label> | ||
<input asp-for="Age" type="text" class="form-control" /> | ||
<span asp-validation-for="Age" class="text-danger"></span> | ||
</div> | ||
<div class="form-group"> | ||
<label asp-for="Phone" class="control-label">Phone</label> | ||
<input asp-for="Phone" type="text" class="form-control" /> | ||
<span asp-validation-for="Phone" class="text-danger"></span> | ||
</div> | ||
<div class="form-group"> | ||
<label asp-for="Disease" class="control-label">Disease</label> | ||
<input asp-for="Disease" type="text" class="form-control" /> | ||
<span asp-validation-for="Disease" class="text-danger"></span> | ||
</div> | ||
<div class="form-group"> | ||
<label asp-for="DateAndTime" class="control-label">Date & Time</label> | ||
<input asp-for="DateAndTime" type="date" class="form-control" /> | ||
<span asp-validation-for="DateAndTime" class="text-danger"></span> | ||
</div> | ||
<div class="form-group"> | ||
<label asp-for="DoctorId" class="control-label">Doctor</label> | ||
@Html.DropDownListFor(x => x.DoctorId, (List<SelectListItem>)ViewData["Doctor"], "Select", new { @class = "form-control" })<br /> | ||
<span asp-validation-for="DoctorId" class="text-danger"></span> | ||
</div> | ||
<div class="form-group"> | ||
<input class="btn btn-outline-success float-right" type="submit" value="Create" /> | ||
<a class="btn btn-outline-secondary" asp-controller="Appointment" asp-action="Index">Back</a> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
@model Appointment | ||
|
||
<h2>Edit Appointment</h2> | ||
|
||
<div class="row"> | ||
<div class="col-md-8 offset-2"> | ||
<div class="row"> | ||
<div class="col-md-8 offset-2"> | ||
|
||
<form asp-action="Edit" method="post"> | ||
<div asp-validation-summary="ModelOnly" class="text-danger"></div> | ||
|
||
<div class="form-group"> | ||
<label asp-for="PatientFName" class="control-label">First Name</label> | ||
<input asp-for="PatientFName" type="text" class="form-control" /> | ||
<span asp-validation-for="PatientFName" class="text-danger"></span> | ||
</div> | ||
<div class="form-group"> | ||
<label asp-for="PatientLName" class="control-label">Last Name</label> | ||
<input asp-for="PatientLName" type="text" class="form-control" /> | ||
<span asp-validation-for="PatientLName" class="text-danger"></span> | ||
</div> | ||
<div class="form-group"> | ||
<label asp-for="Age" class="control-label">Age</label> | ||
<input asp-for="Age" type="text" class="form-control" /> | ||
<span asp-validation-for="Age" class="text-danger"></span> | ||
</div> | ||
<div class="form-group"> | ||
<label asp-for="Phone" class="control-label">Phone</label> | ||
<input asp-for="Phone" type="text" class="form-control" /> | ||
<span asp-validation-for="Phone" class="text-danger"></span> | ||
</div> | ||
<div class="form-group"> | ||
<label asp-for="Disease" class="control-label">Disease</label> | ||
<input asp-for="Disease" type="text" class="form-control" /> | ||
<span asp-validation-for="Disease" class="text-danger"></span> | ||
</div> | ||
<div class="form-group"> | ||
<label asp-for="DateAndTime" class="control-label">Date & Time</label> | ||
<input asp-for="DateAndTime" type="date" class="form-control" /> | ||
<span asp-validation-for="DateAndTime" class="text-danger"></span> | ||
</div> | ||
<div class="form-group"> | ||
<label asp-for="DoctorId" class="control-label">Doctor</label> | ||
@Html.DropDownListFor(x => x.DoctorId, (List<SelectListItem>)ViewData["Doctor"], "Select", new { @class = "form-control" })<br /> | ||
<span asp-validation-for="DoctorId" class="text-danger"></span> | ||
</div> | ||
<div class="form-group"> | ||
<div class="col-md-10"> | ||
<input type="submit" class="alert-success" value="Submit" /> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
@model List<Doctor> | ||
|
||
<div class="row"> | ||
<div class="col-md-8 offset-2"> | ||
@if (User.IsInRole("Admin")) | ||
{ | ||
<div class="form-group"> | ||
<a class="btn btn-outline-secondary" asp-controller="Doctors" asp-action="Create">Add Doctor</a> | ||
</div> | ||
} | ||
else | ||
{ | ||
<div class="form-group"> | ||
<a class="btn btn-outline-secondary" asp-controller="Appointment" asp-action="Appointments">My Appointments</a> | ||
</div> | ||
} | ||
|
||
<div class="row"> | ||
<div class="col-md-8 offset-2"> | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th>First Name</th> | ||
<th>Last Name</th> | ||
<th>Age</th> | ||
<th>Position</th> | ||
<th>Experience</th> | ||
@if (!User.IsInRole("Admin")) | ||
{ | ||
<th></th> | ||
} | ||
</tr> | ||
</thead> | ||
<tbody> | ||
@foreach (var Model in Model) | ||
{ | ||
<tr> | ||
<td>@Model.FName</td> | ||
<td>@Model.LName</td> | ||
<td>@Model.Age</td> | ||
<td>@Model.Position</td> | ||
<td>@Model.Experience il</td> | ||
|
||
@if (!User.IsInRole("Admin")) | ||
{ | ||
<td> | ||
<a class="alert-primary" href="/Appointment/Create/@Model.Id">Book</a> | ||
</td> | ||
} | ||
</tr> | ||
} | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |