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

namespace TellerSystem.Contract.Function
{
    /// <summary>
    /// 返回印鉴卡号的关联情况
    /// 返回印鉴卡号的关联情况
    /// </summary>
    public class QuerySealCardLinkInfo : TFOutput
    {
        #region Output
        /// <summary>
        /// 标志 0710
        /// 0:无此印鉴卡 1:有 此印鉴卡2:异常
        /// </summary>
        public string BZ { get; internal set; }

        /// <summary>
        /// 户名 0250
        /// 户名
        /// </summary>
        public string HM { get; internal set; }

        /// <summary>
        /// 印鉴卡是否正确 0670
        /// 账号与印鉴卡是否关联：0:否 1:是
        /// </summary>
        public string SFZQ { get; internal set; }


        #endregion

        #region Input
		/// <summary>
        /// 参数清单
        /// </summary>
        public class Input : TFInput
        {
            /// <summary>
            /// 印鉴卡号 0610
            /// 必输 
            /// </summary>
            public string YJKH { get; set; }

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


            /// <summary>                 
            /// 定义业务逻辑              
            /// </summary>                
            /// <returns></returns>  
            public override TFOutput Raise()
            {
                //拉取数据                                  
                var output = new QuerySealCardLinkInfo();
                PageData.TradeAPIs.InitFd(MessageData);
                PageData.TradeAPIs.CommSend(MessageData);
				MessageData.Fd126_5 = MainCode;
                MessageData.Fd16 = "K046";
                MessageData.Fd61 = YJKH;
                MessageData.Fd30 = ZH;

                PageData.TradeAPIs.CallServer(MessageData);
                if (MessageData.Fd12 != "0000")
                {
                    output.IsFailed = true;
                    output.FailureCause = PageData.TradeAPIs.GetError(MessageData);
                }                
                output.BZ = (MessageData.Fd71);
                output.HM = (MessageData.Fd25);
                output.SFZQ = (MessageData.Fd67);

                return output;
            }
        }
        #endregion
    }
}
