using Business.WF; using Cache; using Common; using KJH55128_Rec.ViewModels; using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace KJH55128_Rec.Business.WF { public class WFApiBLL { static WFApiBLL() { } public static PalyRuleModel GetPlayRule(string lottery, string lotterytype) { PalyRuleModel model = new PalyRuleModel(); try { var datatiem = AppCtrl.GetObj().GetTJDataCache().GetDataItemModelCache(); string id = datatiem.FirstOrDefault(d => d.ItemValue == lottery).ItemDetailId; var data = PlayRuleBLL.GetAwardByPrizeID(id); if (data == null || string.IsNullOrWhiteSpace(data.ItemName)) { model.LotteryName = AppCtrl.GetObj().GetLotteryCache().GetLotteryType().FirstOrDefault(d => d.TypeCode == lotterytype).Name; } else { model.LotteryName = data.ItemName; model.Gameplay = data.Gameplay; model.LotteryRule = data.LotteryRule; model.LotteryTime = data.LotteryTime; model.Winning = data.Winning; } } catch (Exception ee) { LogHelper.Error(typeof(ZXApiBLL), ee.Message + "GetPlayRule"); } return model; } } }