Example #1
0
 private void SubmitButton_Click(object sender, EventArgs e)
 {
     if (oldEquipment == null)
     {
         showMessage("Old equipment is not found / Старое оборудование не найдено");
     }
     else if (newEquipment == null)
     {
         showMessage("New equipment is not found / Новое оборудование не найдено");
     }
     else if (DeadlineDate.SelectionStart <= DateTime.Today)
     {
         showMessage("Chosen date is unavailable / Выбранная дата недоступна");
     }
     else if (admin == null)
     {
         showMessage("Admin is not found / Администратор не найден");
     }
     else
     {
         PrintSheet.PrintExchangeSheet(user, oldEquipment, newEquipment, DeadlineDate.SelectionStart.ToShortDateString());
         Connector1C.transferEquipment(user, admin, oldEquipment);
         Connector1C.getEquipment(user, newEquipment);
         cardReader.CloseConnection();
         this.Close();
     }
 }
Example #2
0
 private void SubmitButton_Click(object sender, EventArgs e)
 {
     if (user == null)
     {
         showMessage("User is not found / Пользователь не найден");
     }
     else if (equipment == null)
     {
         showMessage("Equipment is not found / Оборудование не найдено");
     }
     else if (DeadlineDate.SelectionStart <= DateTime.Today)
     {
         showMessage("Chosen date is unavailable / Выбранная дата недоступна");
     }
     else
     {
         PrintSheet.PrintGetSheet(user, equipment, DeadlineDate.SelectionStart.ToShortDateString());
         Connector1C.getEquipment(user, equipment);
         cardReader.CloseConnection();
         this.Close();
     }
 }