Exemple #1
0
 private void SentRequest_Click(object sender, RoutedEventArgs e)
 {
     if (LeaveRadioButton.IsChecked != null && VacationRadioButton.IsChecked != null)
     {
         int type = -1;
         if (LeaveRadioButton.IsChecked == true)
         {
             type = 0;
         }
         else if (VacationRadioButton.IsChecked == true)
         {
             MessageBox.Show($"Внимание! Кол-во дней отпуска: {EmployeeWindow.logic.dayscount}");
             type = 1;
         }
         if (EmployeeWindow.logic.SentRequest(type, rTextBox.Text))
         {
             LeaveRadioButton.IsChecked    = false;
             VacationRadioButton.IsChecked = false;
             rTextBox.Text = "";
             EmployeeWindow.SetSettingLabel("Запрос был отправлен!");
         }
         else
         {
             EmployeeWindow.SetSettingLabel("Проверьте данные!");
         }
     }
     else
     {
         EmployeeWindow.SetSettingLabel("Выберите тип!");
     }
 }
Exemple #2
0
 private void EditButton_Click(object sender, RoutedEventArgs e)
 {
     if (EmployeeWindow.logic.EditEmp(EmployeeWindow.logic.GetUserData().id, FullNameTextBox.Text, AddressTextBox.Text, EmailTextBox.Text, PhoneNumberTextBox.Text, LoginTextBox.Text, PasswordTextBox.Text))
     {
         EmployeeWindow.SetSettingLabel("Изменения успешно сохранены!");
     }
     else
     {
         EmployeeWindow.SetSettingLabel("Проверьте правильность данных!");
     }
 }
Exemple #3
0
 private void DeleteRequest_Click(object sender, RoutedEventArgs e)
 {
     if (temp1 != null)
     {
         EmployeeWindow.logic.DeleteRequest(temp1.id);
         EmployeeWindow.SetSettingLabel("Запрос был удален!");
     }
     else
     {
         EmployeeWindow.SetSettingLabel("Выберите запрос!");
     }
 }
Exemple #4
0
 private void SentButton_Click(object sender, RoutedEventArgs e)
 {
     if (EmployeeWindow.logic.ChecknSentLoginMessage(LoginTextBox.Text, SentMessageTextBox.Text, TitleTextBox.Text))
     {
         LoginTextBox.Text       = "";
         SentMessageTextBox.Text = "";
         TitleTextBox.Text       = "";
         EmployeeWindow.SetSettingLabel("Сообщение успешно отправлено!");
     }
     else
     {
         EmployeeWindow.SetSettingLabel("Проверьте свои данные");
     }
 }
Exemple #5
0
 private void DeleteMessageButton_Click(object sender, RoutedEventArgs e)
 {
     if (temp != null)
     {
         EmployeeWindow.logic.DeleteMessage(temp.id);
         FromLabel.Content   = "";
         ToLabel.Content     = "";
         MessageTextBox.Text = "";
         EmployeeWindow.SetSettingLabel("Сообщение успешно удалено!");
     }
     else
     {
         EmployeeWindow.SetSettingLabel("Выберите сообщение!");
     }
 }