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

namespace TellerSystem.Contract.Function
{
    /// <summary>
    /// 查询介质属性信息
    /// 通过介质代码查询介质属性
    /// </summary>
    public class QueryMediaAttributeInformation : TFOutput
    {
        #region Output
        /// <summary>
        /// 介质级别 0210
        /// (null)
        /// </summary>
        public string JZJB { get; internal set; }

        /// <summary>
        /// 是否单账户介质 0670
        /// Y是 N否
        /// </summary>
        public string SFDZHJZ { get; internal set; }

        /// <summary>
        /// 是否打印存折 0680
        /// Y是 N否
        /// </summary>
        public string SFDYCZ { get; internal set; }

        /// <summary>
        /// 卡种类 0690
        /// 0普通卡 1联名卡 2专用卡
        /// </summary>
        public string KZL { get; internal set; }

        /// <summary>
        /// 卡是否为记名卡 0700
        /// Y记名卡 N非记名卡
        /// </summary>
        public string KSFWJMK { get; internal set; }

        /// <summary>
        /// 是否允许开附属卡/子卡 0710
        /// Y允许,表示为主卡卡种;N不允许,表示为附属卡种
        /// </summary>
        public string SFYXKFSKZK { get; internal set; }

        /// <summary>
        /// 是否必须先开活期主账户  0720
        /// Y是 N否 
        /// </summary>
        public string SFBXXKZZH { get; internal set; }

        /// <summary>
        /// 凭证种类 0890
        /// (null)
        /// </summary>
        public string PZZL { get; internal set; }

        /// <summary>
        /// 是否有支取密码 1152
        /// Y必须有 N必须无 O随意
        /// </summary>
        public string SFYZQMM { get; internal set; }

        /// <summary>
        /// 是否可凭证件支取 1155
        /// Y必须有 N必须无 O随意
        /// </summary>
        public string SFKPZJZQ { get; internal set; }

        /// <summary>
        /// 是否必须用支付密码器 115A
        /// Y必须有 N必须无 O随意
        /// </summary>
        public string SFBXYZFMMQ { get; internal set; }

        /// <summary>
        /// 介质名称 1166
        /// (null)
        /// </summary>
        public string JZMC { get; internal set; }

        /// <summary>
        /// 介质类型 1169
        /// 1存折类 2存单类 3磁条卡类 4IC卡类 5复合卡类 6其他
        /// </summary>
        public string JZLX { get; internal set; }

      
        


        #endregion

        #region Input
		/// <summary>
        /// 参数清单
        /// </summary>
        public class Input : TFInput
        {
            /// <summary>
            /// 介质代码 1161
            /// (null) 
            /// </summary>
            public string JZDM { get; set; }


            /// <summary>                 
            /// 定义业务逻辑              
            /// </summary>                
            /// <returns></returns>  
            public override TFOutput Raise()
            {
                //拉取数据                                  
                var output = new QueryMediaAttributeInformation();
                PageData.TradeAPIs.InitFd(MessageData);
                PageData.TradeAPIs.CommSend(MessageData);
				MessageData.Fd126_5 = MainCode;
                MessageData.Fd16 = "K037";
                MessageData.Fd116_1 = JZDM;

                PageData.TradeAPIs.CallServer(MessageData);
                if (MessageData.Fd12 != "0000")
                {
                    output.IsFailed = true;
                    output.FailureCause = PageData.TradeAPIs.GetError(MessageData);
                }                
                output.JZJB = DelSpace(MessageData.Fd21);
                output.SFDZHJZ = DelSpace(MessageData.Fd67);
                output.SFDYCZ = DelSpace(MessageData.Fd68);
                output.KZL = DelSpace(MessageData.Fd69);
                output.KSFWJMK = DelSpace(MessageData.Fd70);
                output.SFYXKFSKZK = DelSpace(MessageData.Fd71);
                output.SFBXXKZZH = DelSpace(MessageData.Fd72);
                output.PZZL = DelSpace(MessageData.Fd89);
                output.SFYZQMM = DelSpace(MessageData.Fd115_2);
                output.SFKPZJZQ = DelSpace(MessageData.Fd115_5);
                output.SFBXYZFMMQ = DelSpace(MessageData.Fd115_A);
                output.JZMC = DelSpace(MessageData.Fd116_6);
                output.JZLX = DelSpace(MessageData.Fd116_9);
               

                return output;
            }
        }
        #endregion
    }
}
