public List<Products> GetProductList(string categoryid, string prodiverid, string beginprice, string endprice, string keyWords, string orderby, bool isasc, int pageSize, int pageIndex, ref int totalCount, ref int pageCount, string clientID) { var dal = new ProductsDAL(); DataSet ds = dal.GetProductList(categoryid, prodiverid, beginprice, endprice, keyWords, orderby, isasc ? 1 : 0, pageSize, pageIndex, ref totalCount, ref pageCount, clientID); List<Products> list = new List<Products>(); foreach (DataRow dr in ds.Tables[0].Rows) { Products model = new Products(); model.FillData(dr); if (!string.IsNullOrEmpty(model.SmallUnitID)) { model.UnitName = GetUnitByID(model.SmallUnitID).UnitName; } model.IsPublicStr = CommonBusiness.GetEnumDesc((EnumProductPublicStatus)model.IsPublic); list.Add(model); } return list; }