Exemple #1
0
        private void btSanPham_ItemClick(object sender, ItemClickEventArgs e)
        {
            FrmSanPham rbp = new FrmSanPham();
            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, "Sản phẩm", "SP", rbp, -1);
        }
Exemple #2
0
        private void btnsanpham_Click(object sender, EventArgs e)
        {
            FrmSanPham f = new FrmSanPham();

            this.Hide();
            f.ShowDialog();
            this.Show();
        }