예제 #1
0
 public void cbx_Databind()
 {
     UserGroupBLL groupbll = new UserGroupBLL();
     groupbll.setCboUserGroup(this.cbx_UserGroup);
     groupbll.setCboUserGroup(this.cbxUserGroup);
 }
예제 #2
0
 public void setData()
 {
     UserGroupBLL bll = new UserGroupBLL();
     DataSet ds = bll.selectUserGroups(LoginBLL.user.ToString());
     Hashtable ht = new Hashtable();
     if (ds != null && ds.Tables[0].Rows.Count > 0)
     {
         foreach (DataRow dr in ds.Tables[0].Rows)
         {
             if (dr[3].ToString().Trim() == "")
             {
                 if (ht.Contains(dr[2].ToString()))
                 {
                     ht[dr[2].ToString()] = Convert.ToBoolean(dr[1]);
                 }
                 else
                 {
                     ht.Add(dr[2].ToString(), Convert.ToBoolean(dr[1]));
                 }
             }
             else
             {
                 if (ht.Contains(dr[2].ToString()))
                 {
                     ht[dr[2].ToString()] = false;
                 }
                 else
                 {
                     ht.Add(dr[2].ToString(), false);
                 }
             }
         }
         foreach (ToolStripItem item in msMainMenu.Items)
         {
             getSonMenus(item, ht);
         }
     }
 }