using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TellerSystem.Library.Ext.TradeExtension;
using System.Windows.Media;

namespace TellerSystem.Contract.ContractBase
{
    /// <summary>
    /// 交易基础信息的访问辅助类
    /// </summary>
    public class TradeInfoHelper
    {
        #region ctor & Property
        public TradeInfoHelper(PageBase page)
        {
            Page = page;
            _tradeInfoData = TradeInfoData.GetTradeInfo(Page);
        }
        public PageBase Page { get; private set; }
        private TradeInfoData _tradeInfoData;
        #endregion

        #region 交易属性
        /// <summary>
        /// 柜员前端流水号
        /// </summary>
        public string SerialNumber
        {
            get { return _tradeInfoData.SerialNumber; }
        }
        /// <summary>
        /// 系统前端流水号
        /// </summary>
        public string SystemSerialNumber
        {
            get { return _tradeInfoData.SystemSerialNumber; }
        }

        /// <summary>
        /// 打印票号
        /// </summary>
        public string PrintNum
        {
            get { return _tradeInfoData.PrintNum; }
        }
        /// <summary>
        /// 交易号，指代一个完整的业务流程
        /// </summary>
        public string TradeCode
        {
            get { return _tradeInfoData.TradeCode; }
        }
        /// <summary>
        /// 交易名称，指代一个完整的业务流程
        /// </summary>
        public string TradeName
        {
            get { return _tradeInfoData.TradeName; }
        }
        /// <summary>
        /// 交易截图 modify by hulei  20190116
        /// </summary>
        public Dictionary<string, List<ImageSource>> TradeScreens
        {
            set
            {
                _tradeInfoData.TradeScreens = value;
            }
            get { return _tradeInfoData.TradeScreens; }
        }
        /// <summary>
        /// 主交易提交代码
        /// </summary>
        public string MainCode
        {
            get
            {
                return _tradeInfoData.TradeBus["MainCode"];
            }
            set
            {
                _tradeInfoData.TradeBus["MainCode"] = value;
            }
        }
        #endregion
    }
}
