コード例 #1
0
 /// <summary>
 /// 添加记录
 /// </summary>
 public override void OKExecute()
 {
     try
     {
         FundsRegulatoryClient.SqlTransSvr.FundPayment fptemp = new FundsRegulatoryClient.SqlTransSvr.FundPayment();
         string strAskMessage = "付款凭证编号:" + df.PaymentID + "\r\n应支付款金额:" + df.PaymentAmount + "\r\n收款人账号:" + df.ReceiverAccount + "\r\n收款人名称:" + df.ReceiverName +
                                "\r\n付款人账号:" + df.PayAccount + "\r\n付款人名称:" + df.PayName;
         if (VMHelp.AskMessage(strAskMessage + "\r\n确认进行冲正?"))
         {
             fptemp.BusinessCode     = CurrentObj.BusinessCode = FinancialRegulation.Tools.PublicData.ReverseFund;
             fptemp.PaymentID        = CurrentObj.PaymentID = df.PaymentID;
             fptemp.BankSerialNumber = CurrentObj.ReverseSerialNum = df.SerialNumber;//本系统产生的流水号
             fptemp.ReceiveBank      = CurrentObj.ReverseBank = df.PaymentBank;
             fptemp.BankSiteID       = CurrentObj.BankSiteID = df.BankSiteID;
             fptemp.BankTellerID     = CurrentObj.BankTellerID = df.BankTellerID;
             fptemp.PayID            = df.PayID;
             fptemp.FirmName         = df.FirmName;
             CurrentObj.BankCode     = df.BankCode;
             CurrentObj.ReverseType  = Tools.PublicData.ReversePay;//支付冲正
             response = SendMessage <Response06>(CurrentObj, VMHelp.PointCode, VMHelp.UserCode);
             if (response.ReturnCode != Tools.PublicData.ResponseSuccess)
             {
                 VMHelp.ShowMessage(HelpClass.Current.MsgDIC[response.ReturnCode], false); return;
             }
             fptemp.PayState     = df.PayState = Tools.PublicData.ReverseA;
             fptemp.ReverseTime  = df.ReverseTime = DateTime.Now;
             fptemp.ReverseInstr = df.ReverseInstr = CurrentObj.ReverseInstr;
             fptemp.BankSiteID   = VMHelp.PointCode;
             fptemp.BankTellerID = VMHelp.UserCode;
             fptemp.BusinessCode = df.BusinessCode = FinancialRegulation.Tools.PublicData.ReverseFund;
             // fptemp.PayID = df.PayID;
             //if (!deClient.Update(df))
             //{
             //    VMHelp.ShowMessage("支付数据更新失败",false);
             //    return;
             //}
             FundsRegulatoryClient.JG_AccountManageSrv.JG_AccountManageInfo ami = new FundsRegulatoryClient.JG_AccountManageSrv.JG_AccountManageInfo();
             ami.AM_JgAccount = df.PayAccount;
             ObservableCollection <FundsRegulatoryClient.JG_AccountManageSrv.JG_AccountManageInfo> acc = accountClient.Select(ami);
             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 < 1)
             {
                 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 + df.PaymentAmount;
             temp.ID      = dblist[0].ID;
             temp.DB_ID   = acc[0].AM_ID;
             temp.DB_Time = DateTime.Parse(DateTime.Now.ToShortDateString());
             if (!TranClient.Update_DbAndPF(temp, fptemp, 2))
             {
                 VMHelp.ShowMessage("失败原因:\r\n 1、支付表状态更新失败 \r\n 2、当日余额更新失败", false);
                 return;
             }
             //if (!InterestClient.UpdateJG_DayBalanceInfo(db))
             //{
             //    VMHelp.ShowMessage("今日余额更新失败", false);
             //    return;
             //}
             VMHelp.ShowMessage(true);
             windowOK();
         }
     }
     catch (Exception e)
     {
         SendExcetpion(e);
     }
 }
コード例 #2
0
        /// <summary>
        /// 添加记录
        /// </summary>
        public override void OKExecute()
        {
            try
            {
                string strAskMessage = "缴款凭证编号:" + DepositResponse.DepositID + "\r\n缴款类型:" + VMHelp.GetMoneyType(DepositResponse.DepositType) + "\r\n缴款金额:" + DepositResponse.DepositAmount + "\r\n购房人名称:" + DepositResponse.PurchaserName + "\r\n购房人证件号:" + DepositResponse.PurchaserID;
                if (Check() && VMHelp.AskMessage(strAskMessage + "\r\n确认进行存款?"))
                {
                    model  = new FundsRegulatoryClient.SqlTransSvr.DepositFund();
                    model2 = new DepositFund();
                    // model. = Guid.NewGuid().ToString();
                    model2.BusinessCode  = CurrentObj.BusinessCode = model.BusinessCode = FinancialRegulation.Tools.PublicData.FundDeposit; //交易代码
                    model2.BankCode      = CurrentObj.BankCode = model.BankCode = VMHelp.BankCode;                                          //银行代码
                    model2.DepositNum    = CurrentObj.DepositID = model.DepositNum = DepositResponse.DepositID;                             //缴款凭证编号
                    model2.DepositType   = model.DepositType = DepositResponse.DepositType;                                                 //缴款类型
                    model2.DepositAmount = CurrentObj.DepositAmount = model.DepositAmount = DepositResponse.DepositAmount;                  //缴款金额
                    model2.PurchaserName = CurrentObj.PurchaserName = model.PurchaserName = DepositResponse.PurchaserName;                  //购房人名称
                    model2.PurchaserID   = CurrentObj.PurchaserID = model.PurchaserID = DepositResponse.PurchaserID;                        //购房人证件号

                    model2.BankSiteID     = CurrentObj.BankSiteID = model.BankSiteID = VMHelp.PointCode;                                    //网点号
                    model2.DeSerialNumber = model.DeSerialNumber = BankSerialNumber;                                                        // VMHelp.ServiceNo;//银行流水号
                    model2.SerialNumber   = model.SerialNumber = CurrentObj.SerialNumber = VMHelp.ServiceNo;                                //当前系统流水号
                    model2.BankTellerID   = CurrentObj.BankTellerID = model.BankTellerID = VMHelp.UserCode;                                 //柜员号
                    model2.BankName       = model.BankName = VMHelp.BankName;                                                               //银行名称
                    model2.FirmName       = model.FirmName = DepositResponse.FirmName;
                    model2.DepositAccount = model.DepositAccount = DepositResponse.DepositAccount;
                    model2.ProjectCode    = model.ProjectCode = DepositResponse.ProjectCode;
                    model2.DepositInstr   = model.DepositInstr = CurrentObj.DepositInstr;//缴款说明
                    model2.DepositState   = model.DepositState = Tools.PublicData.DepositA;
                    //model._DE_cklb = Tools.PublicData.Deposit_Lf;
                    //CurrentObj.BusinessTime = VMHelp.NowTime.ToString();
                    CurrentObj.BankName = VMHelp.BankName;//缴款银行名称
                    if (df != null)
                    {
                        model2.ID          = model.ID = df.ID;
                        model2.DepositTime = model.DepositTime = DateTime.Parse(VMHelp.NowTime);//缴款日期
                    }
                    else
                    {
                        model2.ID          = model.ID = VMHelp.GUID;
                        model2.DepositTime = model.CheckTime = model.DepositTime = DateTime.Parse(VMHelp.NowTime);//缴款日期
                    }
                    FundsRegulatoryClient.JG_AccountManageSrv.JG_AccountManageInfo ami = new FundsRegulatoryClient.JG_AccountManageSrv.JG_AccountManageInfo();
                    ami.AM_JgAccount = model.DepositAccount;
                    ObservableCollection <FundsRegulatoryClient.JG_AccountManageSrv.JG_AccountManageInfo> acc = accountClient.Select(ami);
                    if (acc.Count < 1 || acc[0].AM_UseFlag == "销户")
                    {
                        VMHelp.ShowMessage("缴款失败,缴存账户不存在或已销户", false);
                        return;
                    }
                    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 < 1)
                    {
                        VMHelp.ShowMessage("缴款失败,余额表无当日余额", false);
                        return;
                    }
                    response = SendMessage <Response03>(CurrentObj, VMHelp.PointCode, VMHelp.UserCode);//发送Messageresponse.ReturnCode =="03"

                    if (response.ReturnCode == Tools.PublicData.ResponseSuccess || response.ReturnCode == Tools.PublicData.DepositSuccess)
                    {
                        if (response.ReturnCode == Tools.PublicData.DepositSuccess && !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.DepositAmount;
                            temp.ID      = dblist[0].ID;
                            temp.DB_ID   = acc[0].AM_ID;
                            temp.DB_Time = DateTime.Parse(DateTime.Now.ToShortDateString());

                            if (!TranClient.Update_DbAndDF(temp, model, 2))
                            {
                                VMHelp.ShowMessage("错误原因:\r\n 1、存款信息插入失败  \r\n 2、当日余额更新失败", false);
                                return;
                            }
                            //this.Models.Remove(df);
                            //this.Models.Add(model2);
                            VMHelp.ShowMessage(true);
                            windowOK();
                        }
                        else
                        {
                            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.DepositAmount;
                            temp.ID      = dblist[0].ID;
                            temp.DB_ID   = acc[0].AM_ID;
                            temp.DB_Time = DateTime.Parse(DateTime.Now.ToShortDateString());
                            if (!TranClient.Update_DbAndDF(temp, model, 1))
                            {
                                VMHelp.ShowMessage("错误原因:\r\n 1、存款信息插入失败  \r\n 2、当日余额更新失败", false);
                                return;
                            }

                            VMHelp.ShowMessage(true);
                            windowOK();
                        }
                    }
                    else //if (response.ReturnCode == Tools.PublicData.DepositFail)
                    {
                        VMHelp.ShowMessage("缴款书不存在", false);
                    }
                }
            }
            catch (Exception e)
            {
                SendExcetpion(e);
            }
        }
