Esempio n. 1
0
 public void phanQuyen()
 {
     foreach (TabPage tab in tabControl1.TabPages)
     {
         foreach (PHANQUYEN pq in pq.getPhanQuyens(Frm_Main.username))
         {
             if (tab.Tag.ToString() == pq.MaManHinh)
             {
                 if (pq.CoQuyen == false)
                 {
                     ((Control)tab).Enabled = false;
                 }
             }
         }
     }
 }
Esempio n. 2
0
 public void phanQuyen()
 {
     foreach (Control control in flowLayoutPanel2.Controls)
     {
         //if(control is Button)
         //{
         foreach (PHANQUYEN pq in pq.getPhanQuyens(username))
         {
             if (control.Tag.ToString() == pq.MaManHinh)
             {
                 if (pq.CoQuyen == false)
                 {
                     control.Enabled = false;
                 }
             }
         }
         //}
     }
 }