public static SiteMapCollection GetbyUser(string CreatedUser, int CompanyID) { SiteMapCollection collection = new SiteMapCollection(); SiteMap obj; var sqlParams = new SqlParameter[] { new SqlParameter("@CreatedUser", CreatedUser), new SqlParameter("@CompanyID", CompanyID), }; using (var reader = SqlHelper.ExecuteReader("SiteMap_GetAll_byUser", sqlParams)) { while (reader.Read()) { obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }
public static SiteMapCollection GetAllItem(int CompanyID) { SiteMapCollection collection = new SiteMapCollection(); var sqlParams = new SqlParameter[] { new SqlParameter("@CompanyID", CompanyID), }; using (var reader = SqlHelper.ExecuteReader("SiteMap_GetAll", sqlParams)) { while (reader.Read()) { SiteMap obj = new SiteMap(); obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }