using System;
using System.Collections.Generic;
using System.Text;
using ChuPiao.Common.Model;
using System.Collections;

namespace ChuPiao.Common.Utils
{
    /// <summary>
    /// 获得彩票机彩种、玩法和投注模式哈希表
    /// </summary>
    public class MacLotPlayModeTypeHashTable
    {
        static MacLotPlayModeTypeHashTable()
        {
            //M_MacLotTypeService maclottypeservice = new M_MacLotTypeService();
            //List<M_MacLotTypeEntity> lots = maclottypeservice.GetMacLotTypeList();
            //if (null != lots && lots.Count > 0)
            //{
            //    foreach (M_MacLotTypeEntity lot in lots)
            //    {
            //        MacLotTypeHashTable.Add(lot.L_MacLotId, lot.L_MacLotName);
            //    }
            //}

            //M_MacPlayTypeService macplaytypeservice = new M_MacPlayTypeService();
            //List<M_MacPlayTypeEntity> plays = macplaytypeservice.GetMacPlayTypeList();
            //if (null != plays && plays.Count > 0)
            //{
            //    foreach (M_MacPlayTypeEntity play in plays)
            //    {
            //        MacPlayTypeHashTable.Add(play.P_MacPlayId, play.P_MacPlayName);
            //    }
            //}

            //M_MacModeTypeService macmodeservice = new M_MacModeTypeService();
            //List<M_MacModeTypeEntity> modes = macmodeservice.GetMacModeTypeList();
            //if (null != modes && modes.Count > 0)
            //{
            //    foreach (M_MacModeTypeEntity mode in modes)
            //    {
            //        MacModeTypeHashTable.Add(mode.T_MacModeId, mode.T_MacModeName);
            //    }
            //}
        }


        /// <summary>
        /// 彩票机彩种哈希表
        /// </summary>
        public static Hashtable MacLotTypeHashTable = new Hashtable();

        /// <summary>
        /// 彩票机玩法哈希表
        /// </summary>
        public static Hashtable MacPlayTypeHashTable = new Hashtable();

        /// <summary>
        /// 彩票机投注模式哈希表
        /// </summary>
        public static Hashtable MacModeTypeHashTable = new Hashtable();

        /// <summary>
        /// 根据彩票机彩种ID获得名称
        /// </summary>
        /// <param name="lotid">彩票机彩种ID</param>
        /// <returns></returns>
        public static string GetMacLotTypeName(int maclotid)
        {
            if (MacLotTypeHashTable.Contains(maclotid))
            {
                return MacLotTypeHashTable[maclotid].ToString();
            }
            else
            {
                return "";
            }
        }

        /// <summary>
        /// 根据彩票机玩法ID获得名称
        /// </summary>
        /// <param name="playid">彩票机玩法ID</param>
        /// <returns></returns>
        public static string GetMacPlayTypeName(int macplayid)
        {
            if (MacPlayTypeHashTable.Contains(macplayid))
            {
                return MacPlayTypeHashTable[macplayid].ToString();
            }
            else
            {
                return "";
            }
        }

        /// <summary>
        /// 根据彩票机模式ID获得名称
        /// </summary>
        /// <param name="playid">彩票机模式ID</param>
        /// <returns></returns>
        public static string GetMacModeTypeName(int macmodeid)
        {
            if (MacModeTypeHashTable.Contains(macmodeid))
            {
                return MacModeTypeHashTable[macmodeid].ToString();
            }
            else
            {
                return "";
            }
        }
    }
}
