private void loadata() { // nhanvien cbnhanvienbh.Properties.DataSource = muaHangBUS.LayThongTinNV(); cbnhanvienbh.Properties.DisplayMember = "Tên"; cbnhanvienbh.Properties.ValueMember = "Mã"; cbnhanvienbh.EditValue = cbnhanvienbh.Properties.GetKeyValue(0); //ht thanh toán cbdktt.Properties.DataSource = muaHangBUS.LayThongTinDK_ThanhToan(); cbdktt.Properties.DisplayMember = "Tên"; cbdktt.Properties.ValueMember = "Mã"; cbdktt.EditValue = cbdktt.Properties.GetKeyValue(0); //dk thanh toán cbhttt.Properties.DataSource = muaHangBUS.LayThongTinHT_ThanhToan(); cbhttt.Properties.DisplayMember = "Tên"; cbhttt.Properties.ValueMember = "Mã"; cbhttt.EditValue = cbhttt.Properties.GetKeyValue(0); // mã PH txtmaphieubh.Text = PhieuBanHangBUS.PhatSinhMaPhieuBH(tentkdn); // ngày mặc định cbngaylap.EditValue = DateTime.Today; cbhtt.EditValue = DateTime.Today; //comboxedit grid control GridLookUpEdit1_GiaBan.DataSource = PhieuBanHangBUS.LayThongTinGiaBan(); GridLookUpEdit1_GiaBan.DisplayMember = "Id"; GridLookUpEdit1_GiaBan.ValueMember = "Id"; GridLookUpEdit1_GiaBan.NullText = "Chọn"; LayThongTinHangHoa(); // format ngày cbngaylap.Properties.NullText = DateTime.Today.ToString(); cbngaylap.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.DateTime; cbngaylap.Properties.Mask.EditMask = "dd/MM/yyyy"; cbngaylap.Properties.Mask.UseMaskAsDisplayFormat = true; cbhtt.Properties.NullText = DateTime.Today.ToString(); cbhtt.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.DateTime; cbhtt.Properties.Mask.EditMask = "dd/MM/yyyy"; cbhtt.Properties.Mask.UseMaskAsDisplayFormat = true; combongaygiao.Text = DateTime.Now.ToString(); combongaygiao.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.DateTime; combongaygiao.Properties.Mask.EditMask = "dd/MM/yyyy"; combongaygiao.Properties.Mask.UseMaskAsDisplayFormat = true; }
private void loadata() { // nhanvien cbnhanvien.Properties.DataSource = muaHangBUS.LayThongTinNV(); cbnhanvien.Properties.DisplayMember = "Tên"; cbnhanvien.Properties.ValueMember = "Mã"; cbnhanvien.EditValue = cbnhanvien.Properties.GetKeyValue(0); //ht thanh toán cbdktt.Properties.DataSource = muaHangBUS.LayThongTinDK_ThanhToan(); cbdktt.Properties.DisplayMember = "Tên"; cbdktt.Properties.ValueMember = "Mã"; cbdktt.EditValue = cbdktt.Properties.GetKeyValue(0); //dk thanh toán cbhttt.Properties.DataSource = muaHangBUS.LayThongTinHT_ThanhToan(); cbhttt.Properties.DisplayMember = "Tên"; cbhttt.Properties.ValueMember = "Mã"; cbhttt.EditValue = cbhttt.Properties.GetKeyValue(0); // mã PH txtmaphieunhaphang.Text = muaHangBUS.PhatSinhMaPhieu(tentkdn); // ngày mặc định cbngay.EditValue = DateTime.Today; txthanthanhtoan.EditValue = DateTime.Today; }