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); } }
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(); }