public bool CreateBill(BillDTO bill) { return(_billRepository.CreateBill(new BillRecord { Amount = bill.OriginalAmount, DueDate = bill.DueDate, PaymentDate = bill.PaymentDate, Name = bill.Name })); }
public bool CreateBill(HoaDon billToCreate) { if (!ValidateBill(billToCreate)) { return(false); } try { _billrepository.CreateBill(billToCreate); } catch { return(false); } return(true); }
public void CreateBillIfNotExists() { if (_view.Functionality == ReceptionFunctionalityEnum.Patient) { var bill = _billRepository.GetUnpaidBillByPatientId(_view.PatientIdSelected); if (bill is null) { bill = new bill() { created_at = DateTime.Now, is_paid = false, patient_id = _view.PatientIdSelected, total_money = 0, staff_created = Program.staffId }; _billRepository.CreateBill(bill); } } }