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

namespace TellerSystem.Contract.Function
{
    /// <summary>
    /// 账户支付密码器关联查询
    /// 账户支付密码器关联查询
    /// </summary>
    public class QueryAccountPayment : TFOutput
    {
        #region Output
        /// <summary>
        /// 文件格式
        /// 带前台文件格式datatable：账号|支付密码器编号|本行标志|状态|关联日期|解除日期|机构|柜员|
        /// </summary>
        public string WJGS { get; internal set; }


        #endregion

        #region Input
		/// <summary>
        /// 参数清单
        /// </summary>
        public class Input : TFInput
        {
            /// <summary>
            /// 解除日期-结束 0470
            ///  
            /// </summary>
            public string DateEnd_JC { get; set; }

            /// <summary>
            /// 支付密码器编码 0580
            ///  
            /// </summary>
            public string ZFMMQBM { get; set; }

            /// <summary>
            /// 本行标志 0670
            ///  
            /// </summary>
            public string BHBZ { get; set; }

            /// <summary>
            /// 解除日期-开始 0460
            ///  
            /// </summary>
            public string DateStart_JC { get; set; }

            /// <summary>
            /// 账号 0300
            ///  
            /// </summary>
            public string ZH { get; set; }

            /// <summary>
            /// 关联日期-开始 0440
            ///  
            /// </summary>
            public string DateStart_GL { get; set; }

            /// <summary>
            /// 关联日期-结束 0450
            ///  
            /// </summary>
            public string DateEnd_GL { get; set; }

            /// <summary>
            /// 关联状态 0680
            ///  
            /// </summary>
            public string GLZT { get; set; }


            /// <summary>                 
            /// 定义业务逻辑              
            /// </summary>                
            /// <returns></returns>  
            public override TFOutput Raise()
            {
                //拉取数据                                  
                var output = new QueryAccountPayment();
                PageData.TradeAPIs.InitFd(MessageData);
                PageData.TradeAPIs.CommSend(MessageData);
				MessageData.Fd126_5 = MainCode;
                MessageData.Fd16 = "CXCL";
                MessageData.Fd47 = DateEnd_JC;
                MessageData.Fd58 = ZFMMQBM;
                MessageData.Fd67 = BHBZ;
                MessageData.Fd46 = DateStart_JC;
                MessageData.Fd30 = ZH;
                MessageData.Fd44 = DateStart_GL;
                MessageData.Fd45 = DateEnd_GL;
                MessageData.Fd68 = GLZT;
                MessageData.Fd128 = "0078";

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

                return output;
            }
        }
        #endregion
    }
}
