Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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);
        }