コード例 #3
0
        public override void OKExecute()
        {
            try
            {
                if (ExecuteCode == 1)
                {
                    CurrentObj.UB_ID           = VMHelp.GUID;
                    CurrentObj.UB_SerialNum    = VMHelp.ServiceNo;
                    CurrentObj.UB_BankCode     = VMHelp.BankCode;
                    CurrentObj.UB_BankSiteID   = VMHelp.PointCode;
                    CurrentObj.UB_BankTellerID = VMHelp.UserCode;
                    FundsRegulatoryClient.JG_AccountManageClient accountClient         = FundsRegulatoryClient.JG_AccountManageClient.Instance;
                    FundsRegulatoryClient.JG_AccountManageSrv.JG_AccountManageInfo ami = new FundsRegulatoryClient.JG_AccountManageSrv.JG_AccountManageInfo();
                    ami.AM_JgAccount = CurrentObj.UB_ManageAccount;
                    ObservableCollection <FundsRegulatoryClient.JG_AccountManageSrv.JG_AccountManageInfo> acc = accountClient.Select(ami);
                    if (acc.Count < 1 || acc[0].AM_UseFlag == "销户")
                    {
                        VMHelp.ShowMessage("缴款失败,缴存账户不存在或已销户", false);
                        return;
                    }
                    if (Check() && deClient.AddUnKownJG_Deposit(CurrentObj))
                    {
                        this.Models.Add(CurrentObj);
                        VMHelp.ShowMessage(true);
                        windowClose();
                    }
                }
                else
                {
                    if (Check() && deClient.UpdateUnKownJG_Deposit(CurrentObj))
                    {
                        VMHelp.ShowMessage(true);
                        windowOK();
                    }
                }

                /*  try
                 * {
                 *    switch (Model._DE_ckxz)
                 *    {
                 *        case "1":
                 *            NatureOfFunding = "非贷款";
                 *            break;
                 *        case "2":
                 *            NatureOfFunding = "商业贷款";
                 *            break;
                 *        case "3":
                 *            NatureOfFunding = "公积金贷款";
                 *            break;
                 *        default:
                 *            break;
                 *    }
                 *    //string strAskMessage = "合同备案号:" + Model._DE_qybh + "\r\n存款人:" + Model._DE_ckr + "\r\n存款金额:" + Model._DE_ckje + "\r\n资金性质:" + NatureOfFunding + "\r\n账户余额:" + CurrentObj.Balances;
                 *    string strAskMessage = "合同备案号:" + Model._DE_qybh + "\r\n存款人:" + Model._DE_ckr + "\r\n存款金额:" + Model._DE_ckje + "\r\n资金性质:" + NatureOfFunding ;
                 *    if (Check() && VMHelp.AskMessage(strAskMessage+"\r\n确定要补录不明存款?"))
                 *    {
                 *        if (response == null)
                 *        {
                 *            CurrentObj.BusinessCode = "112";
                 *            CurrentObj.BusinessTime = VMHelp.NowTime;
                 *            CurrentObj.SerialNo = VMHelp.ServiceNo;
                 *            CurrentObj.PactNo = Model._DE_xybh;
                 *            CurrentObj.FormerNo = Model._DE_cklsh;
                 *            CurrentObj.ContractRecordNo = Model._DE_qybh;
                 *            CurrentObj.Depositor = Model._DE_ckr;
                 *            CurrentObj.Money = Model._DE_ckje.Value;
                 *            CurrentObj.NatureOfFunding = Model._DE_ckxz;
                 *            CurrentObj.FromBbank = VMHelp.BankCode;
                 *            CurrentObj.Balances = Model._DE_zhye.Value;
                 *            CurrentObj.CRCCode = VMHelp.CRCCode;
                 *        }
                 *      //  response = SendMessage<Message.Message012>(CurrentObj);
                 *        if (response != null && response.ExceptionCode == "01")
                 *        {
                 *            Model._DE_BankCode = VMHelp.PointCode;
                 *            bool result = deClient.Update(Model);
                 *
                 *            if (result)
                 *            {
                 *                VMHelp.ShowMessage(true);
                 *                windowClose();
                 *            }
                 *            else
                 *            {
                 *                VMHelp.ShowMessage(false);
                 *            }
                 *        }
                 *        else
                 *        {
                 *            VMHelp.ShowMessage(response.ExceptionMessage, false);
                 *        }
                 *    }
                 * }
                 * catch (Exception ex)
                 * {
                 *    VMHelp.ShowMessage(ex.Message, false);
                 * }*/
            }
            catch (Exception e)
            {
                SendExcetpion(e);
            }
        }
