public void ListViewMouseDoubleClick(TVSeriesTable item)
        {
            var extendedInfo = new ExtendedInfoTVSerialWindow(_model, _currentUser, item);

            extendedInfo.ShowDialog();
            _model.SaveChanges();
            InitializeLists();
        }
Ejemplo n.º 2
0
 private void CreateNewUser()
 {
     if (!CheckLogin())
     {
         var newUser = new User();
         newUser.Email       = _view.Email.Text;
         newUser.Password    = _view.Password.Password;
         newUser.Id_Category = 1;
         try
         {
             _model.Users.Add(newUser);
             _model.SaveChanges();
             MessageBox.Show("You have successfully registered! Now you can enter!", "Great!",
                             MessageBoxButton.OK,
                             MessageBoxImage.Information);
             SwapToLoginWindow();
         }
         catch (Exception e)
         {
             MessageBox.Show(e.Message, "Ooops...", MessageBoxButton.OK, MessageBoxImage.Error);
         }
     }
     else
     {
         MessageBox.Show("This email is already registered! Try restore password!", "Ooops...", MessageBoxButton.OK, MessageBoxImage.Error);
         SwapToLoginWindow();
     }
 }