private void Init() { QuyenNguoiDung.LayQuyenNguoiDungTheoChucNang("btnBoPhan"); if (QuyenNguoiDung.Them == false) { btnThem.Visibility = BarItemVisibility.Never; } if (QuyenNguoiDung.Sua == false) { btnSua.Visibility = BarItemVisibility.Never; } if (QuyenNguoiDung.Xoa == false) { btnXoa.Visibility = BarItemVisibility.Never; } LoadData(); gvMain.Columns[0].FieldName = "Department_ID"; gvMain.Columns[1].FieldName = "Department_Name"; gvMain.Columns[2].FieldName = "Description"; gvMain.Columns[3].FieldName = "Active"; gvMain.IndicatorWidth = 30; gvMain.CustomDrawRowIndicator += gvMain_CustomDrawRowIndicator; btnThem.ItemClick += BtnThem_ItemClick; btnSua.ItemClick += BtnSua_ItemClick; btnXoa.ItemClick += BtnXoa_ItemClick; btnLamMoi.ItemClick += BtnLamMoi_ItemClick; }
private void Init() { QuyenNguoiDung.LayQuyenNguoiDungTheoChucNang("btnNhanVien"); if (QuyenNguoiDung.Them == false) { btnThem.Visibility = BarItemVisibility.Never; } if (QuyenNguoiDung.Sua == false) { btnSua.Visibility = BarItemVisibility.Never; } if (QuyenNguoiDung.Xoa == false) { btnXoa.Visibility = BarItemVisibility.Never; } LoadData(); gvMain.Columns[0].FieldName = "Employee_ID"; gvMain.Columns[1].FieldName = "Employee_Name"; gvMain.Columns[2].FieldName = "Address"; gvMain.Columns[3].FieldName = "O_Tel"; gvMain.Columns[4].FieldName = "Mobile"; gvMain.Columns[5].FieldName = "Email"; gvMain.Columns[6].FieldName = "Active"; gvMain.IndicatorWidth = 50; gvMain.CustomDrawRowIndicator += gvMain_CustomDrawRowIndicator; btnLamMoi.ItemClick += BtnLamMoi_ItemClick; btnThem.ItemClick += BtnThem_ItemClick; btnSua.ItemClick += BtnSua_ItemClick; btnXoa.ItemClick += BtnXoa_ItemClick; }
private void Init() { QuyenNguoiDung.LayQuyenNguoiDungTheoChucNang("btnTyGia"); if (QuyenNguoiDung.Them == false) { btnThem.Visibility = BarItemVisibility.Never; } if (QuyenNguoiDung.Sua == false) { btnSua.Visibility = BarItemVisibility.Never; } if (QuyenNguoiDung.Xoa == false) { btnXoa.Visibility = BarItemVisibility.Never; } LoadData(); gvMain.Columns[0].FieldName = "Currency_ID"; gvMain.Columns[1].FieldName = "CurrencyName"; gvMain.Columns[2].FieldName = "Exchange"; gvMain.Columns[3].FieldName = "Active"; gvMain.Columns[2].DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; gvMain.Columns[2].DisplayFormat.FormatString = "n0"; gvMain.IndicatorWidth = 35; gvMain.CustomDrawRowIndicator += GvMain_CustomDrawRowIndicator; btnThem.ItemClick += BtnThem_ItemClick; btnSua.ItemClick += BtnSua_ItemClick; btnXoa.ItemClick += BtnXoa_ItemClick; }
private void Init() { if (sale == true) { KhoiTaoChungTuBH(); QuyenNguoiDung.LayQuyenNguoiDungTheoChucNang("btnBanHang"); } else { KhoiTaoChungTuMH(); QuyenNguoiDung.LayQuyenNguoiDungTheoChucNang("btnMuaHang"); } if (QuyenNguoiDung.Them == false) { btnThem.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; } if (QuyenNguoiDung.Sua == false) { btnSua.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; } if (QuyenNguoiDung.Xoa == false) { btnXoa.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; } btnLamMoi.ItemClick += BtnLamMoi_ItemClick; btnThem.ItemClick += BtnThem_ItemClick; btnXoa.ItemClick += BtnXoa_ItemClick; btnSua.ItemClick += BtnSua_ItemClick; }
private void Init() { if (CNThu == true) { gcMain.DataSource = BUS_CongNo.LoadCNThu(); gvMain.Columns[0].FieldName = "MaBH"; gvMain.Columns[1].FieldName = "NgayLap"; gvMain.Columns[2].FieldName = "MaKH"; gvMain.Columns[3].FieldName = "TenKH"; gvMain.Columns[4].FieldName = "SoTienNo"; gvMain.Columns[5].FieldName = "SoTienTra"; gvMain.Columns[6].FieldName = "SoTienConNo"; gvMain.Columns[7].FieldName = "GhiChu"; Text = "Danh Sách Công Nợ Chi Tiết"; QuyenNguoiDung.LayQuyenNguoiDungTheoChucNang("btnThuTien"); if (QuyenNguoiDung.Them == false) { btnLapPhieu.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; } } else { gcMain.DataSource = BUS_CongNo.LoadCNChi(); gvMain.Columns[0].FieldName = "MaBH"; gvMain.Columns[1].FieldName = "NgayLap"; gvMain.Columns[2].FieldName = "MaNCC"; gvMain.Columns[3].FieldName = "TenNCC"; gvMain.Columns[4].FieldName = "SoTienNo"; gvMain.Columns[5].FieldName = "SoTienTra"; gvMain.Columns[6].FieldName = "SoTienConNo"; gvMain.Columns[7].FieldName = "GhiChu"; gvMain.Columns[2].Caption = "Mã NCC"; gvMain.Columns[3].Caption = "Nhà Cung Cấp"; Text = "Danh Sách Công Nợ Phải Chi"; QuyenNguoiDung.LayQuyenNguoiDungTheoChucNang("btnTraTien"); if (QuyenNguoiDung.Them == false) { btnLapPhieu.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; } } gvMain.IndicatorWidth = 50; gvMain.CustomDrawRowIndicator += gvMain_CustomDrawRowIndicator; gcMain.UseEmbeddedNavigator = true; gcMain.EmbeddedNavigator.Buttons.Append.Visible = false; gcMain.EmbeddedNavigator.Buttons.CancelEdit.Visible = false; gcMain.EmbeddedNavigator.Buttons.Edit.Visible = false; gcMain.EmbeddedNavigator.Buttons.EndEdit.Visible = false; gcMain.EmbeddedNavigator.Buttons.Remove.Visible = false; }
private void Init() { QuyenNguoiDung.LayQuyenNguoiDungTheoChucNang("btnTonKho"); if (QuyenNguoiDung.Them == false) { btnThem.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; } if (QuyenNguoiDung.Sua == false) { btnSua.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; } if (QuyenNguoiDung.Xoa == false) { btnXoa.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; } gcMain.DataSource = BUS_HangHoa.LayHangHoaLookupEdit(); gvMain.Columns[0].FieldName = "Product_ID"; gvMain.Columns[1].FieldName = "Product_Name"; gvMain.Columns[4].FieldName = "Quantity"; gvMain.Columns[2].FieldName = "Stock_Name"; gvMain.Columns[3].FieldName = "Unit"; gvMain.Columns[5].FieldName = "Product_Group_ID"; gvMain.Columns[6].FieldName = "Active"; btnThem.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; btnSua.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; btnXoa.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; gcMain.UseEmbeddedNavigator = true; gcMain.EmbeddedNavigator.Buttons.Append.Visible = false; gcMain.EmbeddedNavigator.Buttons.CancelEdit.Visible = false; gcMain.EmbeddedNavigator.Buttons.Edit.Visible = false; gcMain.EmbeddedNavigator.Buttons.EndEdit.Visible = false; gcMain.EmbeddedNavigator.Buttons.Remove.Visible = false; gvMain.IndicatorWidth = 45; gvMain.CustomDrawRowIndicator += GvMain_CustomDrawRowIndicator; btnLamMoi.ItemClick += BtnLamMoi_ItemClick; }
private void Init() { if (sale == true) { QuyenNguoiDung.LayQuyenNguoiDungTheoChucNang("btnBanHang"); if (QuyenNguoiDung.Them == false) { btnPhieu.Visible = false; } } else { QuyenNguoiDung.LayQuyenNguoiDungTheoChucNang("btnMuaHang"); if (QuyenNguoiDung.Them == false) { btnPhieu.Visible = false; } } if (sale == true) { Text = "Bán Hàng"; this.IconOptions.Image = global::DAQLBH_Devexpress.Properties.Resources.bosaleitem_32x32; btnPhieu.Caption = "Phiếu xuất hàng"; fBaseMH_BH bh = new fBaseMH_BH(); bh.MdiParent = this; bh.Show(); } else { Text = "Mua Hàng"; this.IconOptions.Image = global::DAQLBH_Devexpress.Properties.Resources.boorderitem_32x32; btnPhieu.Caption = "Phiếu nhập hàng"; fBaseMH_BH mh = new fBaseMH_BH(false); mh.MdiParent = this; mh.Show(); } }