Esempio n. 1
0
        public ActionResult DiscountTicketInformation(int ticketId)
        {
            //if (ticketId == null) return PartialView("DetailPageControl", new TicketDiscount());
            ViewData["key"] = ticketId;
            var model = db.TicketDiscount.Where(item => item.TicketID == ticketId).FirstOrDefault();

            ViewData["Pro"]  = StaticDictiory.GetProDataSource();
            ViewData["City"] = StaticDictiory.GetCityDataSource(model.ProvinceID);
            ViewData["Bank"] = StaticDictiory.GetBankDataSource(model.BankType);
            return(PartialView("DiscountTicketInformation", model));
        }
        public ActionResult DiscountTicketInformation(int ticketId)
        {
            ViewData["key"] = ticketId;
            var model = db.TicketDiscount.Where(item => item.TicketID == ticketId).FirstOrDefault();

            ViewData["Pro"]  = StaticDictiory.GetProDataSource();
            ViewData["City"] = StaticDictiory.GetCityDataSource(model.ProvinceID);
            ViewData["Bank"] = StaticDictiory.GetBankDataSource(model.BankType);
            #region 年利率
            //票面金额-成交价格=票面金额*((年息/100)/360)*实际天数
            Decimal interest = (Decimal)(model.TicketPrice - model.BidPrice);                             //利息
            int     resDayca = RestDays(model.TicketEndTime);                                             //实际天数
            Decimal ratca    = resDayca <= 0 ? 0 : interest * 360 * 100 / (model.TicketPrice * resDayca); //例如3.17%
            ViewData["Rate"] = ratca.ToString("N2").Replace(",", "");
            #endregion
            AgencyTrade atmodel = new AgencyTrade();
            atmodel.ticketDiscount = model;

            #region MyRegion
            EndorseInfo.UserAccountInfo uif = new EndorseInfo.UserAccountInfo(model.UserID.ToString()); //持票人的虚拟账户信息
            EndorseInfo.UserAccountInfo zf  = new EndorseInfo.UserAccountInfo(model.BidId.ToString());  //资金方的虚拟账户信息
            List <TCPJW_BATradingSystemCITIC.AccountBalance> fablist =
                TCPJW_BATradingSystemCITIC.CITICYQZL.GetAccountBalance(zf.Account);
            string alertsel = string.Empty;
            if (fablist == null || fablist.Count == 0)
            {
                atmodel.PayAccount = "可用余额:0元   ";
            }


            List <TCPJW_BATradingSystemCITIC.AccountBalance> sablist =
                TCPJW_BATradingSystemCITIC.CITICYQZL.GetAccountBalance(uif.Account);
            if (sablist == null || sablist.Count == 0)
            {
                atmodel.GetAccount = "可用余额:0元   ";
            }
            foreach (var item in fablist)
            {
                atmodel.PayAccount += " 可用余额:" + item.Kyamt + "元 ";
            }
            foreach (var item in sablist)
            {
                atmodel.GetAccount += " 可用余额:" + item.Kyamt + "元";
            }

            Random ro   = new Random();
            int    rand = ro.Next(100, 999);//返回三位随机数
            atmodel.ZzMemo = string.Format("DP{0}{1}", DateTime.Now.ToString("yyMMdd"), rand.ToString());
            #endregion

            return(PartialView("DiscountTicketInformation", atmodel));
        }
Esempio n. 3
0
 public ActionResult AjaxCityCombox(string proID)
 {
     ViewData["City"] = StaticDictiory.GetCityDataSource(proID);
     return(PartialView(StaticDictiory.GetCityDataSource(proID)));
 }