public ActionResult TopWidget() { try { ViewBag.NumberDoctor = _doctorBusiness.GetAll().Count(); ViewBag.NumberPatient = _patientBusiness.GetAll().Count(); ViewBag.NumberAppointment = _appoinmentBusiness.GetAll().Count(); ViewBag.Revenue = _appoinmentBusiness.GetAll().Sum(x => x.Amount); return(PartialView()); } catch (Exception) { return(PartialView()); } }
// GET: Patient public ActionResult List() { try { var result = _patientBusiness.GetAll(); return(View(result)); } catch (Exception) { return(View()); } }
public Task <IPaginatedList <PatientDto> > Get(string code, string value, int pageIndex = Constant.PAGE_INDEX_DEFAULT, int pageSize = Constant.PAGE_SIZE_DEFAULT) { var filter = new PatientFilter { PageIndex = pageIndex, PageSize = pageSize, Code = string.Equals("Code", code, StringComparison.OrdinalIgnoreCase) ? value : string.Empty, Name = string.Equals("Name", code, StringComparison.OrdinalIgnoreCase) ? value : string.Empty, Phone = string.Equals("Phone", code, StringComparison.OrdinalIgnoreCase) ? value : string.Empty, IdentifyCardNo = string.Equals("IdentifyCardNo", code, StringComparison.OrdinalIgnoreCase) ? value : string.Empty, }; return(_patientBusiness.GetAll(filter)); }
public ActionResult <List <PatientModel> > Get([FromQuery] int[] ids) { try { if (ids.Length == 0) { return(_business.GetAll()); } else { return(_business.Get(ids)); } } catch (Exception ex) { _logging.Log(LogSeverity.Error, ex.ToString()); throw; } }