private void printContractButton_Click(object sender, EventArgs e) { if (rentalDGV.SelectedCells.Count > 0) { cContractsHire currentContract = new cContractsHire((rentalDGV.Rows[rentalDGV.SelectedCells[0].RowIndex].DataBoundItem as viewHire).id_contract_hire); cPrintContract PC = new cPrintContract(currentClient, currentContract); } }
private void printContract_Click(object sender, EventArgs e) { if (!IsSaved) { MessageBox.Show("Что-то поменялось, сохраните ещё раз", "Изменения", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { cPrintContract p = new cPrintContract(currentClient, equipmentList, startDateTime, endDateTime, pledgeComboBox.Text, (double)rentNumeric.Value); } }