Compare commits
No commits in common. "71ab5700ce0b0b43230bba2cdc6047c876ecf1a9" and "ae713d790f6cf3e021686b13db9b45902c1cf8e3" have entirely different histories.
71ab5700ce
...
ae713d790f
@ -29,7 +29,7 @@ namespace VeterinaryDatabaseImplement.Implements
|
||||
{
|
||||
|
||||
using var context = new VeterinaryDatabase();
|
||||
return context.Services.Where(x => x.DoctorId == model.DoctorId).Include(x => x.Doctor).Include(x => x.Visit).Include(x => x.Medications)
|
||||
return context.Services.Include(x => x.Doctor).Include(x => x.Visit).Include(x => x.Medications)
|
||||
.ThenInclude(x => x.Medication)
|
||||
.Where(x => String.IsNullOrEmpty(model.ServiceName) || x.ServiceName.Contains(model.ServiceName))
|
||||
.ToList()
|
||||
|
@ -345,12 +345,12 @@ namespace VeterinaryShowDoctorApp.Controllers
|
||||
return Redirect("~/Home/Enter");
|
||||
}
|
||||
ViewBag.Medications = APIDoctor.GetRequest<List<MedicationViewModel>>($"api/medication/getmedications?doctorid={APIDoctor.Doctor.Id}");
|
||||
ViewBag.Visits = APIDoctor.GetRequest<List<VisitViewModel>>($"api/visit/getallvisits");
|
||||
//ViewBag.Visits = APIDoctor.GetRequest<List<VisitViewModel>>($"api/visit/getallvisits");
|
||||
|
||||
return View();
|
||||
}
|
||||
[HttpPost]
|
||||
public void CreateService(string name, List<int> medications, int visit)
|
||||
public void CreateService(string name, List<int> medications)
|
||||
{
|
||||
if (APIDoctor.Doctor == null)
|
||||
{
|
||||
@ -370,7 +370,6 @@ namespace VeterinaryShowDoctorApp.Controllers
|
||||
{
|
||||
ServiceName = name,
|
||||
ServiceMedications = a,
|
||||
VisitId = visit,
|
||||
DoctorId = APIDoctor.Doctor.Id
|
||||
});
|
||||
Response.Redirect("Services");
|
||||
|
@ -12,12 +12,6 @@
|
||||
<input type="text" name="name" id="name" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Визиты:</div>
|
||||
<div class="col-8">
|
||||
<select id="visit" name="visit" class="form-control" asp-items="@(new SelectList(@ViewBag.Visits, "Id", "VisitName"))"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Медикаменты:</div>
|
||||
<div class="col-8">
|
||||
|
Loading…
Reference in New Issue
Block a user