/// <summary> /// 设置特码个例 /// </summary> public void Set_Size(Globe_Clue item, List <Size_Special> Size_Special_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_Special size_Special = Size_Special_List.FirstOrDefault(g => g.Code == clue); if (size_Special != null) { Size_S Size_S = Size_S.GetBase(size_Special, pay); this.Size_S_List.Add(Size_S); } } } catch (Exception ex) { LogHelper.Error(ex); } }
public static decimal GetAward(string PrizeContent, Operation_Record record, List <Globe> Globe_List, List <Size_Special> Size_Special_List, ref List <Araw_Return_S> Araw_Return_Ss, ref List <string> NoAwardList, ref List <string> AwardList, ref int paytype) { decimal getdecimal = 0; try { List <Globe_S> globes = Globe_S.GetBase(record.Buy_Content, Globe_List, record.BuyPayReturn); List <Size_S> Size_Ss = Size_S.GetBase(record.Buy_Content2, Size_Special_List, record.BuyPayReturn2); var cont7 = PrizeContent.Length >= 7 ? Split_Hepler.str_to_stringss(PrizeContent)[6] : "0"; //特奖 int conti7 = Convert.ToInt32(cont7); if (!string.IsNullOrEmpty(record.Buy_Content)) { paytype = 0; List <int> contents = Split_Hepler.str_to_ints(record.Buy_Content).ToList(); if (contents.Contains(conti7)) { Globe_S globe_ss = globes.FirstOrDefault(i => i.Code == conti7); if (globe_ss != null) { getdecimal += (decimal)(globe_ss.PayReturn * record.UnitPrice); AwardList.Add(globe_ss.Name); } } } else if (!string.IsNullOrEmpty(record.Buy_Content2)) { paytype = 1; List <int> contents2 = Split_Hepler.str_to_ints(record.Buy_Content2).ToList(); foreach (var buycontent in contents2) { Size_S size_S = Size_Ss.FirstOrDefault(i => i.Code == buycontent); if (size_S.GlobeCodeList.Contains(conti7)) { //if (conti7 == 49 && size_S.IsEnable == (int)IsEnable.Enable) //{ // //使用和局 // Araw_Return_Ss.Add(new Araw_Return_S() { Name = size_S.Name, Araw_Money = (decimal)record.UnitPrice }); //} //else //{ getdecimal += (decimal)(size_S.PayReturn * record.UnitPrice); AwardList.Add(size_S.Name); //} } else { NoAwardList.Add(size_S.Name); } } } } catch (Exception ex) { LogHelper.Error(ex); } return(getdecimal); }