Помледний коммит из дома, молимся на заватра

This commit is contained in:
Tonb73 2024-11-10 16:44:39 +04:00
parent 4b6a46d586
commit 243eaee2b8
2 changed files with 6 additions and 3 deletions

View File

@ -103,6 +103,7 @@
buttonCancel.TabIndex = 10;
buttonCancel.Text = "Отмена";
buttonCancel.UseVisualStyleBackColor = true;
buttonCancel.Click += buttonCancel_Click;
//
// buttonSave
//

View File

@ -55,16 +55,18 @@ namespace ProjectTourAgency.Forms
private List<Receipt> CreateListClientTourFromDataGrid()
{
var list = new List<Receipt>();
foreach(DataGridViewRow row in dataGridViewReceipts.Rows)
foreach (DataGridViewRow row in dataGridViewReceipts.Rows)
{
if (row.Cells["ColumnTour"].Value == null || row.Cells["ColumnReceipt"].Value == null)
{
continue;
}
list.Add(Receipt.CreateEntity((int)comboBoxClientId.SelectedValue!,Convert.ToInt32(ColumnTour.ValueMember),0,0));
list.Add(Receipt.CreateEntity((int)comboBoxClientId.SelectedValue!, Convert.ToInt32(ColumnTour.ValueMember), 0, 0));
}
return list;
}
private void buttonCancel_Click(object sender, EventArgs e) => Close();
}
}