Example #1
0
        public ProductResult GetProducts()
        {
            ProductResult result = new ProductResult();
            ProductManage manage = new ProductManage();

            List <Product> resultList = manage.ProductList();

            result.ResultList  = resultList;
            result.ReturnCode  = "0000";
            result.ReturnMsg   = "Return Message";
            result.RecordCount = manage.RecordCount;

            return(result);
        }
Example #2
0
        //[HttpGet]
        //[Route("api/getproductspage")]
        public ProductResult GetProductsPage(string page, string pagesize)
        {
            ProductResult result = new ProductResult();
            ProductManage manage = new ProductManage();

            int pageIndex, pageSize;

            pageIndex = Convert.ToInt32(page);
            pageSize  = Convert.ToInt32(pagesize);


            List <Product> resultList = manage.ProductListPage(pageIndex, pageSize);

            result.ResultList  = resultList;
            result.ReturnCode  = "0000";
            result.ReturnMsg   = "Return Message";
            result.RecordCount = manage.RecordCount;

            return(result);
        }