Ejemplo n.º 1
0
        public string ToHtml(CourseType courseType)
        {
            const string cellTemplate = "<div class=\"cell\">{0}</div>\r\n";
            var          cellsContent = string.Format(cellTemplate, Period);

            cellsContent += string.Format(cellTemplate, PeriodDate.ToString("MM/yyyy"));
            if (courseType != CourseType.None)
            {
                cellsContent += string.Format(cellTemplate, InterestMonthPercentage.ToString("N4") + "%");
                cellsContent += string.Format(cellTemplate, InterestYearPercentage.ToString("N2") + "%");
            }

            cellsContent += string.Format(cellTemplate, InterestPayment.ToString("N0"));
            cellsContent += string.Format(cellTemplate, FundPayment.ToString("N0"));
            if (PriceIndexCourses.Contains(courseType))
            {
                cellsContent += string.Format(cellTemplate, FundPaymentWithPriceIndex.ToString("N0"));
            }

            cellsContent += string.Format(cellTemplate, TotalFund.ToString("N0"));
            if (PriceIndexCourses.Contains(courseType))
            {
                cellsContent += string.Format(cellTemplate, TotalFundWithPriceIndex.ToString("N0"));
            }

            var paymentTemplate = cellTemplate.Replace("class=\"cell\"", "class=\"cell payment_green\"");

            cellsContent += string.Format(paymentTemplate, "₪" + TotalPayment.ToString("N0"));
            var result = $"<div class=\"row\">\r\n{cellsContent.Trim()}\r\n</div>\r\n";

            return(result);
        }
