Beispiel #1
0
        public ActionResult RequestMoneyNodeal(int?page)
        {
            PaginationInfo      paging  = new PaginationInfo();
            PaginationInfo      paging2 = new PaginationInfo();
            IList <RequstMoney> moneys  = irequestmoney.Get(null, null, "等待处理", 1, page.HasValue ? page.Value : 1, null, out paging);

            foreach (RequstMoney model in moneys)
            {
                model.user = iuser.Get(null, model.Username, null, null, null, null, null, null, null, null, 1, 1, null, out paging2)[0];
            }

            PagedList <RequstMoney> models = moneys.ToPagedList <RequstMoney>(paging);

            return(View(models));
        }
Beispiel #2
0
        public ActionResult RequestMoney(int?page)
        {
            PaginationInfo      paging = new PaginationInfo();
            IList <RequstMoney> moneys = irequestmoney.Get(null, UserName, null, 1, page.HasValue ? page.Value : 1, null, out paging);

            PagedList <RequstMoney> models  = moneys.ToPagedList <RequstMoney>(paging);
            PaginationInfo          paging2 = new PaginationInfo();
            IList <User>            users   = iuser.Get(null, UserName, null, null, null, null, null, null, null, null, 1, 0, null, out paging2);
            User user = users[0];
            IList <SettingGroup> settings = isetting.GetSystemSetting();
            string  ratestr      = GetSettingVal(settings, "3396287A-DCF3-4701-8D44-9B3C515D5DEF");
            string  moneyratestr = GetSettingVal(settings, "2AADE1C6-59BE-4B0E-927C-7B28BFC8C397");
            decimal rate         = decimal.Parse(ratestr);
            decimal moneyrate    = decimal.Parse(moneyratestr);
            decimal availmoney   = (1 - rate) * (user.Point - user.FreezePoint) / moneyrate;

            availmoney  = decimal.Round(availmoney, 2);
            ViewBag.Msg = "您当前的可用积分为" + (user.Point - user.FreezePoint).ToString() + ",可兑换金额为" + availmoney.ToString() + "元";
            decimal point = user.Balance * decimal.Parse(moneyratestr);

            ViewBag.Msg2  = "可购买积分" + point.ToString() + "分";
            ViewBag.point = point.ToString();
            ViewBag.Msg3  = "您当前余额" + user.Balance.ToString() + "元,请按100元的整数倍提取";
            return(View(models));
        }