Пример #1
0
        public IActionResult Bill(string p, string date, BillingBillViewModel model)
        {
            model.Patient = IPatientService.GetPatient(p);
            if (model.Patient == null)
            {
                return(LocalRedirect("/billing/cashier?error=1043"));
            }

            try {
                model.Date = DateTime.ParseExact(date, "dd/MM/yyyy", CultureInfo.InvariantCulture);
            }
            catch (Exception) {
                return(LocalRedirect("/billing/cashier?error=4509"));
            }

            model.Invoices    = IFinanceService.GetInvoices(model.Patient);
            model.Pending     = IFinanceService.GetBills(model.Patient, null, null, null, new BillingFlag());
            model.Departments = IFinanceService.GetBillsDepartments(model.Patient, new BillingFlag());
            return(View(model));
        }
Пример #2
0
 public List <Bills> GetBills()
 {
     return(IFinanceService.GetBills(this));
 }