Example #1
0
 private void ChangePassword_Button_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (theBL.getUser().role == Role.Employee)
         {
             ChangePasswordWindow cpw = new ChangePasswordWindow(theBL, 0);
             cpw.Run();
         }
         else
         {
             ChangePasswordChoose cpc = new ChangePasswordChoose(theBL);
             cpc.Run();
         }
         this.Close();
     }
     catch
     {
         System.Windows.Forms.MessageBox.Show("Connection to server faild");
     }
 }
 private void Back_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (theBL.getUser().role == Role.Employee)
         {
             AdministratorManagment am = new AdministratorManagment(theBL);
             am.Show();
         }
         else
         {
             ChangePasswordChoose cpc = new ChangePasswordChoose(theBL);
             cpc.Show();
         }
         this.Close();
     }
     catch
     {
         System.Windows.Forms.MessageBox.Show("Connection to server faild");
     }
 }