public JsonResult List(int page, int rows, long?userId, int?days)
        {
            ProformanceQuery query = new ProformanceQuery();

            query.PageNo   = page;
            query.PageSize = rows;
            query.UserId   = userId;
            if (days.HasValue)
            {
                if (days == 3)
                {
                    query.startTime = DateTime.Now.AddDays(-3);
                }
                else if (days == 7)
                {
                    query.startTime = DateTime.Now.AddDays(-7);
                }
                else if (days == 30)
                {
                    query.startTime = DateTime.Now.AddDays(-30);
                }
            }
            var model    = _iDistributionService.GetPerformanceList(query);
            var dataGrid = new { rows = model.Models, total = model.Total };

            return(Json(dataGrid));
        }
        // GET: Admin/Distribution
        public ActionResult Index()
        {
            ProformanceQuery query = new ProformanceQuery();

            query.PageNo   = 1;
            query.PageSize = 9;
            var model = _iDistributionService.GetPerformanceList(query);

            return(View(model));
        }
Beispiel #3
0
        public void Test()
        {
            var service            = ServiceProvider.Instance <IDistributionService> .Create;
            ProformanceQuery query = new ProformanceQuery();

            query.PageNo   = 1;
            query.PageSize = 9;
            var model = service.GetPerformanceList(query);

            Assert.IsTrue(model.Total > 0);
        }