Ejemplo n.º 2
0
 public PayInfoAddToEditVM(Response04 PayResponse, FundPayment df, ObservableCollection <FundPayment> Models)
 {
     this.PayResponse = new Response04();
     this.PayResponse = PayResponse;
     this.df          = df;
     this.Models      = Models;
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 添加未交费记录
        /// </summary>
        public override void OKExecute()
        {
            //IsSearch = true;
            //判断是否查询并且正确
            if (!IsSearch)
            {
                VMHelp.ShowMessage("未进行缴款凭证编号的查询,不可提交", false);
                return;
            }

            FundPayment temp = new FundPayment();

            temp.BusinessCode = FinancialRegulation.Tools.PublicData.QueryFundPay;
            temp.PaymentID    = SearchInfo.PaymentNum;
            // temp.BusinessCode = CurrentObj.BusinessCode;
            temp.PaymentAmount   = CurrentObj.PaymentAmount;
            temp.ReceiverAccount = CurrentObj.ReceiverAccount;
            temp.ReceiverName    = CurrentObj.ReceiverName;
            temp.ReceiveBank     = CurrentObj.ReceiverBankName;
            temp.PayAccount      = CurrentObj.PayerAccount;
            temp.PayName         = CurrentObj.PayerName;
            temp.PaymentBank     = CurrentObj.PayBank;
            temp.ProjectCode     = CurrentObj.ProjectID;
            // temp.DepositTime = DateTime.Parse(VMHelp.NowTime);
            temp.PaymentConfirmTime = DateTime.Parse(VMHelp.NowTime);
            temp.PayState           = Tools.PublicData.PayB;
            temp.BankSiteID         = VMHelp.PointCode;
            temp.BankTellerID       = VMHelp.UserCode;
            temp.PayID = VMHelp.GUID;
            deClient.Add(temp);
            OBModels.Add(temp);
            windowOK();
        }
        /// <summary>
        /// 查看特定对象 支付
        /// </summary>
        /// <param name="m">筛选实例</param>
        /// <returns>对象集合</returns>
        public ObservableCollection <FundPayment> Select(FundPayment m)
        {
            List <FundPayment> temp = service.Select(m).ToList <FundPayment>();
            ObservableCollection <FundPayment> oj = new ObservableCollection <FundPayment>();

            temp.ForEach(p => oj.Add(p));
            return(oj);
        }
 public ReverseTrade(FundPayment df, ObservableCollection <FundPayment> models)
 {
     InitializeComponent();
     ViewModel.ReverseTradeVM vm = new ViewModel.ReverseTradeVM(df, models);
     //vm.windowClose = CloseWindow;
     //vm.windowOK = OpenNewWindow;
     this.DataContext = vm;
 }
Ejemplo n.º 6
0
 public bool Update_DbAndPF(DayBalance db, FundPayment obj, RefundTrade rt)
 {
     BaseDao.SqlMap.BeginTransaction();
     daoPay.Update(obj);
     daort.Add(rt);
     daoday.Update(db);
     try
     {
         BaseDao.SqlMap.CommitTransaction();
         return(true);
     }
     catch
     {
         BaseDao.SqlMap.RollBackTransaction();
         return(false);
     }
 }
Ejemplo n.º 7
0
 public bool Update_DbAndPF(DayBalance db, FundPayment obj, int i)//1 代表添加 2 代表更新
 {
     BaseDao.SqlMap.BeginTransaction();
     if (i == 1)
     {
         daoPay.Add(obj);
     }
     else
     {
         daoPay.Update(obj);
     }
     daoday.Update(db);
     try
     {
         BaseDao.SqlMap.CommitTransaction();
         return(true);
     }
     catch
     {
         BaseDao.SqlMap.RollBackTransaction();
         return(false);
     }
 }
Ejemplo n.º 8
0
 public List <FundPayment> SelectJG_PaymentInterest(FundPayment o)
 {
     return(daoHelp.SelectJG_PaymentInterest(o) as List <FundPayment>);
 }
Ejemplo n.º 9
0
        /// <summary>
        /// 添加记录
        /// </summary>
        public override void OKExecute()
        {
            try
            {
                string strAskMessage = "付款凭证编号:" + PayResponse.PaymentID + "\r\n应支付款金额:" + PayResponse.PaymentAmount + "\r\n收款人账号:" + PayResponse.ReceiverAccount + "\r\n收款人名称:" + PayResponse.ReceiverName +
                                       "\r\n付款人账号:" + PayResponse.PayerAccount + "\r\n付款人名称:" + PayResponse.PayerName;
                if (Check() && VMHelp.AskMessage(strAskMessage + "\r\n确认进行存款?"))
                {
                    model  = new FundPayment();
                    model2 = new FundsRegulatoryClient.SqlTransSvr.FundPayment();
                    // model. = Guid.NewGuid().ToString();
                    model2.BusinessCode     = CurrentObj.BusinessCode = model.BusinessCode = FinancialRegulation.Tools.PublicData.FundPay; //交易代码
                    model2.BankCode         = CurrentObj.BankCode = model.BankCode = VMHelp.BankCode;
                    model2.PaymentAmount    = CurrentObj.PaymentAmount = model.PaymentAmount = PayResponse.PaymentAmount;                  //支付金额
                    model2.FirmOperatorName = model.FirmOperatorName = CurrentObj.FirmOperatorName;                                        //企业经办人
                    model2.FirmOperatorID   = model.FirmOperatorID = CurrentObj.FirmOperatorID;                                            //经办人证件号
                    model2.PaymentBank      = model.PaymentBank = CurrentObj.PaymentBank = VMHelp.BankName;                                //支付银行
                    model2.BankSiteID       = CurrentObj.BankSiteID = model.BankSiteID = VMHelp.PointCode;                                 //网点号
                    model2.BankSerialNumber = model.BankSerialNumber = BankSerialNumber;                                                   // 银行流水号
                    model2.SerialNumber     = model.SerialNumber = CurrentObj.SerialNumber = VMHelp.ServiceNo;                             //当前流水号
                    model2.BankTellerID     = CurrentObj.BankTellerID = model.BankTellerID = VMHelp.UserCode;                              //柜员号
                    model2.PaymentInstr     = model.PaymentInstr = CurrentObj.PaymentInstr;                                                //付款说明
                    model2.PayState         = model.PayState = Tools.PublicData.PayA;
                    model2.PaymentID        = model.PaymentID = CurrentObj.PaymentID = PayResponse.PaymentID;                              //支付凭证编号
                    model2.ReceiverAccount  = model.ReceiverAccount = PayResponse.ReceiverAccount;
                    model2.ReceiverName     = model.ReceiverName = PayResponse.ReceiverName;
                    model2.ReceiveBank      = model.ReceiveBank = PayResponse.ReceiverBankName;
                    model2.PayName          = model.PayName = PayResponse.PayerName;
                    model2.PayAccount       = model.PayAccount = PayResponse.PayerAccount;
                    model2.PaymentBank      = model.PaymentBank = PayResponse.PayBank;
                    model2.ProjectCode      = model.ProjectCode = PayResponse.ProjectID;
                    // model2.FirmName = model.FirmName = "";//公司名称
                    //model._DE_cklb = Tools.PublicData.Deposit_Lf;
                    //CurrentObj.BusinessTime = VMHelp.NowTime.ToString();

                    if (df != null)
                    {
                        model2.PayID       = model.PayID = df.PayID;
                        model2.PaymentTime = model.PaymentTime = DateTime.Parse(VMHelp.NowTime);//缴款日期
                    }
                    else
                    {
                        model2.PayID       = model.PayID = VMHelp.GUID;
                        model2.PaymentTime = model.PaymentTime = model.PaymentConfirmTime = DateTime.Parse(VMHelp.NowTime);//缴款日期
                    }
                    FundsRegulatoryClient.JG_AccountManageSrv.JG_AccountManageInfo ami = new FundsRegulatoryClient.JG_AccountManageSrv.JG_AccountManageInfo();
                    ami.AM_JgAccount = model.PayAccount;
                    ObservableCollection <FundsRegulatoryClient.JG_AccountManageSrv.JG_AccountManageInfo> acc = accountClient.Select(ami);
                    if (acc.Count < 1 || acc[0].AM_UseFlag == "销户")
                    {
                        VMHelp.ShowMessage("付款账户不存在或已销户", false);
                        return;
                    }
                    ////获取企业名称
                    model2.FirmName = model.FirmName = acc[0].AM_CorpName;
                    FundsRegulatoryClient.InterestService.DayBalance db = new FundsRegulatoryClient.InterestService.DayBalance();
                    db.DB_ID   = acc[0].AM_ID;
                    db.DB_Time = DateTime.Parse(DateTime.Now.ToShortDateString());
                    ObservableCollection <FundsRegulatoryClient.InterestService.DayBalance> dblist = new ObservableCollection <FundsRegulatoryClient.InterestService.DayBalance>();
                    dblist = InterestClient.SelectJG_DayBalanceInfo(db);
                    if (dblist.Count < 0)
                    {
                        VMHelp.ShowMessage("支付失败,数据无今日余额", false);
                        return;
                    }
                    if (dblist[0].DB_Balance < model.PaymentAmount)
                    {
                        VMHelp.ShowMessage("账户余额不足,无法支付", false);
                        return;
                    }
                    response = SendMessage <Response05>(CurrentObj, VMHelp.PointCode, VMHelp.UserCode);//发送Messageresponse.ReturnCode =="00"
                    if (response.ReturnCode == Tools.PublicData.ResponseSuccess || response.ReturnCode == Tools.PublicData.PaymentSuccess)
                    {
                        if (response.ReturnCode == Tools.PublicData.PaymentSuccess && !VMHelp.AskMessage("付款凭证已完成付款,是否存数据库?"))
                        {
                            return;
                        }
                        if (df != null)
                        {
                            FundsRegulatoryClient.SqlTransSvr.DayBalance temp = new FundsRegulatoryClient.SqlTransSvr.DayBalance();
                            temp.DB_Balance      = dblist[0].DB_Balance;
                            temp.DB_InterestRate = dblist[0].DB_InterestRate;
                            temp.DB_Balance      = temp.DB_Balance - model.PaymentAmount;
                            temp.ID      = dblist[0].ID;
                            temp.DB_ID   = acc[0].AM_ID;
                            temp.DB_Time = DateTime.Parse(DateTime.Now.ToShortDateString());
                            if (sqlTran.Update_DbAndPF(temp, model2, 2))
                            {
                                VMHelp.ShowMessage(true);//"付款凭证已经完成支付",
                                windowOK();
                            }
                            else
                            {
                                VMHelp.ShowMessage("操作失败原因:\r\n 1、支付表更新失败 \r\n 2、余额表更新失败", false);
                                return;
                            }
                        }
                        else
                        {
                            //if (dblist[0].DB_Balance < model.PaymentAmount)
                            //{
                            //    VMHelp.ShowMessage("账户余额不足,无法支付", false);
                            //    return;
                            //}
                            FundsRegulatoryClient.SqlTransSvr.DayBalance temp = new FundsRegulatoryClient.SqlTransSvr.DayBalance();
                            temp.DB_Balance      = dblist[0].DB_Balance;
                            temp.DB_InterestRate = dblist[0].DB_InterestRate;
                            temp.DB_Balance      = temp.DB_Balance - model.PaymentAmount;
                            temp.ID      = dblist[0].ID;
                            temp.DB_ID   = acc[0].AM_ID;
                            temp.DB_Time = DateTime.Parse(DateTime.Now.ToShortDateString());
                            if (sqlTran.Update_DbAndPF(temp, model2, 1))
                            {
                                VMHelp.ShowMessage(true);//"付款凭证已经完成支付",
                                windowOK();
                            }
                            else
                            {
                                VMHelp.ShowMessage("操作失败原因:\r\n 1、支付表添加失败 \r\n 2、余额表更新失败", false);
                                return;
                            }
                        }
                    }
                    else //if (response.ReturnCode == Tools.PublicData.PaymentFail)
                    {
                        VMHelp.ShowMessage("付款凭证不存在", false);
                    }
                }
            }
            catch (Exception e)
            {
                SendExcetpion(e);
            }
        }
Ejemplo n.º 10
0
 public PayInfoAddToEdit(Message.NewMessage.Response.Response04 DepositResponse, FundPayment df, ObservableCollection <FundPayment> models)
 {
     InitializeComponent();
     ViewModel.PayInfoAddToEditVM vm = new ViewModel.PayInfoAddToEditVM(DepositResponse, df, models);
     //vm.windowClose = CloseWindow;
     //vm.windowOK = OpenNewWindow;
     this.DataContext = vm;
 }
Ejemplo n.º 11
0
 public bool Add(FundPayment o)
 {
     return(daoHelp.Add(o));
 }
 /// <summary>
 /// 删除对象 支付
 /// </summary>
 /// <param name="m"></param>
 /// <returns>完成状态</returns>
 public bool Delete(FundPayment m)
 {
     return(service.Delete(m));
 }
 /// <summary>
 /// 更新对象 支付(利息支付)
 /// </summary>
 /// <param name="m">更新的对象</param>
 /// <returns>完成状态</returns>
 public bool UpPayMentInfoInterestById(FundPayment m)
 {
     return(service.UpPayMentInfoInterestById(m));
 }
 /// <summary>
 /// 更新对象 支付
 /// </summary>
 /// <param name="m">更新的对象</param>
 /// <returns>完成状态</returns>
 public bool Update(FundPayment m)
 {
     return(service.Update(m));
 }
 /// <summary>
 /// 添加对象 支付
 /// </summary>
 /// <param name="m"></param>
 /// <returns>完成状态</returns>
 public bool Add(FundPayment m)
 {
     return(service.Add(m));
 }
 /// <summary>
 /// 查看特定对象 利息支付
 /// </summary>
 /// <param name="m">筛选实例</param>
 /// <returns>对象集合</returns>
 public List <FundPayment> SelectJG_PaymentInterest(FundPayment m)
 {
     return(service.SelectJG_PaymentInterest(m).ToList <FundPayment>());
 }
Ejemplo n.º 17
0
 /// <summary>
 /// 更新每日余额和支付表的数据库事务
 /// </summary>
 /// <param name="db"></param>
 /// <param name="i"></param>
 /// <param name="obj"></param>
 /// <returns></returns>
 public bool Update_DbAndPF(FundsRegulatoryClient.SqlTransSvr.DayBalance db, FundPayment obj, int i)
 {
     return(service.Update_DbAndPF(db, obj, i));
 }
Ejemplo n.º 18
0
 public bool UpPayMentInfoInterestById(FundPayment o)
 {
     return(daoHelp.UpPayMentInfoInterestById(o));
 }
Ejemplo n.º 19
0
 public List <FundPayment> Select(FundPayment o)
 {
     return(daoHelp.Select(o) as List <FundPayment>);
 }
Ejemplo n.º 20
0
 public bool Delete(FundPayment o)
 {
     return(daoHelp.Delete(o));
 }
Ejemplo n.º 21
0
 public bool Update(FundPayment o)
 {
     return(daoHelp.Update(o));
 }
Ejemplo n.º 22
0
 public ReverseTradeVM(FundPayment df, ObservableCollection <FundPayment> Models)
 {
     this.ReverseResponse = new Response06();
     this.df     = df;
     this.Models = Models;
 }
Ejemplo n.º 23
0
        /// <summary>
        /// 更新当日余额,存款表状态,支付表状态,添加退票信息
        /// </summary>
        /// <returns></returns>
        private bool DayBalanceAndRefundAndState()
        {
            FundsRegulatoryClient.JG_AccountManageSrv.JG_AccountManageInfo ami = new FundsRegulatoryClient.JG_AccountManageSrv.JG_AccountManageInfo();
            FundsRegulatoryClient.JG_AccountManageClient accountClient         = FundsRegulatoryClient.JG_AccountManageClient.Instance;
            FundsRegulatoryClient.InterestManageClient   InterestClient        = FundsRegulatoryClient.InterestManageClient.Instance;
            //   FundsRegulatoryClient.RefundTradeClient refundClient=fun
            ami.AM_JgAccount = CurrentObj.AccountName;
            ObservableCollection <FundsRegulatoryClient.JG_AccountManageSrv.JG_AccountManageInfo> acc = accountClient.Select(ami);

            if (acc.Count < 1)
            {
                VMHelp.ShowMessage("账户不存在", false);
                return(false);
            }
            FundsRegulatoryClient.InterestService.DayBalance db    = new FundsRegulatoryClient.InterestService.DayBalance();
            FundsRegulatoryClient.SqlTransSvr.DayBalance     sqldb = new FundsRegulatoryClient.SqlTransSvr.DayBalance();
            sqldb.DB_ID = db.DB_ID = acc[0].AM_ID;
            //  db.DB_AccountNum = model.DepositAccount;
            sqldb.DB_Time = db.DB_Time = DateTime.Parse(DateTime.Now.ToShortDateString());
            ObservableCollection <FundsRegulatoryClient.InterestService.DayBalance> dblist = new ObservableCollection <FundsRegulatoryClient.InterestService.DayBalance>();

            dblist = InterestClient.SelectJG_DayBalanceInfo(db);
            if (dblist.Count > 0)
            {
                FundsRegulatoryClient.SqlTransSvr.RefundTrade temp = new FundsRegulatoryClient.SqlTransSvr.RefundTrade();
                // CurrentObj.ID = temp.ID = VMHelp.GUID;
                temp.BussinessCode       = FinancialRegulation.Tools.PublicData.Refund;
                temp.SerialNum           = VMHelp.ServiceNo;
                temp.BankCode            = VMHelp.BankCode;
                CurrentObj.Bankwebsite   = temp.Bankwebsite = VMHelp.PointCode;
                CurrentObj.AccountTeller = temp.AccountTeller = VMHelp.UserCode;
                CurrentObj.RefundTime    = temp.RefundTime = DateTime.Now;
                temp.AccountName         = CurrentObj.AccountName;
                temp.BankSerialNum       = CurrentObj.BankSerialNum;
                temp.PaymentID           = CurrentObj.PaymentID;
                temp.RefundInstr         = CurrentObj.RefundInstr;
                temp.RefundAmount        = CurrentObj.RefundAmount;
                temp.RT_Type             = RefundType;

                if (CurrentObj.BussinessCode == FinancialRegulation.Tools.PublicData.FundDeposit)
                {
                    sqldb.DB_Balance      = db.DB_Balance = dblist[0].DB_Balance;
                    sqldb.DB_InterestRate = db.DB_InterestRate = dblist[0].DB_InterestRate;
                    sqldb.DB_Balance      = db.DB_Balance = db.DB_Balance - CurrentObj.RefundAmount;
                    sqldb.ID = db.ID = dblist[0].ID;

                    temp.AccountID = acc[0].AM_ID;
                    DepositFund dftemp = (DepositFund)UpdatePayOrDeposit(1);
                    temp.ID = VMHelp.GUID;
                    if (sqlTran.Update_DbAndDF(sqldb, temp, dftemp))
                    {
                        return(true);
                    }
                    else
                    {
                        return(false);
                    }
                }
                else
                {
                    sqldb.DB_Balance      = db.DB_Balance = dblist[0].DB_Balance;
                    sqldb.DB_InterestRate = db.DB_InterestRate = dblist[0].DB_InterestRate;
                    sqldb.DB_Balance      = db.DB_Balance = db.DB_Balance + CurrentObj.RefundAmount;
                    sqldb.ID       = db.ID = dblist[0].ID;
                    temp.AccountID = acc[0].AM_ID;
                    FundPayment fptemp = (FundPayment)UpdatePayOrDeposit(2);
                    temp.ID = VMHelp.GUID;
                    if (sqlTran.Update_DbAndPF(sqldb, fptemp, temp))
                    {
                        return(true);
                    }
                    else
                    {
                        return(false);
                    }
                }
            }
            else
            {
                return(false);
            }
        }