Beispiel #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();
     }
 }
Beispiel #2
0
 private void SubmitButton_Click(object sender, EventArgs e)
 {
     if (firstUser == null)
     {
         showMessage("Old user is not found / Старый пользователь не найден");
     }
     else if (secondUser == null)
     {
         showMessage("New user is not found / Новый пользователь не найден");
     }
     else if (EquipmentList.SelectedIndex == -1)
     {
         showMessage("Equipment for tranfer is not selected / Оборудование не передачи не выбрано");
     }
     else if (DeadlineDate.SelectionStart <= DateTime.Today)
     {
         showMessage("Chosen date is unavailable / Выбранная дата недоступна");
     }
     else
     {
         PrintSheet.PrintTransferSheet(firstUser, secondUser, equipments[EquipmentList.SelectedIndex], DeadlineDate.SelectionStart.ToShortDateString());
         Connector1C.transferEquipment(firstUser, secondUser, equipments[EquipmentList.SelectedIndex]);
         cardReader.CloseConnection();
         this.Close();
     }
 }
Beispiel #3
0
 private void SubmitButton_Click(object sender, EventArgs e)
 {
     if (user != null && equipment != null)
     {
         PrintSheet.PrintReturnSheet(user, equipment);
         //TODO
         this.Close();
     }
 }
 private void SubmitButton_Click(object sender, EventArgs e)
 {
     if (user != null && oldEquipment != null && newEquipment != null && DeadlineDate.Value > DateTime.Today)
     {
         PrintSheet.PrintExchangeSheet(user, oldEquipment, newEquipment, DeadlineDate.Value.ToShortDateString());
         //TODO
         this.Close();
     }
 }
Beispiel #5
0
 private void SubmitButton_Click(object sender, EventArgs e)
 {
     if (user != null && EquipmentList.SelectedIndex != -1)
     {
         PrintSheet.PrintLostSheet(user, equipments[EquipmentList.SelectedIndex]);
         //TODO
         this.Close();
     }
 }
Beispiel #6
0
 private void SubmitButton_Click(object sender, EventArgs e)
 {
     if (firstUser != null && secondUser != null && EquipmentList.SelectedIndex != -1 && DeadlineDate.Value > DateTime.Today)
     {
         PrintSheet.PrintTransferSheet(firstUser, secondUser, equipments[EquipmentList.SelectedIndex], DeadlineDate.Value.ToShortDateString());
         //TODO
         this.Close();
     }
 }
Beispiel #7
0
 private void SubmitButton_Click(object sender, EventArgs e)
 {
     if (equipment == null)
     {
         showMessage("Equipment is not found / Оборудование не найдено");
     }
     else if (admin == null)
     {
         showMessage("Admin is not found / Администратор не найден");
     }
     else
     {
         PrintSheet.PrintReturnSheet(new User(user.Name, ""), equipment);
         Connector1C.transferEquipment(user, admin, equipment);
         cardReader.CloseConnection();
         this.Close();
     }
 }
Beispiel #8
0
 private void SubmitButton_Click(object sender, EventArgs e)
 {
     if (user == null)
     {
         showMessage("User is not found / Пользователь не найден");
     }
     else if (EquipmentList.SelectedIndex == -1)
     {
         showMessage("Lost equipment is not selected / Утерянное оборудование не выбрано");
     }
     else
     {
         PrintSheet.PrintLostSheet(user, equipments[EquipmentList.SelectedIndex]);
         Connector1C.lostEquipment(equipments[EquipmentList.SelectedIndex]);
         cardReader.CloseConnection();
         this.Close();
     }
 }
Beispiel #9
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();
     }
 }