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

namespace ChuPiao.Common.Utils
{
    /// <summary>
    /// 获得彩种和玩法哈希表
    /// </summary>
    public class LotPlayTypeHashTable
    {
        static LotPlayTypeHashTable()
        {
            //M_LotTypeService lottypeservice = new M_LotTypeService();
            //List<M_LotTypeEntity> lottypes = lottypeservice.GetLotTypeList();
            //if (null != lottypes)
            //{
            //    foreach (M_LotTypeEntity lottype in lottypes)
            //    {
            //        LotTypeHashTable.Add(lottype.L_LotId, lottype.L_LotName);
            //    }
            //}
            LotTypeHashTable.Add(911,"竞足");
            LotTypeHashTable.Add(951, "竞篮");
            LotTypeHashTable.Add(701, "大乐透");
            LotTypeHashTable.Add(601, "胜负彩");
            LotTypeHashTable.Add(503, "湖北11选5");
            LotTypeHashTable.Add(702, "排列3");
            LotTypeHashTable.Add(703, "排列5");
            LotTypeHashTable.Add(704, "7星彩");

            //M_PlayTypeService playtypeservice = new M_PlayTypeService();
            //List<M_PlayTypeEntity> playtypes = playtypeservice.GetPlayTypeList();
            //if (null != playtypes)
            //{
            //    foreach (M_PlayTypeEntity playtype in playtypes)
            //    {
            //        PlayTypeHashTable.Add(playtype.P_PlayId, playtype.P_PlayName);
            //    }
            //}
            PlayTypeHashTable.Add(91101,"让球胜平负");
            PlayTypeHashTable.Add(91102, "比分");
            PlayTypeHashTable.Add(91103, "总进球");
            PlayTypeHashTable.Add(91104, "半全场");
            PlayTypeHashTable.Add(91106, "胜平负");
            PlayTypeHashTable.Add(91199, "混合过关");

            PlayTypeHashTable.Add(95101, "让分胜负");
            PlayTypeHashTable.Add(95102, "胜负");
            PlayTypeHashTable.Add(95103, "胜分差");
            PlayTypeHashTable.Add(95104, "大小分");
            PlayTypeHashTable.Add(95199, "混合过关");

            PlayTypeHashTable.Add(70101, "单式");
            PlayTypeHashTable.Add(70102, "复式");
            PlayTypeHashTable.Add(70103, "胆拖");
            PlayTypeHashTable.Add(70111, "追加单式");
            PlayTypeHashTable.Add(70112, "追加复式");
            PlayTypeHashTable.Add(70113, "追加胆拖");

            PlayTypeHashTable.Add(60101, "14场单式");
            PlayTypeHashTable.Add(60102, "14场复式");
            PlayTypeHashTable.Add(60111, "任9单式");
            PlayTypeHashTable.Add(60112, "任9复式");

            //湖北11选5
            PlayTypeHashTable.Add(50302, "前2直选单式");
            PlayTypeHashTable.Add(50303, "前3直选单式");
            PlayTypeHashTable.Add(50312, "前2组选单式");
            PlayTypeHashTable.Add(50313, "前3组选单式");
            PlayTypeHashTable.Add(50322, "任选2单式");
            PlayTypeHashTable.Add(50323, "任选3单式");
            PlayTypeHashTable.Add(50324, "任选4单式");
            PlayTypeHashTable.Add(50325, "任选5单式");
            PlayTypeHashTable.Add(50326, "任选6单式");
            PlayTypeHashTable.Add(50327, "任选7单式");
            PlayTypeHashTable.Add(50328, "任选8单式");
            PlayTypeHashTable.Add(50332, "前2组选胆拖");
            PlayTypeHashTable.Add(50333, "前3组选胆拖");
            PlayTypeHashTable.Add(50342, "任选2胆拖");
            PlayTypeHashTable.Add(50343, "任选3胆拖");
            PlayTypeHashTable.Add(50344, "任选4胆拖");
            PlayTypeHashTable.Add(50345, "任选5胆拖");
            PlayTypeHashTable.Add(50346, "任选6胆拖");
            PlayTypeHashTable.Add(50347, "任选7胆拖");
            PlayTypeHashTable.Add(50351, "前1直选复式");
            PlayTypeHashTable.Add(50352, "前2直选复式");
            PlayTypeHashTable.Add(50353, "前3直选复式");
            PlayTypeHashTable.Add(50362, "前2组选复式");
            PlayTypeHashTable.Add(50363, "前3组选复式");
            PlayTypeHashTable.Add(50372, "任选2复式");
            PlayTypeHashTable.Add(50373, "任选3复式");
            PlayTypeHashTable.Add(50374, "任选4复式");
            PlayTypeHashTable.Add(50375, "任选5复式");
            PlayTypeHashTable.Add(50376, "任选6复式");
            PlayTypeHashTable.Add(50377, "任选7复式");

            //排列三
            PlayTypeHashTable.Add(70201, "直选单式");
            PlayTypeHashTable.Add(70202, "直选复式"); 
            //PlayTypeHashTable.Add(70203, "直选和值");
            //PlayTypeHashTable.Add(70204, "直选组合胆拖");
            //PlayTypeHashTable.Add(70205, "直选跨度");
            //PlayTypeHashTable.Add(70206, "直选组合复式");
            PlayTypeHashTable.Add(70211, "组3单式");
            PlayTypeHashTable.Add(70212, "组3复式");
            //PlayTypeHashTable.Add(70213, "组3和值");
            //PlayTypeHashTable.Add(70214, "组3胆拖");
            //PlayTypeHashTable.Add(70215, "组3跨度");
            PlayTypeHashTable.Add(70221, "组6单式");
            PlayTypeHashTable.Add(70222, "组6复式");
            //PlayTypeHashTable.Add(70223, "组6和值");
            //PlayTypeHashTable.Add(70224, "组6胆拖");
            //PlayTypeHashTable.Add(70225, "组6跨度");
            //PlayTypeHashTable.Add(70232, "组选和值");

            PlayTypeHashTable.Add(70401, "单式");
            PlayTypeHashTable.Add(70402, "复式");
        }
        /// <summary>
        /// 彩种哈希表
        /// </summary>
        public static Hashtable LotTypeHashTable = new Hashtable();

        /// <summary>
        /// 玩法哈希表
        /// </summary>
        public static Hashtable PlayTypeHashTable = new Hashtable();

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

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