public void UpdatePlayerScreenLog(PlayerScreenLog playerscreenlog)
 {
     db.Entry(playerscreenlog).State = EntityState.Modified;
     db.SaveChanges();
 }
Esempio n. 2
0
        public int PlayerScreenLog_Create(int accountid, int playerid, string playername, int screenid, string screenname,
                                            DateTime displaydatetime, DateTime closedatetime, string screendetails)
        {
            try
            {
                IPlayerScreenLogRepository playerscreenlogrep = new EntityPlayerScreenLogRepository();

                PlayerScreenLog playerscreenlog = new PlayerScreenLog();
                playerscreenlog.AccountID = accountid;
                playerscreenlog.PlayerID = playerid;
                playerscreenlog.PlayerName = playername;
                playerscreenlog.ScreenID = screenid;
                playerscreenlog.ScreenName = screenname;
                playerscreenlog.DisplayDateTime = displaydatetime;
                playerscreenlog.CloseDateTime = closedatetime;
                playerscreenlog.ScreenDetails = screendetails;

                playerscreenlogrep.CreatePlayerScreenLog(playerscreenlog);

                return playerscreenlog.PlayerScreenLogID;
            }
            catch { return 0; }
        }
 public void CreatePlayerScreenLog(PlayerScreenLog playerscreenlog)
 {
     db.PlayerScreenLogs.Add(playerscreenlog);
     db.SaveChanges();
 }