示例#1
0
        /// <summary>
        /// 获取LotteryEnum中彩种的数量
        /// </summary>
        /// <returns></returns>
        public static List <Lottery> GetLotteryList()
        {
            Type             type      = typeof(LotteryEnum);
            List <FieldInfo> fieldInfo = type.GetFields().ToList();

            return((from f in fieldInfo
                    select new Lottery
            {
                create_time = DateTime.Now,
                name = ModelFunction.GetLotteryName(f.Name),
                code = f.Name
            }).ToList());
        }
示例#2
0
 /// <summary>
 /// 获取彩种名称
 /// </summary>
 /// <param name="result"></param>
 /// <returns></returns>
 public static string LotteryName(this OpenResult result)
 {
     return(ModelFunction.GetLotteryName(result.lottery_code));
 }