public static CustomerClassCollection Search(SearchFilter SearchKey) { CustomerClassCollection collection = new CustomerClassCollection(); using (var reader = SqlHelper.ExecuteReader("CustomerClass_Search", SearchFilterManager.SqlSearchParam(SearchKey))) { while (reader.Read()) { CustomerClass obj = new CustomerClass(); obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }
public static CustomerClassCollection GetbyUser(string CreatedUser, int CompanyID) { CustomerClassCollection collection = new CustomerClassCollection(); CustomerClass obj; var sqlParams = new SqlParameter[] { new SqlParameter("@CreatedUser", CreatedUser), new SqlParameter("@CompanyID", CompanyID), }; using (var reader = SqlHelper.ExecuteReader("CustomerClass_GetAll_byUser", sqlParams)) { while (reader.Read()) { obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }
public static CustomerClassCollection GetAllItem(int CompanyID) { CustomerClassCollection collection = new CustomerClassCollection(); var sqlParams = new SqlParameter[] { new SqlParameter("@CompanyID", CompanyID), }; using (var reader = SqlHelper.ExecuteReader("CustomerClass_GetAll", sqlParams)) { while (reader.Read()) { CustomerClass obj = new CustomerClass(); obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }