コード例 #1
0
 public CustomerManager(Database.DTO.Doctor _Doctor)
 {
     InitializeComponent();
     Doctor         = _Doctor;
     lbDoctor.Text += Doctor.Name;
     _customerBLL   = new Database.BLL.CustomerBLL();
 }
コード例 #2
0
 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();
 }
コード例 #3
0
 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;
 }