private void Grid_HospitalManagement_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
 {
     if (isConnected == true)
     {
         LoginWindow firstLogin = new LoginWindow(new Role[] { Role.Administrator, Role.DataRecorder }, appMgr);
         firstLogin.ShowDialog();
         if (firstLogin.DialogResult == true)
         {
             UpdateLoggedInUser();
             appMgr.HospitalManagement = new HospitalManager(appMgr);
             HospitalManagementWindow HospitalManagementView = new HospitalManagementWindow(appMgr.HospitalManagement);
             HospitalManagementView.ShowDialog();
             appMgr.Logout();
             UpdateLoggedInUser();
         }
     }
     else
     {
         MessageBox.Show("Nincs kapcsolat a szerverrel.", "Hiba történt", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
Esempio n. 2
0
 private void Grid_HospitalManagement_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
 {
     if (isConnected == true)
     {
         LoginWindow firstLogin = new LoginWindow(new Role[] { Role.Administrator, Role.DataRecorder }, appMgr);
         firstLogin.ShowDialog();
         if (firstLogin.DialogResult == true)
         {
             UpdateLoggedInUser();
             appMgr.HospitalManagement = new HospitalManager(appMgr);
             HospitalManagementWindow HospitalManagementView = new HospitalManagementWindow(appMgr.HospitalManagement);
             HospitalManagementView.ShowDialog();
             appMgr.Logout();
             UpdateLoggedInUser();
         }
     }
     else
     {
         MessageBox.Show("Nincs kapcsolat a szerverrel.", "Hiba történt", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
Esempio n. 3
0
 private void Grid_PatientManagement_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     if (isConnected == true)
     {
         LoginWindow firstLogin = new LoginWindow(appMgr);
         firstLogin.ShowDialog();
         if (firstLogin.DialogResult == true)
         {
             UpdateLoggedInUser();
             appMgr.PatientManagement   = new PatientManager(appMgr);
             appMgr.InventoryManagement = new InventoryManager(appMgr);
             appMgr.HospitalManagement  = new HospitalManager(appMgr);
             PatientManagementWindow PatientManagementView = new PatientManagementWindow(appMgr.PatientManagement);
             PatientManagementView.ShowDialog();
             appMgr.Logout();
             UpdateLoggedInUser();
         }
     }
     else
     {
         MessageBox.Show("Nincs kapcsolat a szerverrel.", "Hiba történt", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
 private void btnSave_Click(object sender, RoutedEventArgs e)
 {
     LoginWindow auth = new LoginWindow(Procedure.GetAllowedRoles(), VM.Patientmanager.AppManager);
     auth.ShowDialog();
     if (auth.DialogResult == true)
     {
         DialogResult = true;
     }
 }
 private void Grid_PatientManagement_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     if (isConnected == true)
     {
         LoginWindow firstLogin = new LoginWindow(appMgr);
         firstLogin.ShowDialog();
         if (firstLogin.DialogResult == true)
         {
             UpdateLoggedInUser();
             appMgr.PatientManagement = new PatientManager(appMgr);
             appMgr.InventoryManagement = new InventoryManager(appMgr);
             appMgr.HospitalManagement = new HospitalManager(appMgr);
             PatientManagementWindow PatientManagementView = new PatientManagementWindow(appMgr.PatientManagement);
             PatientManagementView.ShowDialog();
             appMgr.Logout();
             UpdateLoggedInUser();
         }
     }
     else
     {
         MessageBox.Show("Nincs kapcsolat a szerverrel.", "Hiba történt", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }