Пример #1
0
 //
 // GET: /Policlinic/
 public ActionResult Index(int policlinicId)
 {
     ViewBag.PoliclinicId = policlinicId;
     var repository = new Repository();
     ViewBag.Policlinic = repository.GetPoliclinicById(policlinicId);
     return View();
 }
Пример #2
0
 public int ValidateHomeOrder(Patient patient, string date, int policlinicId)
 {
     var repository = new Repository();
     var result = repository.IsPatientExists(patient);
     if (result == -1)
     {
         return -1;
     }
     return repository.AddHomeVisitHistory(new HomeVisitHistory()
     {
         Date = DateTime.Parse(date),
         Policlinic = repository.GetPoliclinicById(policlinicId),
         Patient = patient
     });
 }