private InterBankDeleteAcctInfo GetModel(bool isAdd)
        {
            InterBankDeleteAcctInfo info = new InterBankDeleteAcctInfo();
            //info.ACCOUNT_DATE = DateTime.Parse(会计日期.Text);
            info.AMOUNT = double.Parse(交易金额.Text);
            //info.APPROVE_ORGNAZTION = 审批机构.Text;
            //info.APPROVE_TELLER = "8010130";
            //info.HANDLE_ORGNAZTION = 经办机构.Text;
            //info.HANDLE_TELLER = "8010130";
            info.TERM_TYPE = 业务类型.Text == "1"? AidTypeDefine.INTER_BANK_BIZ_TERM_TYPE.Current : AidTypeDefine.INTER_BANK_BIZ_TERM_TYPE.Fixed;
            info.NOTICE_NO = 通知单编号.Text;
            info.OPERATION_TYPE = isAdd ? AidTypeDefine.INTER_BANK_OPERATION_TYPE.CreateNew : AidTypeDefine.INTER_BANK_OPERATION_TYPE.Cancel;
            //info.TELLER_NO = 柜员号.Text;
            //info.TRADE_DATE = DateTime.Parse(业务交易日.Text);
            //info.TRADE_ORGNAZTION = 机构号.Text;
            info.ACCOUNT = 账号.Text;
            info.INTEREST_ACCOUNT = 收息账号.Text.Trim();
            info.INTEREST = double.Parse(利息金额.Text);
            info.NOTICE_TYPE = 通知单类型.Text == "2" ? AidTypeDefine.INTER_BANK_NOTICE_TYPE.DeleteAccount : AidTypeDefine.INTER_BANK_NOTICE_TYPE.PartWithdraw;

            info.DETAILS=new List<InterestAccrualInfo>();
            info.DETAILS = GetDetailInfos();
            //InterestAccrualInfo detail=new InterestAccrualInfo();
            //detail.CHARGE_NUMBER = double.Parse(积数1.Text);
            //detail.INTEREST = double.Parse(利息1.Text);
            //detail.MATURITY_DATE = DateTime.Parse(到期日期1.Text);
            //detail.RATE = double.Parse(利率1.Text);
            //detail.VALUE_DATE = DateTime.Parse(起息日期1.Text);
            //info.DETAILS.Add(detail);

            return info;
        }
        /// <summary>
        /// 活期定期销户、部提
        /// </summary>
        /// <param name="info"></param>
        /// <param name="outmsg"></param>
        /// <returns></returns>
        public static RegularResult InterBankDeleteAccountOrExtract(string orgID, string tellerNO, DateTime tradeDate, InterBankDeleteAcctInfo info)
        {
            string outmsg = "";
            bool isOk = ClientSyncHelper.OnDeleteAccount(orgID, tellerNO, tradeDate, info, out outmsg);
            if (!isOk)
            {
                outmsg = string.Format("{0}{1}", MsgHandlerEntry.Info_Return_Core, outmsg);
            }

            return new RegularResult(isOk, outmsg);
        }
        /// <summary>
        /// 活期定期开户撤销
        /// </summary>
        /// <param name="info"></param>
        /// <param name="outmsg"></param>
        /// <returns></returns>
        internal static bool OnDeleteAccount(string orgID, string tellerNO, DateTime tradeDate, InterBankDeleteAcctInfo info, out string outmsg)
        {
            outmsg = "";
            byte[] codemsg = null;
            bool sent = false;
            string dbexception = "";
            MessageData reqdata = null;
            MessageData recdata = null;
            Guid msgid = Guid.Empty;
            try
            {
                msgid = MsgTransferUtility.DeleteAccount(orgID, tellerNO, tradeDate, info, ref codemsg);
                reqdata = MsgHandlerEntry.CreateMessageData(msgid, PlatformType.Core, tellerNO, orgID, (int)MessageBizType.CoreInterBankDeleteAccount, codemsg, info.NOTICE_NO);
#if MQSYNC
                recdata = MQMsgHandlerEntry.DeliverMessage(reqdata, codemsg, out sent);
#else
                recdata = MsgHandlerEntry.DeliverMessage(MsgHandlerEntry.CreateMessageData(msgid, PlatformType.Core, codemsg));
#endif

                InterBankDeleteAcctData data = MsgTransfer.DecodeMsg(recdata.MessageID, recdata.CurrentRespPackage.PackageMessage) as InterBankDeleteAcctData;
                if (data != null)
                {
                    if (!String.IsNullOrEmpty(data.SyserrHandler.Message))
                    {
                        outmsg = data.SyserrHandler.Message;
                    }
                    else
                    {
                        outmsg = MsgHandlerEntry.ExtractOMsg(data);
                    }

                    if (string.IsNullOrEmpty(outmsg) || outmsg.Trim() == "")
                        return true;
                }
                else
                {
                    outmsg = MsgHandlerEntry.Type_Convert_Error;
                }

                OnUpdateDBLog(recdata.MessageID, outmsg, MsgLogState.RecvFailed, out dbexception);
                return false;
            }
            catch (Exception ex)
            {
                outmsg = ex.Message;
                OnException(sent, reqdata, recdata, msgid, ex, outmsg);
                return false;
            }
        } 
        /// <summary>
        /// 活期定期销户
        /// </summary>
        /// <param name="info"></param>
        /// <param name="codemsg"></param>
        /// <returns></returns>
        public static Guid DeleteAccount(string orgID, string tellerNO, DateTime tradeDate, InterBankDeleteAcctInfo info, ref byte[] codemsg)
        {
            InterBankDeleteAcctData data = new InterBankDeleteAcctData();

            data.RQhdrHandler.SYS_TXID = "415661"; // 新增,主机启动原交易码
            data.RQhdrHandler.TX_OUNO = orgID;
            data.RQhdrHandler.TEL_ID = tellerNO;
            data.RQhdrHandler.TX_MODE = "0";
            data.RQhdrHandler.TX_DTE = tradeDate.ToString("yyyy-MM-dd");
            data.RQhdrHandler.SRV_JNO = CommonDataHelper.SpaceString(12);
            data.RQhdrHandler.SRV_REV_JNO = CommonDataHelper.SpaceString(12);
            data.RQhdrHandler.HOST_JNO = CommonDataHelper.SpaceString(11);

            data.RQDTL.OPERATE_TYPE = ((int)info.OPERATION_TYPE).ToString();
            data.RQDTL.ACCOUNT_DATE = tradeDate.ToString("yyyyMMdd");
            data.RQDTL.NOTICE_NO = info.NOTICE_NO;
            data.RQDTL.NOTICE_TYPE = ((int)info.NOTICE_TYPE).ToString();
            data.RQDTL.BUSINESS_TYPE = ((int)info.TERM_TYPE).ToString();
            if (info.OPERATION_TYPE == AidTypeDefine.INTER_BANK_OPERATION_TYPE.CreateNew)
            {
                data.RQDTL.HANDLE_ORGNAZTION = string.IsNullOrEmpty(info.OPERATE_ORGANIZATION) ? orgID : info.OPERATE_ORGANIZATION;
                data.RQDTL.APPROVE_ORGNAZTION = orgID;
                data.RQDTL.ACCOUNT = info.ACCOUNT;
                data.RQDTL.INTEREST_ACCOUNT = info.INTEREST_ACCOUNT;
                data.RQDTL.AMOUNT = info.AMOUNT;
                data.RQDTL.INTEREST = info.INTEREST;
                data.RQDTL.HANDLE_TELLER = tellerNO;
                data.RQDTL.APPROVE_TELLER = tellerNO;

                data.RQDTL.DETAILS = new List<DetailInfo>();
                foreach (var item in info.DETAILS)
                {
                    DetailInfo detailInfo = new DetailInfo();
                    detailInfo.VALUE_DATE = item.VALUE_DATE.ToString("yyyyMMdd");
                    detailInfo.MATURITY_DATE = item.MATURITY_DATE.ToString("yyyyMMdd");
                    detailInfo.RATE = item.RATE;
                    detailInfo.CHARGE_NUMBER = item.CHARGE_NUMBER;
                    detailInfo.INTEREST = item.INTEREST;
                    data.RQDTL.DETAILS.Add(detailInfo);
                }
                data.RQDTL.DETAIL_NUMBER = info.DETAILS.Count;
                for (int i = 0; i < (data.RQDTL.AIStruct_WIDTH - info.DETAILS.Count); i++)
                {
                    DetailInfo detailInfo = new DetailInfo();                    
                    data.RQDTL.DETAILS.Add(detailInfo);
                }
            }

            return MsgTransfer.CodeMsgToBinary(data, ref codemsg);
        }