public CustomerManager(Database.DTO.Doctor _Doctor) { InitializeComponent(); Doctor = _Doctor; lbDoctor.Text += Doctor.Name; _customerBLL = new Database.BLL.CustomerBLL(); }
public PrescriptionLog(Database.DTO.Doctor _doctor, Database.DTO.Customer _customer) { InitializeComponent(); _prescriptionBLL = new PrescriptionBLL(); customer = _customer; doctor = _doctor; lbName.Text += customer.Name; lbAddress.Text += customer.Address; lbGender.Text += customer.Gender == 0 ? "Nam" : "Nữ"; lbTel.Text += customer.Phone; lbAge.Text += customer.BirthDate; LoadData(); }
public PrescriptionLogDetail(int id) { InitializeComponent(); _prescriptionBLL = new Database.BLL.PrescriptionBLL(); _drugBLL = new Database.BLL.DrugBLL(); _doctorBLL = new Database.BLL.DoctorBLL(); this.prescription = _prescriptionBLL.GetPrescription(id); foreach (var item in prescription.Details) { var drug = _drugBLL.GetById(item.DrugId); item.DrugName = drug.Name; amount += drug.UnitPrice * item.Quantity; } lbAmount.Text += amount + " $"; doctor = _doctorBLL.GetDoctocById(prescription.DoctorId); lbdoctor.Text += " " + doctor.Name; }