Exemple #1
0
        private void btnDoiMatKhau_ItemClick(object sender, ItemClickEventArgs e)
        {
            FrmDoiMatKhau rbp = new FrmDoiMatKhau();
            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]["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, "Đổi Mật Khẩu", "DMK", rbp, -1);
        }
Exemple #2
0
        private void bbi_DoiMatKhau_ItemClick(object sender, ItemClickEventArgs e)
        {
            FrmDoiMatKhau ucDMK = new FrmDoiMatKhau();
            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)
                    {
                        ucDMK.Enable_Insert();
                    }
                    if ((bool)dt1.Rows[i]["QUYENSUA"] == true)
                    {
                        ucDMK.Enable_UpDate();
                    }
                    if ((bool)dt1.Rows[i]["QUYENXOA"] == true)
                    {
                        ucDMK.Enable_Delete();
                    }
                    if ((bool)dt1.Rows[i]["QUYENADMIN"] == true)
                    {
                        ucDMK.Enable_Insert();
                        ucDMK.Enable_Delete();
                        ucDMK.Enable_UpDate();
                    }
                    break;
                }
            }
            KiemTraTonTaiTab.TaoTabUC(xtraTabControl1, "Doi Mat Khau", "DMK", ucDMK, -1);
        }