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

namespace TellerSystem.Contract.Function
{
    /// <summary>
    /// 卡折校验磁道信息
    /// 卡折校验磁道信息
    /// </summary>
    public class QueryCardMsrInfo : TFOutput
    {
        #region Output

        #endregion

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

            /// <summary>
            /// 校验方式 0670
            ///  1 卡检查2磁道  2 卡检查3磁道  3 卡检查2磁道cvn  4 卡、折检查所有磁道  5 卡核对3磁道cvn  
            /// </summary>
            public string JYFS { get; set; }

            /// <summary>
            /// 2磁道信息 0750
            ///  
            /// </summary>
            public string MSR2 { get; set; }

            /// <summary>
            /// 3磁道信息 0760
            ///  
            /// </summary>
            public string MSR3 { get; set; }


            /// <summary>                 
            /// 定义业务逻辑              
            /// </summary>                
            /// <returns></returns>  
            public override TFOutput Raise()
            {
                //拉取数据                                  
                var output = new QueryCardMsrInfo();
                PageData.TradeAPIs.InitFd(MessageData);
                PageData.TradeAPIs.CommSend(MessageData);
				MessageData.Fd126_5 = MainCode;
                MessageData.Fd16 = "K049";
                MessageData.Fd30 = ZH;
                MessageData.Fd67 = JYFS;
                MessageData.Fd75 = MSR2;
                MessageData.Fd76 = MSR3;

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

                return output;
            }
        }
        #endregion
    }
}
