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

namespace TellerSystem.Contract.Function
{
    /// <summary>
    /// 查询账户扣划利息
    /// 通过账号查询账户扣划未提取利息
    /// </summary>
    public class CheckAccountDeducInterest : TFOutput
    {
        #region Output
        /// <summary>
        /// 未提扣划利息 0400
        /// (null)
        /// </summary>
        public string WTKHLX { get; internal set; }

        /// <summary>
        /// 有扣划利息的扣划记录笔数 0500
        /// 
        /// </summary>
        public string YJLBS { get; internal set; }

        /// <summary>
        /// 扣划记录总笔数 0510
        /// 
        /// </summary>
        public string KHZBS { get; internal set; }


        #endregion

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

            /// <summary>
            /// 账户序号 0340
            /// (null) 
            /// </summary>
            public string ZHXH { get; set; }


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

                PageData.TradeAPIs.CallServer(MessageData);
                if (MessageData.Fd12 != "0000")
                {
                    output.IsFailed = true;
                    output.FailureCause = PageData.TradeAPIs.GetError(MessageData);
                }                
                output.WTKHLX = (MessageData.Fd40);
                output.YJLBS = (MessageData.Fd50);
                output.KHZBS = (MessageData.Fd51);

                return output;
            }
        }
        #endregion
    }
}
