예제 #1
0
        private void LoadUserLevel()
        {
            try
            {
                UserLevelDao      dao = new UserLevelDao();
                IList <UserLevel> lst = dao.GetList();
                foreach (var v in lst)
                {
                    cmbRoleLevel.Items.Add(string.Format("{0}_{1}", v.LevelId, v.LevelName));
                }
                cmbRoleLevel.SelectedIndex = 0;

                RoleDao      roleDao = new RoleDao();
                IList <Role> roleLst = roleDao.GetList();
                foreach (var v in roleLst)
                {
                    cmbRoles.Items.Add(string.Format("{0}_{1}", v.RoleId, v.RoleName));
                }
                cmbRoles.SelectedIndex = 0;
            }
            catch (Exception ex)
            {
                LogHelper.AppLoger.Error(ex);
            }
        }
예제 #2
0
 private void LoadRole()
 {
     try
     {
         RoleDao      dao = new RoleDao();
         IList <Role> lst = dao.GetList();
         foreach (var v in lst)
         {
             cmbRoles.Items.Add(string.Format("{0}_{1}", v.RoleId, v.RoleName));
         }
         cmbRoles.SelectedIndex = 0;
     }catch (Exception ex)
     {
         LogHelper.AppLoger.Error(ex);
     }
 }
예제 #3
0
 public IEnumerable <Role> GetList()
 {
     return(_roleDao.GetList());
 }