Esempio n. 1
0
        public IHttpActionResult Get(int id, int pageIndex, [FromUri] int pageSize)
        {
            var list      = _coCooperationApplicationService.FindPagedList("Id DESC", "Id>" + id, null, pageIndex, pageSize);
            var gridModel = new DataSource <CoCooperationApplication>(list)
            {
                Data = list.Select(x => x)
            };

            return(Ok(gridModel));
        }
Esempio n. 2
0
        /// <summary>
        /// 未枪单代理商信息
        /// </summary>
        /// <returns></returns>
        public ActionResult CooperationApplicationList()
        {
            int    pageIndexs = string.IsNullOrEmpty(Request["pageIndexs"]) ? 1 : Int32.Parse(Request["pageIndexs"]); //当前页
            int    PageSize   = string.IsNullOrEmpty(Request["PageSize"]) ? 20 : Int32.Parse(Request["PageSize"]);    //每页显示数量
            int    searchDesc = string.IsNullOrEmpty(Request["searchDesc"]) ? 0 : Int32.Parse(Request["searchDesc"]); //排序方式
            string status     = "";
            int    type       = string.IsNullOrEmpty(Request["type"]) ? 0 : Int32.Parse(Request["type"]);             //查询条件选择
            string sea_name   = string.IsNullOrEmpty(Request["sea_name"]) ? "" : Request["sea_name"];                 //查询条件内容
            var    list       = _coCooperationApplicationService.FindPagedList("", status, sea_name, type, searchDesc, null, pageIndex: pageIndexs - 1, pageSize: PageSize);
            var    gridModel  = new DataSource <CoCooperationApplication>(list)
            {
                Data = list.Select(x => x).ToList()
            };

            ViewBag.searchDesc = searchDesc;
            ViewBag.type       = type;
            ViewBag.sea_name   = sea_name;
            ViewBag.pageIndexs = pageIndexs;
            ViewBag.PageSize   = PageSize;
            ViewBag.pageCount  = gridModel.Pagination.TotalCount;
            ViewBag.list       = gridModel.Data;
            // ViewBag.status = status;
            return(View());
        }