/// <summary> /// Constructor /// </summary> /// <param name="userInformation"></param> public SecurityViewModel(UserInformation userInformation) { _security = new RoleUserSecurityModel(); _securitydet = new RoleUserSecurityDet(userInformation); _userInformation = userInformation; _securitydet.GetUsers(RoleUserSecurities); _securitydet.GetRoles(RoleUserSecurities); }
public bool GetRoles(RoleUserSecurityModel security) { try { dttable = new DataTable(); dttable = ToDataTable((from c in DB.SEC_ROLES_MASTER.AsEnumerable() select c).ToList()); security.Roles = dttable.DefaultView; return(true); } catch (Exception ex) { throw ex.LogException(); } }
public bool GetUsers(RoleUserSecurityModel security) { try { dttable = new DataTable(); dttable = ToDataTable((from c in DB.SEC_USER_MASTER.AsEnumerable() where (c.DELETE_FLAG == false || c.DELETE_FLAG == null) select c).ToList()); security.Users = dttable.DefaultView; return(true); } catch (Exception ex) { throw ex.LogException(); } }