コード例 #1
0
        public ResultObj <List <ProductConfigModel> > GetData(string waresName = "", int pageIndex = 1, int pageSize = 10)
        {
            // IProduct service = new ProductService();
            //List<ProductModel> products = service.GetAllProducts();

            ProductConfigModel productConfigInfo = new ProductConfigModel();

            productConfigInfo.WaresConfigName = waresName;
            productConfigInfo.PageIndex       = pageIndex;
            productConfigInfo.PageSize        = pageSize;
            var users      = _IBase.GetAll(productConfigInfo);
            int totalcount = _IBase.GetCount(productConfigInfo);

            var pagination = new Pagination {
                PageSize = pageSize, PageIndex = pageIndex, StartIndex = 0, TotalRows = totalcount, TotalPage = 0
            };

            return(Content(users, pagination));
        }
コード例 #2
0
 public ResultObj <int> PutData([FromBody] ProductConfigModel productConfigInfo)
 {
     return(Content(_IBase.UpdateData(productConfigInfo)));
 }