private void addPassport_Click(object sender, EventArgs e) { international_passports ip = new international_passports { date_of_issue = DateTime.Now, expirition_date = DateTime.Now }; InternationalPassportForm passportForm = new InternationalPassportForm(ip); passportForm.ShowDialog(); client.international_passports.Add(ip); setDGVDatasourse(); }
private void iPDGV_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { if (e.RowIndex < 0) { return; } ; international_passports ip = iPDGV.Rows[e.RowIndex].DataBoundItem as international_passports; InternationalPassportForm passportForm = new InternationalPassportForm(ip); passportForm.ShowDialog(); setDGVDatasourse(); }