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

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

        #endregion

        #region Input
		/// <summary>
        /// 参数清单
        /// </summary>
        public class Input : TFInput
        {
            /// <summary>
            /// 多电话 0250
            /// 多电话  
            /// </summary>
            public string DH { get; set; }

            /// <summary>
            /// 账号 0370
            ///  
            /// </summary>
            public string ZH { get; set; }

            /// <summary>
            /// 贷方限额 0410
            ///  
            /// </summary>
            public string DFXE { get; set; }

            /// <summary>
            /// 借方限额 0420
            ///  
            /// </summary>
            public string JFXE { get; set; }

            /// <summary>
            /// 收费标志 0690
            ///  
            /// </summary>
            public string SFBZ { get; set; }

            /// <summary>
            /// 账户类型 0710
            ///  
            /// </summary>
            public string ZHLX { get; set; }

            /// <summary>
            /// 操作方式 0720
            /// 0.开通1.修改2.注销 
            /// </summary>
            public string CZFS { get; set; }

            /// <summary>
            /// 服务类型 0860
            ///  
            /// </summary>
            public string FWLX { get; set; }


            /// <summary>                 
            /// 定义业务逻辑              
            /// </summary>                
            /// <returns></returns>  
            public override TFOutput Raise()
            {
                //拉取数据                                  
                var output = new MessageComprehensive();
                PageData.TradeAPIs.InitFd(MessageData);
                PageData.TradeAPIs.CommSend(MessageData);
				MessageData.Fd126_5 = MainCode;
                MessageData.Fd16 = "8891";
                MessageData.Fd25 = DH;
                MessageData.Fd37 = ZH;
                MessageData.Fd41 = DFXE;
                MessageData.Fd42 = JFXE;
                MessageData.Fd69 = SFBZ;
                MessageData.Fd71 = ZHLX;
                MessageData.Fd72 = CZFS;
                MessageData.Fd86 = FWLX;

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

                return output;
            }
        }
        #endregion
    }
}
