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

namespace TellerSystem.Contract.Function
{
    /// <summary>
    /// 根据账号查询分户信息
    /// 根据账号查询分户信息
    /// </summary>
    public class QueryAccountFHList : TFOutput
    {
        #region Output
        /// <summary>
        /// 内容列表
        /// 存款：账号|账户序号|户名|余额|开户机构|产品名称|开户日期|账户类型|，内部帐：账号|户名|产品名称|余额|账户类型|，贷款：账号|序号|户名|产品名称|余额|账户类型|
        /// </summary>
        public string NRLB { get; internal set; }


        #endregion

        #region Input
		/// <summary>
        /// 参数清单
        /// </summary>
        public class Input : TFInput
        {
            /// <summary>
            /// 账号 0380
            ///  
            /// </summary>
            public string ZH { get; set; }

            /// <summary>
            /// 查询标志 0690
            /// 1存款2内部3贷款 
            /// </summary>
            public string CXBZ { get; set; }


            /// <summary>                 
            /// 定义业务逻辑              
            /// </summary>                
            /// <returns></returns>  
            public override TFOutput Raise()
            {
                //拉取数据                                  
                var output = new QueryAccountFHList();
                PageData.TradeAPIs.InitFd(MessageData);
                PageData.TradeAPIs.CommSend(MessageData);
				MessageData.Fd126_5 = MainCode;
                MessageData.Fd16 = "CXCL";
                MessageData.Fd38 = ZH;
                MessageData.Fd69 = CXBZ;

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

                return output;
            }
        }
        #endregion
    }
}
