예제 #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);
        }
예제 #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);
        }
예제 #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);
        }