Beispiel #1
0
 public void GetOperationLogList()
 {
     using (var client = new SalePromotionActivityLogClient())
     {
         var result = client.GetOperationLogList("6DC14F47", 1, 20).Result;
         Assert.IsNotNull(result);
     }
 }
Beispiel #2
0
        /// <summary>
        /// 获取活动的操作日志列表
        /// </summary>
        /// <param name="activityId"></param>
        /// <returns></returns>
        public ActionResult GetOperationLogList(string activityid, int pageIndex = 1, int pageSize = 10)
        {
            if (string.IsNullOrEmpty(activityid))
            {
                activityid = Request.QueryString["activityid"];
            }
            ViewBag.activityid = activityid;
            var result = new PagedModel <SalePromotionActivityLogModel>();

            using (var client = new SalePromotionActivityLogClient())
            {
                var listResult = client.GetOperationLogList(activityid, pageIndex, pageSize);
                if (listResult.Success && listResult.Result != null)
                {
                    result = listResult.Result;
                }
            }
            ViewBag.pageSize     = pageSize;
            ViewBag.pageIndex    = pageIndex;
            ViewBag.totalRecords = result.Pager.Total;
            ViewBag.totalPage    = result.Pager.Total % pageSize == 0
                ? result.Pager.Total / pageSize : (result.Pager.Total / pageSize) + 1;
            return(View("OperationLogList", result.Source));
        }
Beispiel #3
0
        /// <summary>
        /// 获取活动的操作日志列表
        /// </summary>
        /// <param name="activityId"></param>
        /// <returns></returns>
        public ActionResult ShareBargainLogList(BargainProductRequest request)
        {
            if (string.IsNullOrEmpty(request.PID))
            {
                request.PID = Request.QueryString["PKID"];
            }
            ViewBag.request = request;
            var result = new PagedModel <SalePromotionActivityLogModel>();

            using (var client = new SalePromotionActivityLogClient())
            {
                var listResult = client.GetOperationLogList(request.PID, request.PageIndex, request.PageSize);
                if (listResult.Success && listResult.Result != null)
                {
                    result = listResult.Result;
                }
            }
            ViewBag.pageSize     = request.PageSize;
            ViewBag.pageIndex    = request.PageIndex;
            ViewBag.totalRecords = result.Pager.Total;
            ViewBag.totalPage    = result.Pager.Total % request.PageSize == 0
                ? result.Pager.Total / request.PageSize : (result.Pager.Total / request.PageSize) + 1;
            return(View(result.Source));
        }