/// <summary> /// constructor for the first dept receipt /// </summary> /// <param name="receipt"></param> public PhieuThuTienNo_Form(PHIEUBANHANG receipt) { InitializeComponent(); this.bulKhachHang = new BUL_KhachHang(); this.bulDeptReceipt = new BUL_PhieuThuTienNo(); this.bulBangThamSo = new BUL_BangThamSo(); this.receipt = receipt; // set defaul value for date time picker : system current date this.dateTimePickerNgayLap.DateTime = DateTime.Now.Date; this.dateTimePickerNgayLap.ReadOnly = true; this.dateTimePickerNgayTra.DateTime = DateTime.Now.Date; this.previousDeptRecepit = null; // indicate that, this is the first dept this.isTheFirstDept = true; // this is the first decpt receipt this.textEditMaPhieuBanHang.Text = receipt.SoPhieuBH.ToString(); this.textEditTenKhachHang.Text = this.bulKhachHang.GetKhachhangById(receipt.MaKH).TenKH; this.textEditMaKhachHang.Text = receipt.MaKH.ToString(); // the first dept this.textEditSoTienNo.Text = receipt.TongTien.ToString(); this.labelControlRecommendedInput.Visible = true; decimal ACCEPTABLE_FIRST_PREPAID_PERCENTAGE = Convert.ToDecimal(this.bulBangThamSo.getValueByArgument("TienTraToiThieu")); decimal minimumAmout = decimal.Multiply(ACCEPTABLE_FIRST_PREPAID_PERCENTAGE, receipt.TongTien); this.labelControlRecommendedInput.Text = "(Tối thiểu: " + Math.Round(minimumAmout) + ")"; }
public PhieuThuTienNo_Form(PHIEUTHUTIENNO previousDeptReceipt) { InitializeComponent(); this.bulKhachHang = new BUL_KhachHang(); this.bulDeptReceipt = new BUL_PhieuThuTienNo(); this.previousDeptRecepit = previousDeptReceipt; // indicate that, this is NOT the first dept this.isTheFirstDept = false; // this is the first decpt receipt this.textEditMaPhieuBanHang.Text = this.previousDeptRecepit.SoPhieuBH.ToString(); this.receipt = new BUL_PhieuBanHang().findReceiptById(this.previousDeptRecepit.SoPhieuBH); this.textEditTenKhachHang.Text = this.bulKhachHang.GetKhachhangById(this.receipt.MaKH).TenKH; this.textEditMaKhachHang.Text = this.receipt.MaKH.ToString(); // the first dept this.textEditSoTienNo.Text = this.previousDeptRecepit.SoTienConLai.ToString(); // set defaul value for date time picker : system current date this.dateTimePickerNgayLap.DateTime = DateTime.Now.Date; this.dateTimePickerNgayLap.ReadOnly = true; this.dateTimePickerNgayTra.DateTime = DateTime.Now.Date; this.labelControlRecommendedInput.Visible = false; }
public DanhSachPhieuThuNo_Form() { InitializeComponent(); this.bulKhachHang = new BUL_KhachHang(); this.bulPhieuThuTienNo = new BUL_PhieuThuTienNo(); }