using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace TellerSystem.Contract.Function
{
    /// <summary>
    /// 对公活期销户条件查询
    /// 根据对公活期账户查询关联支票数量是否符合销户条件并返回转开账户数量
    /// </summary>
    public class QueryDGHQXHTJ : TFOutput
    {
        #region Output
        /// <summary>
        /// 转开定期户数量 0510
        /// 
        /// </summary>
        public string ZDSL { get; internal set; }


        #endregion

        #region Input
		/// <summary>
        /// 参数清单
        /// </summary>
        public class Input : TFInput
        {
            /// <summary>
            /// 活期账号 0300
            ///  
            /// </summary>
            public string HQZH { get; set; }

            /// <summary>
            /// 活期序号 0340
            ///  
            /// </summary>
            public string HQXH { get; set; }


            /// <summary>                 
            /// 定义业务逻辑              
            /// </summary>                
            /// <returns></returns>  
            public override TFOutput Raise()
            {
                //拉取数据                                  
                var output = new QueryDGHQXHTJ();
                PageData.TradeAPIs.InitFd(MessageData);
                PageData.TradeAPIs.CommSend(MessageData);
				MessageData.Fd126_5 = MainCode;
                MessageData.Fd16 = "K068";
                MessageData.Fd30 = HQZH;
                MessageData.Fd34 = HQXH;

                PageData.TradeAPIs.CallServer(MessageData);
                if (MessageData.Fd12 != "0000")
                {
                    output.IsFailed = true;
                    output.FailureCause = PageData.TradeAPIs.GetError(MessageData);
                }                
                output.ZDSL = (MessageData.Fd51);

                return output;
            }
        }
        #endregion
    }
}
