Esempio n. 1
0
 public static QuanLyDangNhap getInstance()
 {
     if (instance == null)
     {
         instance = new QuanLyDangNhap();
     }
     return(instance);
 }
Esempio n. 2
0
 private void PhanQuyen()
 {
     foreach (ToolStripMenuItem x in menu_test.Items)
     {
         x.Enabled = QuanLyDangNhap.getInstance().GetRoles().GetUserRight(x.Name);
         foreach (ToolStripDropDownItem y in x.DropDownItems)
         {
             y.Enabled = QuanLyDangNhap.getInstance().GetRoles().GetUserRight(y.Name);
             foreach (ToolStripDropDownItem z in y.DropDownItems)
             {
                 z.Enabled = QuanLyDangNhap.getInstance().GetRoles().GetUserRight(z.Name);
             }
         }
     }
 }