Esempio n. 1
0
 private void LogoutExecute()
 {
     try
     {
         LoginView loginView = new LoginView();
         loginView.Show();
         employeeView.Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
 /// <summary>
 /// Method to perform log Out action
 /// </summary>
 private void LogOutExecute()
 {
     try
     {
         employeeView.Close();
         LogInView newLogIn = new LogInView();
         newLogIn.ShowDialog();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
Esempio n. 3
0
        private void ExitExecute()
        {
            MainWindow loginWindow = new MainWindow();

            view.Close();
            loginWindow.Show();
        }
        /// <summary>
        /// logout execute
        /// </summary>
        private void LogOutExecute()
        {
            LogInView log = new LogInView();

            log.Show();
            employeeView.Close();
        }
Esempio n. 5
0
        public void LogOutExecute()
        {
            MessageBoxResult result = MessageBox.Show("Are you sure you want to log out?", "Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question);

            if (result == MessageBoxResult.Yes)
            {
                employeeView.Close();
            }
        }
 /// <summary>
 /// Method for logging out employee from app
 /// </summary>
 private void LogOutExecute()
 {
     try
     {
         //closes guest view and opens empty LogInView
         LoginView loginView = new LoginView();
         employeeView.Close();
         loginView.ShowDialog();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
Esempio n. 7
0
        public void Logout()
        {
            try
            {
                MessageBoxResult result = MessageBox.Show("Are you sure you want to logout?", "Confirmation", MessageBoxButton.OKCancel);
                switch (result)
                {
                case MessageBoxResult.OK:
                    LoginView loginView = new LoginView();
                    Thread.Sleep(1000);
                    employeeView.Close();
                    loginView.Show();
                    return;

                case MessageBoxResult.Cancel:
                    break;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Esempio n. 8
0
 /// <summary>
 /// Closes the Main window
 /// </summary>
 private void CloseWindow()
 {
     main.Close();
 }
 private void CloseView()
 {
     View.Close();
 }