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); } }
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); } }
public IEnumerable <Role> GetList() { return(_roleDao.GetList()); }