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

namespace TellerSystem.Contract.Function
{
    /// <summary>
    /// 客户综合签约
    /// 电话签约
    /// </summary>
    public class PhoneComprehensive : TFOutput
    {
        #region Output

        #endregion

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

            /// <summary>
            /// 签约标志 0670
            /// 0.签约2.解约3.重置密码4.修改密码 
            /// </summary>
            public string QYBZ { get; set; }

            /// <summary>
            /// 支取密码 0790
            ///  
            /// </summary>
            public string ZQMM { get; set; }

            /// <summary>
            /// 电话银行密码 0800
            ///  
            /// </summary>
            public string DHYHMM { get; set; }


            /// <summary>                 
            /// 定义业务逻辑              
            /// </summary>                
            /// <returns></returns>  
            public override TFOutput Raise()
            {
                //拉取数据                                  
                var output = new PhoneComprehensive();
                PageData.TradeAPIs.InitFd(MessageData);
                PageData.TradeAPIs.CommSend(MessageData);
				MessageData.Fd126_5 = MainCode;
                MessageData.Fd16 = "9316";
                MessageData.Fd37 = ZH;
                MessageData.Fd67 = QYBZ;
                MessageData.Fd79 = ZQMM;
                MessageData.Fd80 = DHYHMM;

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

                return output;
            }
        }
        #endregion
    }
}
