示例#1
0
        /// <summary>
        /// 充值页面
        /// </summary>
        /// <returns></returns>
        public ActionResult Deposit()
        {
            decimal _readyBalance = 0;

            CommunicateManager.Invoke <IAccountService>(service =>
            {
                _readyBalance = service.GetAccountInfo().ReadyInfo.ReadyBalance;
            });
            var model = new
            {
                searchForm = new { },
                editForm   = new { },
                urls       = new
                {
                    depositLog         = "/Cash/DepositLog",         //充值页面记录URL
                    rechargeByBank     = "/Cash/RechargeByBank",     //银行卡充值
                    rechargeByPlatform = "/Cash/RechargeByPlatform", //第三方平台充值
                    getReadyBalance    = "/Cash/GetReadyBalance"     //获取可用金额
                },
                readyBalance = _readyBalance,
                banks        = BankData.GetAllBanks()
            };

            return(View(model));
        }
示例#2
0
        /// <summary>
        ///结算页面
        /// </summary>
        /// <returns></returns>
        public ActionResult Withdraw()
        {
            decimal _readyBalance = 0;

            CashCompanyInfoDto _cashCompanyInfo = null;
            FeeRuleInfoDto     dto = null;

            CommunicateManager.Invoke <IFundService>(p => dto = p.GetFeeRule());
            CommunicateManager.Invoke <IAccountService>(service =>
            {
                _readyBalance    = service.GetAccountInfo().ReadyInfo.ReadyBalance;
                _cashCompanyInfo = service.GetCompanyInfo();
            });


            var model = new
            {
                searchForm = new
                {
                },
                editForm = new BankCardModel()
                {
                    Owner = _cashCompanyInfo != null ? _cashCompanyInfo.Contact : ""
                },
                feeRuleInfo = dto,
                urls        = new
                {
                    addBankCard    = "/BankCard/Add",
                    getCity        = "/BankCard/GetCity",
                    queryBankCards = "/BankCard/QueryBankCards",

                    withdrawLog       = "/Cash/WithdrawLog",       //结算记录页面URL
                    cashOut           = "/Cash/CashOut",           //结算
                    getAvailableMoney = "/Cash/GetAvailableMoney", //获取最高结算金额
                    getFeeAmount      = "/Cash/GetFeeAmount"       //获取手续费
                },
                cashOutParas = new
                {
                    money              = 0,
                    bankId             = string.Empty,
                    password           = string.Empty,
                    isNextDayToAccount = dto.MorrowEnable ? "1" : (dto.TodayEnable ? "0" : "")//次日到账
                },
                otherParas = new
                {
                    Banks     = BankData.GetAllBanks(),
                    Provinces = CityData.GetAllState(),
                },
                readyBalance = _readyBalance,
                bankCards    = new List <BankCardDto>()
            };

            return(View(model));
        }
示例#3
0
        //银行卡管理
        // GET: /BankCard/

        public ActionResult Index()
        {
            CashCompanyInfoDto _cashCompanyInfo = null;

            CommunicateManager.Invoke <IAccountService>(service =>
            {
                _cashCompanyInfo = service.GetCompanyInfo();
            });

            var model = new
            {
                searchForm = new
                {
                    Name       = string.Empty,
                    BankBranch = string.Empty,
                    CardNo     = string.Empty,
                    Owner      = string.Empty,
                },
                editForm = new BankCardModel()
                {
                    Owner = _cashCompanyInfo != null ? _cashCompanyInfo.Contact : ""
                },

                urls = new
                {
                    search             = "/BankCard/QueryBankCards",
                    add                = "/BankCard/Add",
                    edit               = "/BankCard/Edit",
                    deleteBank         = "/BankCard/Delete",
                    setDefaultBankCard = "/BankCard/SetDefaultBankCard",
                    getCity            = "/BankCard/GetCity"
                },
                otherParas = new
                {
                    Banks     = BankData.GetAllBanks(),
                    Provinces = CityData.GetAllState()
                }
            };

            return(View(model));
        }