示例#1
0
        public static List <Size_NormalS> GetBase(string globes, List <Size_SpecialNormal> Item_List, string pays)
        {
            List <Size_NormalS> list = new List <Size_NormalS>();

            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_SpecialNormal globe = Item_List.FirstOrDefault(g => g.Code == clue);
                        list.Add(Size_NormalS.GetBase(globe, (float)pay));
                    }
                }
            }
            catch (Exception ex)
            {
                LogHelper.Error(ex);
            }

            return(list);
        }
示例#2
0
        /// <summary>
        /// 设置正码个例
        /// </summary>
        public void Set_SizeNormal(Globe_Clue item, List <Size_SpecialNormal> Size_SpecialNormal_List)
        {
            try
            {
                string[] globe_clues2 = item.Clue2.Split(new char[] { ',' });
                string[] globe_pays2  = item.Pay2.Split(new char[] { ',' });
                for (int i = 0; i < globe_clues2.Length; i++)
                {
                    int   clue = Convert.ToInt32(globe_clues2[i]);
                    float pay  = float.Parse(globe_pays2[i]);

                    Size_SpecialNormal size_Special = Size_SpecialNormal_List.FirstOrDefault(g => g.Code == clue);
                    if (size_Special != null)
                    {
                        Size_NormalS Size_NormalS = Size_NormalS.GetBase(size_Special, pay);
                        this.Size_NormalS_List.Add(Size_NormalS);
                    }
                }
            }
            catch (Exception ex)
            {
                LogHelper.Error(ex);
            }
        }