Exemple #1
0
        public void Delete()
        {
            WorkWithAgreeOtherPlyer work = new WorkWithAgreeOtherPlyer();
            CodeFirst context            = new CodeFirst();
            Play      play = context.Play
                             .Where(o => o.FirstId == work.queryToUsersSecond(work.queryToUsersFirst()) && o.SecondId == work.queryToUsersFirst())
                             .FirstOrDefault();

            context.Play.Remove(play);
            context.SaveChanges();
        }
Exemple #2
0
        public void Update()
        {
            WorkWithAgreeOtherPlyer work = new WorkWithAgreeOtherPlyer();
            DateTime date = new DateTime();

            date = DateTime.Today;
            Play result = (from p in db.Play
                           where p.FirstId == work.queryToUsersSecond(work.queryToUsersFirst()) && p.SecondId == work.queryToUsersFirst()
                           select p).SingleOrDefault();

            result.Date  = date;
            result.Start = true;

            db.SaveChanges();
        }
Exemple #3
0
 private void No_Click(object sender, RoutedEventArgs e)
 {
     work.Delete();
     WorkWithAgreeOtherPlyer.OpenMainWindow(this);
 }
Exemple #4
0
 private void Check_Click(object sender, RoutedEventArgs e)
 {
     work.Update();
     WorkWithAgreeOtherPlyer.OpenGame(this);
 }