Beispiel #1
0
        public static List <Size_Six_S> GetBase(string globes, List <Size_Six> Size_Six_List, string pays)
        {
            List <Size_Six_S> list = new List <Size_Six_S>();

            try
            {
                if (!string.IsNullOrEmpty(globes) && !string.IsNullOrEmpty(pays))
                {
                    string[] globeArray = globes.Split(new char[] { ',' });
                    string[] payArray   = pays.Split(new char[] { ',' });
                    for (int i = 0; i < globeArray.Length; i++)
                    {
                        int      clue  = Convert.ToInt32(globeArray[i]);
                        decimal  pay   = Convert.ToDecimal(payArray[i]);
                        Size_Six globe = Size_Six_List.FirstOrDefault(g => g.Code == clue);
                        list.Add(Size_Six_S.GetBase(globe, (float)pay));
                    }
                }
            }
            catch (Exception ex)
            {
                LogHelper.Error(ex);
            }

            return(list);
        }
Beispiel #2
0
        public static Size_Six_S GetBase(Size_Six item, float pay)
        {
            Size_Six_S Size_Six_S = new Size_Six_S()
            {
                Id            = item.Id,
                Code          = item.Code,
                GlobeCodeList = Split_Hepler.str_to_ints(item.Globe),
                IsEnable      = item.IsEnable,
                Name          = item.Name,
                PayReturn     = pay,
                Award_Globe   = item.Award_Globe
            };

            return(Size_Six_S);
        }
Beispiel #3
0
 /// <summary>
 /// 设置6系
 /// </summary>
 public void Set_SizeSix(Globe_Clue item, List <Size_Six> Size_Six_List)
 {
     try
     {
         string[] globe_clues = item.Clue.Split(new char[] { ',' });
         string[] globe_pays  = item.Pay.Split(new char[] { ',' });
         for (int i = 0; i < globe_clues.Length; i++)
         {
             int      clue     = Convert.ToInt32(globe_clues[i]);
             Size_Six Size_Six = Size_Six_List.FirstOrDefault(g => g.Code == clue);
             if (Size_Six != null)
             {
                 float      pay        = float.Parse(globe_pays[i]);
                 Size_Six_S Size_Six_S = Size_Six_S.GetBase(Size_Six, pay);
                 this.Size_Six_S_List.Add(Size_Six_S);
             }
         }
     }
     catch (Exception ex)
     {
         LogHelper.Error(ex);
     }
 }
Beispiel #4
0
        public static string GetBase_Str(string globes, List <Size_Six> Size_Six_List)
        {
            string content = string.Empty;

            try
            {
                if (!string.IsNullOrEmpty(globes))
                {
                    string[] globeArray = globes.Split(new char[] { ',' });
                    for (int i = 0; i < globeArray.Length; i++)
                    {
                        int      clue  = Convert.ToInt32(globeArray[i]);
                        Size_Six globe = Size_Six_List.FirstOrDefault(g => g.Code == clue);
                        content += globe.Name + ",";
                    }
                }
            }
            catch (Exception ex)
            {
                LogHelper.Error(ex);
            }

            return(content);
        }