/// <summary>
        /// Closes the active window to get back to the Administrator Main Window
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BackButton_Click(object sender, EventArgs e)
        {
            this.Close();
            AdministratorMainWindow adminWin = new AdministratorMainWindow(admin, connection);

            adminWin.Show();
        }
示例#2
0
        private void openMainWindow()
        {
            settings.Write("version", version);
            Settings.version = version;

            int idRole = Auth.getInstance().IdRole;

            switch (idRole)
            {
            case 1:
                AdministratorMainWindow administratorWindow =
                    new AdministratorMainWindow();
                administratorWindow.Show();
                break;

            case 2:
                DirectorMainWindow directorWindow =
                    new DirectorMainWindow();
                directorWindow.Show();
                break;

            case 3:
                AccountantMainWindow accountantWindow =
                    new AccountantMainWindow();
                accountantWindow.Show();
                break;

            case 4:
                TechnicalMainWindow technicalWindow =
                    new TechnicalMainWindow();
                technicalWindow.Show();
                break;

            case 5:
                ManagerMainWindow managerWindow =
                    new ManagerMainWindow();
                managerWindow.Show();
                break;

            case 6:
                LogisticianMainWindow logisticanWindow =
                    new LogisticianMainWindow();
                logisticanWindow.Show();
                break;
            }
            Close();
        }