private void BackBtn_Click(object sender, RoutedEventArgs e)
        {
            AdminWindow adminWindow = new AdminWindow(currentUser);

            Close();
            adminWindow.Show();
        }
示例#2
0
        private void EnterTheCabinet(DataBase.User user)
        {
            switch (user.Role)
            {
            case 1:
                Windows.AdminWindow adminWindow = new Windows.AdminWindow(user);
                adminWindow.Title = $"Admin({user.Login})";
                Close();
                adminWindow.Show();
                break;

            case 2:
                Windows.BookerWindow bookerWindow = new Windows.BookerWindow();
                bookerWindow.Title = $"Booker({user.Login})";
                Close();
                bookerWindow.Show();
                break;

            case 3:
                Windows.LaborantWindow laborantWindow = new Windows.LaborantWindow();
                laborantWindow.Title = $"Laborant({user.Login})";
                Close();
                laborantWindow.Show();
                break;

            case 4:
                Windows.SearcherWindow searcherWindow = new Windows.SearcherWindow();
                searcherWindow.Title = $"Searcher({user.Login})";
                Close();
                searcherWindow.Show();
                break;

            case 5:
                Windows.PatientWindow patientWindow = new Windows.PatientWindow();
                patientWindow.Title = $"Patient({user.Login})";
                Close();
                patientWindow.Show();
                break;
            }
        }