Esempio n. 1
0
        public void DelGameType(WelfareLotteryGameType type)
        {
            entities.WelfareLotteryGameTypes.Remove(type);
            LoginedUserInfo u = Tools.GetLoginedUserInfo();

            entities.Logs.Add(new Log
            {
                UGuid    = u.UGuid,
                Username = u.UName,
                Memo     = $"删除编号为【{type.Id}】-名称为【{type.GameType}】的福彩游戏类型",
                OptType  = (int)OptType.除,
                OptTime  = System.DateTime.Now
            });
            entities.SaveChanges();
        }
Esempio n. 2
0
        public void AddGameType(WelfareLotteryGameType welfareLotteryGameType)
        {
            entities.WelfareLotteryGameTypes.Add(welfareLotteryGameType);

            LoginedUserInfo u = Tools.GetLoginedUserInfo();

            entities.SaveChanges();
            entities.Logs.Add(new Log
            {
                UGuid    = u.UGuid,
                Username = u.UName,
                Memo     = $"新增编号为【{welfareLotteryGameType.Id}】的福彩游戏类型",
                OptType  = (int)OptType.新增,
                OptTime  = System.DateTime.Now
            });
            entities.SaveChanges();
        }
Esempio n. 3
0
        public void EditGameType(WelfareLotteryGameType type)
        {
            WelfareLotteryGameType welfare = entities.WelfareLotteryGameTypes.FirstOrDefault(p => p.Id == type.Id);

            if (welfare == null)
            {
                return;
            }
            welfare.GameType = type.GameType;
            welfare.Rebate   = type.Rebate;
            LoginedUserInfo u = Tools.GetLoginedUserInfo();

            entities.Logs.Add(new Log
            {
                UGuid    = u.UGuid,
                Username = u.UName,
                Memo     = $"编辑编号为【{type.Id}】的福彩游戏类型",
                OptType  = (int)OptType.修改,
                OptTime  = System.DateTime.Now
            });
            entities.SaveChanges();
        }