Пример #1
0
        public async Task <IActionResult> List(int page = 1, int pageSize = 10)
        {
            string where = string.Empty;
            int        total;
            DataSet    ds       = _AppService.GetPage(page, pageSize, "id desc", out total, where);
            IPagedList pageList = new PagedList <DataRow>(ds.Tables[0].Select(), page, pageSize, total);

            if (Request.Headers.ContainsKey("x-requested-with"))
            {
                return(View("_Table", pageList));
            }
            return(View(pageList));
        }
Пример #2
0
        public async Task <IActionResult> Index()
        {
            // ViewData["SettleType"] = await _appService.GetParameterValue("SettleType");
            ViewData["PointPayPrice"] = await _appService.GetParameterValue("PointPayPrice");

            ViewData["CouponPaidForSettlement"] = await _appService.GetParameterValue("CouponPaidForSettlement");

            ViewData["PointPaidForSettlement"] = await _appService.GetParameterValue("PointPaidForSettlement");

            int    total;
            string table = $"select m.id,m.Title, cast(m.profit as float) profit from TMemberLevel m where 1=1 ";

            ViewData["cat"] = _levelAppService.GetPage(1, int.MaxValue, "", out total, "", table).Tables[0];
            ViewBag.Global  = await _globalAppService.GetGlobalSet();

            return(View());
        }