/// <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 DanhSachKhachQuen_Form()
        {
            InitializeComponent();
            this.bulKhachHang = new BUL_KhachHang();
            // binding data
            this.gridControl1.DataSource = this.bulKhachHang.getAllBindingListOfKhachHang();

            this.gridView1.Columns[0].Visible = this.gridView1.Columns[5].Visible = gridView1.Columns[6].Visible = gridView1.Columns[7].Visible = false;
            gridView1.Columns[1].Caption      = "Tên khách hàng";
            gridView1.Columns[2].Caption      = "SĐT";
            gridView1.Columns[3].Caption      = "Địa chỉ";
            gridView1.Columns[4].Caption      = "Số tiền nợ";
        }
        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;
        }
Beispiel #4
0
 public DanhSachPhieuThuNo_Form()
 {
     InitializeComponent();
     this.bulKhachHang      = new BUL_KhachHang();
     this.bulPhieuThuTienNo = new BUL_PhieuThuTienNo();
 }