Example #1
0
        public ActionResult DavetEt(int DavetEdilenId, int oyunId)
        {
            lobbys lobby = new lobbys();

            lobby.userAl  = db.user.Find(DavetEdilenId);
            lobby.userGon = db.user.Find(int.Parse(Session["id"].ToString()));
            lobby.status  = 0;
            lobby.date    = DateTime.Now;
            lobby.game    = db.game.Find(oyunId);

            db.lobby.Add(lobby);
            db.SaveChanges();
            if (oyunId == 1)
            {
                return(RedirectToAction("SearchLol"));
            }
            else if (oyunId == 2)
            {
                return(RedirectToAction("Search"));
            }
            else
            {
                return(RedirectToAction("Index"));
            }
        }
Example #2
0
        public ActionResult DavetStatu(int lobbyId, int statu)
        {
            lobbys lobby = db.lobby.Find(lobbyId);

            lobby.status = statu;
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }