private void btnTonGiao_ItemClick(object sender, ItemClickEventArgs e) { FrmTonGiao rbp = new FrmTonGiao(); DataTable dt1 = new DataTable(); dt1 = CPHANQUYEN.LAYDSNGUOIDUNG(); for (int i = 0; i <= dt1.Rows.Count - 1; i++) { if (dt1.Rows[i]["TENDANGNHAP"].ToString() == TenDangNhap) { if ((bool)dt1.Rows[i]["QUYENTHEM"] == true) { rbp.Enable_Insert(); } if ((bool)dt1.Rows[i]["QUYENXOA"] == true) { rbp.Enable_Delete(); } if ((bool)dt1.Rows[i]["QUYENSUA"] == true) { rbp.Enable_UpDate(); } if ((bool)dt1.Rows[i]["QUYENADMIN"] == true) { rbp.Enable_Insert(); rbp.Enable_Delete(); rbp.Enable_UpDate(); } break; } } tab.TaoTab(xtraTabControl_GiaoDien, "Tôn giáo", "TG", rbp, -1); }
private void barTonGiao_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { FrmTonGiao tg = new FrmTonGiao(); tg.TopLevel = false; tg.Dock = DockStyle.Fill; panelMain.Controls.Clear(); panelMain.Controls.Add(tg); tg.Show(); }