private void xemPhiếuNợToolStripMenuItem_Click(object sender, EventArgs e) { if (this.gridViewDanhSachPhieuBanHang.DataRowCount == 0) { return; } PHIEUBANHANG selectedReceipt = (PHIEUBANHANG)this.gridViewDanhSachPhieuBanHang.GetRow(this.gridViewDanhSachPhieuBanHang.FocusedRowHandle); // start to look up all dept receipts this.bulPhieuBanHang = new BUL_PhieuBanHang(); this.gridControlDanhSachPhieuNo.RefreshDataSource(); this.gridControlDanhSachPhieuNo.DataSource = this.bulPhieuBanHang.findDeptReceiptsByReceiptId(selectedReceipt.SoPhieuBH); this.renameColumnsOfDebReceiptsGridView(); // all uninformative columns will be invisible this.gridViewDanhSachPhieuNo.Columns[8].Visible = false; this.gridViewDanhSachPhieuNo.Columns[9].Visible = false; }
private void simpleButton1_Click(object sender, EventArgs e) { this.gridControlDanhSachPhieuNo.DataSource = null; // see all receipts of selected frequenter // ContainerItem selectedItem = (ContainerItem)this.comboBoxEditKhachHang.SelectedItem; if (selectedItem == null) { return; } KHACHHANG selectedFrequenter = (KHACHHANG)selectedItem.Value; this.bulPhieuBanHang = new BUL_PhieuBanHang(); this.gridControlPhieuBanHang.RefreshDataSource(); this.gridControlPhieuBanHang.DataSource = this.bulPhieuBanHang.findReceiptsByFrequenterId(selectedFrequenter.MaKH); this.renameColumnsOfReceiptsGridView(); // all uninformative columns will be invisible this.gridViewDanhSachPhieuBanHang.Columns[6].Visible = false; this.gridViewDanhSachPhieuBanHang.Columns[7].Visible = false; this.gridViewDanhSachPhieuBanHang.Columns[8].Visible = false; this.gridViewDanhSachPhieuBanHang.Columns[9].Visible = false; }