public static ItemEventMappingCollection GetbyUser(string CreatedUser) { ItemEventMappingCollection collection = new ItemEventMappingCollection(); ItemEventMapping obj; using (var reader = SqlHelper.ExecuteReader("tblItemEventMapping_GetAll_byUser", new SqlParameter("@CreatedUser", CreatedUser))) { while (reader.Read()) { obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }
public static ItemEventMappingCollection GetAllItem() { ItemEventMappingCollection collection = new ItemEventMappingCollection(); using (var reader = SqlHelper.ExecuteReader("tblItemEventMapping_GetAll", null)) { while (reader.Read()) { ItemEventMapping obj = new ItemEventMapping(); obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }