Пример #1
0
 private void winterRentalButton_Click(object sender, EventArgs e)
 {
     if (currentClient.id_client != -1)
     {
         winterRentalForm wr = new winterRentalForm(currentClient);
         wr.ShowDialog();
         viewHire(currentClient.id_client);
     }
     else
     {
         MessageBox.Show("Выбери клиента", "Клиент не клиент", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
Пример #2
0
 private void chooseEquipButton_Click(object sender, EventArgs e)
 {
     if (equipmentDGV.SelectedCells.Count > 0)
     {
         currentEquip = equipmentDGV.Rows[equipmentDGV.SelectedCells[0].RowIndex].DataBoundItem as cEquipment;
         if (currentEquip.addToContract(currentEquiomentInContract))
         {
             winterRentalForm frm = (winterRentalForm)this.Owner;
             frm.viewEquipmentContract(frm.currentClient.id_client);
             frm.IsSaved = false;
         }
     }
     viewEquipments();
 }