public static bool GetCurRule(string gameID, out int Coin, out bool AllowOut, out bool AllowIn, out bool AllowZKZY) { Coin = 0; AllowOut = false; AllowIn = false; AllowZKZY = false; try { var clist = 当前规则.Where(p => p.游戏机编号 == gameID); if (clist.Count() > 0) { 当前游戏机投币规则 cRule = clist.First(); Coin = cRule.扣币数量; AllowOut = cRule.允许退币; AllowIn = cRule.允许投币; AllowZKZY = cRule.是否开启卡片专卡专用; } return(true); } catch (Exception ex) { LogHelper.WriteLog(ex); } return(false); }
static void SetCurRule(string gameID, int Coin, bool AllowOut, bool AllowIn, bool AllowZKZY) { try { var clist = 当前规则.Where(p => p.游戏机编号 == gameID); if (clist.Count() == 0) { 当前游戏机投币规则 cRule = new 当前游戏机投币规则(); cRule.扣币数量 = Coin; cRule.游戏机编号 = gameID; cRule.允许退币 = AllowOut; cRule.允许投币 = AllowIn; cRule.是否开启卡片专卡专用 = AllowZKZY; 当前规则.Add(cRule); } else { 当前游戏机投币规则 cRule = clist.First(); cRule.允许退币 = AllowOut; cRule.允许投币 = AllowIn; cRule.扣币数量 = Coin; cRule.是否开启卡片专卡专用 = AllowZKZY; } } catch (Exception ex) { LogHelper.WriteLog(ex); } }