Exemple #1
0
        public CashCompanyInfoDto GetCompanyInfo()
        {
            var rs      = accountClientProxy.GetCompanyInfo(_code, _key);
            var cpyinfo = new CashCompanyInfoDto
            {
                Contact = rs.Contact,
                CpyName = rs.CpyName
            };

            return(cpyinfo);
        }
Exemple #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));
        }
        //银行卡管理
        // 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));
        }
Exemple #4
0
 public void UpdateCompany(CashCompanyInfoDto cashcpyinfo)
 {
     accountClientProxy.UpdateCompany(_code, _key, Mapper.Map <CashCompanyInfo>(cashcpyinfo));
 }
Exemple #5
0
        public CashCompanyInfoDto AddCompany(CashCompanyInfoDto cashcpyinfo)
        {
            var data = accountClientProxy.AddCompany(_code, _key, Mapper.Map <CashCompanyInfo>(cashcpyinfo));

            return(Mapper.Map <CashCompanyInfoDto>(data));
        }