コード例 #4
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);
            }
        }
コード例 #5
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);
            }
        }
コード例 #6
0
        /// <summary>
        /// 添加记录
        /// </summary>
        public override void OKExecute()
        {
            try
            {
                FundsRegulatoryClient.SqlTransSvr.DepositFund dftemp = new FundsRegulatoryClient.SqlTransSvr.DepositFund();
                string strAskMessage = "缴款凭证编号:" + df.DepositNum + "\r\n缴款类型:" + VMHelp.GetMoneyType(df.DepositType) + "\r\n缴款金额:" + df.DepositAmount + "\r\n购房人名称:" + df.PurchaserName + "\r\n购房人证件号:" + df.PurchaserID;
                if (VMHelp.AskMessage(strAskMessage + "\r\n确认进行冲正?"))
                {
                    dftemp.BusinessCode    = CurrentObj.BusinessCode = FinancialRegulation.Tools.PublicData.ReverseFund;
                    dftemp.DepositNum      = CurrentObj.PaymentID = df.DepositNum;
                    dftemp.DeSerialNumber  = CurrentObj.ReverseSerialNum = df.SerialNumber;//本系统产生的流水号
                    dftemp.BankName        = CurrentObj.ReverseBank = df.BankName;
                    dftemp.FirmName        = df.FirmName;
                    dftemp.BankSiteID      = CurrentObj.BankSiteID = df.BankSiteID;
                    dftemp.BankTellerID    = CurrentObj.BankTellerID = df.BankTellerID;
                    dftemp.ID              = df.ID;
                    dftemp.BankSiteID      = VMHelp.PointCode;
                    dftemp.BankTellerID    = VMHelp.UserCode;
                    CurrentObj.BankCode    = df.BankCode;
                    CurrentObj.ReverseType = Tools.PublicData.ReverseDeposit;                           //存款冲正
                    response = SendMessage <Response06>(CurrentObj, VMHelp.PointCode, VMHelp.UserCode); //发送Messageresponse.ReturnCode =="03"
                    //if (response.ReturnCode != Tools.PublicData.ResponseSuccess && response.ReturnCode == Tools.PublicData.ReverseSucces)
                    //{ VMHelp.ShowMessage("原交易不存在无法冲正", false); return; }
                    //if (response.ReturnCode == Tools.PublicData.DepositSuccess && !VMHelp.AskMessage("缴款书已完成缴费,是否存数据库?"))
                    //{
                    //    return;
                    //}
                    //返回码为失败时
                    if (response.ReturnCode != Tools.PublicData.ResponseSuccess)
                    {
                        VMHelp.ShowMessage(HelpClass.Current.MsgDIC[response.ReturnCode], false); return;
                    }

                    dftemp.DepositState = df.DepositState = Tools.PublicData.ReverseA;
                    dftemp.ReverseTime  = df.ReverseTime = DateTime.Now;
                    dftemp.ReverseInstr = df.ReverseInstr = CurrentObj.ReverseInstr;
                    dftemp.BusinessCode = df.BusinessCode = FinancialRegulation.Tools.PublicData.ReverseFund;

                    FundsRegulatoryClient.JG_AccountManageSrv.JG_AccountManageInfo ami = new FundsRegulatoryClient.JG_AccountManageSrv.JG_AccountManageInfo();
                    ami.AM_JgAccount = df.DepositAccount;
                    ObservableCollection <FundsRegulatoryClient.JG_AccountManageSrv.JG_AccountManageInfo> acc = accountClient.Select(ami);
                    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 < 1)
                    {
                        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 - df.DepositAmount;
                    temp.ID      = dblist[0].ID;
                    temp.DB_ID   = acc[0].AM_ID;
                    temp.DB_Time = DateTime.Parse(DateTime.Now.ToShortDateString());
                    if (!TranClient.Update_DbAndDF(temp, dftemp, 2))
                    {
                        VMHelp.ShowMessage("失败原因:\r\n 1、存款表状态更新失败 \r\n 2、当日余额更新失败", false);
                        return;
                    }
                    VMHelp.ShowMessage(true);
                    windowOK();
                }
            }
            catch (Exception e)
            {
                SendExcetpion(e);
            }
        }