Esempio n. 1
0
        public static decimal GetAward(Globe_Clue clue, string PrizeContent, Operation_Record record, List <Globe> Globe_List, List <Size_SpecialNormal> 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_NormalS> Size_Normals = Size_NormalS.GetBase(record.Buy_Content2, Size_Special_List, record.BuyPayReturn2);
                var cont1_6 = PrizeContent.Length >= 7 ? Split_Hepler.str_to_stringss(PrizeContent)[(int)clue.Second_Type - 1] : "0";
                //特奖
                int conti1_6 = Convert.ToInt32(cont1_6);

                if (!string.IsNullOrEmpty(record.Buy_Content))
                {
                    paytype = 0;
                    List <int> contents = Split_Hepler.str_to_ints(record.Buy_Content).ToList();
                    if (contents.Contains(conti1_6))
                    {
                        Globe_S globe_ss = globes.FirstOrDefault(i => i.Code == conti1_6);
                        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_NormalS size_NormalS = Size_Normals.FirstOrDefault(i => i.Code == buycontent);
                        if (size_NormalS.GlobeCodeList.Contains(conti1_6))
                        {
                            //if (conti1_6 == 49 && size_NormalS.IsEnable == (int)IsEnable.Enable)
                            //{
                            //    //使用和局
                            //    Araw_Return_Ss.Add(new Araw_Return_S() { Name = size_NormalS.Name, Araw_Money = (decimal)record.UnitPrice });
                            //}
                            //else
                            //{
                            getdecimal += (decimal)(size_NormalS.PayReturn * record.UnitPrice);
                            AwardList.Add(size_NormalS.Name);
                            //}
                        }
                        else
                        {
                            NoAwardList.Add(size_NormalS.Name);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                LogHelper.Error(ex);
            }
            return(getdecimal);
        }
Esempio n. 2
0
        public static void SetContent(Globe_Clue clue, Operation_Record_S item)
        {
            try
            {
                GlobeClueType GlobeClueType = (GlobeClueType)clue.First_Type;
                switch (GlobeClueType)
                {
                case GlobeClueType.Special:
                    item.BuyDisplay     = Globe_S.GetBase_Str(item.Buy_Content, Constant.Globe_List);
                    item.FirstGlobeList = Globe_S.GetBase(item.Buy_Content, Constant.Globe_List);
                    item.FirstIsGloble  = true;
                    item.BuyDisplay2    = Size_S.GetBase_Str(item.Buy_Content2, Constant.Size_Special_List);
                    break;

                case GlobeClueType.Normal:
                    item.BuyDisplay     = Globe_S.GetBase_Str(item.Buy_Content, Constant.Globe_List);
                    item.FirstGlobeList = Globe_S.GetBase(item.Buy_Content, Constant.Globe_List);
                    item.FirstIsGloble  = true;
                    break;

                case GlobeClueType.SpecialNormal:
                    item.BuyDisplay     = Globe_S.GetBase_Str(item.Buy_Content, Constant.Globe_List);
                    item.FirstGlobeList = Globe_S.GetBase(item.Buy_Content, Constant.Globe_List);
                    item.FirstIsGloble  = true;
                    item.BuyDisplay2    = Size_NormalS.GetBase_Str(item.Buy_Content2, Constant.Size_SpecialNormal_List);
                    break;

                case GlobeClueType.NormalSix:
                    item.BuyDisplay = Size_Six_S.GetBase_Str(item.Buy_Content, Constant.Size_Six_List);
                    break;

                case GlobeClueType.Line:
                    item.BuyDisplay     = Globe_S.GetBase_Str(item.Buy_Content, Constant.Globe_List);
                    item.FirstGlobeList = Globe_S.GetBase(item.Buy_Content, Constant.Globe_List);
                    item.FirstIsGloble  = true;
                    break;

                case GlobeClueType.Wave:
                    item.BuyDisplay = Wave_S.GetBase_Str(item.Buy_Content, Constant.Wave_List);
                    break;

                case GlobeClueType.Detail:
                    item.BuyDisplay  = Animal_Info_S.GetBase_Str(item.Buy_Content, Constant.Animal_Info_List);
                    item.BuyDisplay2 = Detail_S.GetBase_Str(item.Buy_Content2, Constant.Detail_List);
                    break;

                case GlobeClueType.SpecialAnimal:
                    item.BuyDisplay = Animal_Info_S.GetBase_Str(item.Buy_Content, Constant.Animal_Info_List);
                    break;

                case GlobeClueType.CombineAnimal:
                    item.BuyDisplay = Animal_Info_S.GetBase_Str(item.Buy_Content, Constant.Animal_Info_List);
                    break;

                case GlobeClueType.LineAnimal:
                    item.BuyDisplay = Animal_Info_S.GetBase_Str(item.Buy_Content, Constant.Animal_Info_List);
                    break;

                case GlobeClueType.LineDetail:
                    item.BuyDisplay = Detail_S.GetBase_Str(item.Buy_Content, Constant.Detail_List);
                    break;

                case GlobeClueType.NotAll:
                    item.BuyDisplay     = Globe_S.GetBase_Str(item.Buy_Content, Constant.Globe_List);
                    item.FirstGlobeList = Globe_S.GetBase(item.Buy_Content, Constant.Globe_List);
                    item.FirstIsGloble  = true;
                    break;

                default:
                    break;
                }
            }
            catch (Exception ex)
            {
                LogHelper.Error(ex);
            }
        }