public static AccessRightsCollection GetbyUser(string CreatedUser) { AccessRightsCollection collection = new AccessRightsCollection(); AccessRights obj; using (var reader = SqlHelper.ExecuteReader("AccessRights_GetAll_byUser", new SqlParameter("@CreatedUser", CreatedUser))) { while (reader.Read()) { obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }
public static AccessRightsCollection Search(SearchFilter SearchKey) { AccessRightsCollection collection = new AccessRightsCollection(); using (var reader = SqlHelper.ExecuteReader("AccessRights_Search", SearchFilterManager.SqlSearchParam(SearchKey))) { while (reader.Read()) { AccessRights obj = new AccessRights(); obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }
public static AccessRightsCollection GetAllItem(int CompanyID) { AccessRightsCollection collection = new AccessRightsCollection(); var sqlParams = new SqlParameter[1]; sqlParams[0] = new SqlParameter("@CompanyID", CompanyID); using (var reader = SqlHelper.ExecuteReader("AccessRights_GetAll", sqlParams)) { while (reader.Read()) { AccessRights obj = new AccessRights(); obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }
public static AccessRightsCollection GetbyNoteParent(string roleName, string applicationName, string nodeParentID, int companyID) { AccessRightsCollection collection = new AccessRightsCollection(); AccessRights obj; var par = new SqlParameter[] { new SqlParameter("@RoleName", roleName), new SqlParameter("@CompanyID", companyID), new SqlParameter("@ApplicationName", applicationName), new SqlParameter("@NodeParentID", new Guid(nodeParentID)), }; using (var reader = SqlHelper.ExecuteReader("AccessRights_GetByNoteParent", par)) { while (reader.Read()) { obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }
public static AccessRightsCollection GetItemByID(String RoleName, int CompanyID, string ApplicationName, Guid?NodeID) { AccessRightsCollection collection = new AccessRightsCollection(); var sqlParams = new SqlParameter[4]; sqlParams[0] = new SqlParameter("@CompanyID", CompanyID); sqlParams[1] = new SqlParameter("@RoleName", RoleName); sqlParams[2] = new SqlParameter("@ApplicationName", ApplicationName); sqlParams[3] = new SqlParameter("@NodeID", NodeID); using (var reader = SqlHelper.ExecuteReader("AccessRights_GetByID", sqlParams)) { while (reader.Read()) { AccessRights obj = new AccessRights(); obj = GetItemFromReader(reader); collection.Add(obj); //item = GetItemFromReader(reader); } } return(collection); }