Exemple #1
0
        public async Task <ActionResult> List(long?stateId, string keyword, DateTime?startTime, DateTime?endTime, int pageIndex = 1)
        {
            TakeCashSearchResult result = await takeCashService.GetModelListAsync(null, stateId, keyword, startTime, endTime, pageIndex, pageSize);

            TakeCashListViewModel model = new TakeCashListViewModel();

            model.TakeCashes = result.TakeCashes.Select(t => new TakeCashModel {
                AdminMobile = t.AdminMobile,
                Amount      = t.Amount,
                Code        = t.Code,
                CreateTime  = t.CreateTime,
                Description = t.Description,
                Id          = t.Id,
                Mobile      = t.Mobile,
                Name        = t.Name,
                PayTypeInfo = userService.GetPayInfo(t.UserId, t.TypeName),
                StateId     = t.StateId,
                StateName   = t.StateName,
                TypeId      = t.TypeId,
                TypeName    = t.TypeName,
                UserId      = t.UserId
            }).ToArray();
            model.PageCount = result.PageCount;
            model.States    = await idNameService.GetByTypeNameAsync("提现状态");

            return(Json(new AjaxResult {
                Status = 1, Data = model
            }));
        }
Exemple #2
0
        public async Task <ActionResult> List(long?stateId, string keyword, DateTime?startTime, DateTime?endTime, int pageIndex = 1)
        {
            TakeCashSearchResult result = await takeCashService.GetModelListAsync(null, stateId, keyword, startTime, endTime, pageIndex, pageSize);

            TakeCashListViewModel model = new TakeCashListViewModel();

            model.TakeCashes = result.TakeCashes;
            model.PageCount  = result.PageCount;
            model.States     = MyEnumHelper.GetEnumList <TakeCashStateEnum>();
            return(Json(new AjaxResult {
                Status = 1, Data = model
            }));
        }
Exemple #3
0
        //public IHolderService holderService { get; set; }
        public ActionResult List()
        {
            double takeCashDay          = Convert.ToDouble(settingsService.GetValueByKey("takecashtime"));
            TakeCashListViewModel model = new TakeCashListViewModel();

            model.TakeCashes = takeCashService.GetByHolderId(UserId);
            model.Holder     = holderService.GetById(UserId);
            if (model.Holder == null)
            {
                Session["UserId"]     = null;
                Session["OpenId"]     = null;
                Session["HeadImgUrl"] = null;
                return(Redirect("/home/index"));
            }
            if (model.Holder.TakeCashTime != model.Holder.CreateTime.AddDays(takeCashDay))
            {
                model.Holder.TakeCashTime = model.Holder.CreateTime.AddDays(takeCashDay);
                holderService.Update(UserId, model.Holder.TakeCashTime);
            }
            return(View(model));
        }