private void btnDodaj_Click(object sender, EventArgs e) { frmWypo nowy = new frmWypo(); nowy.dodano += Main_Load; nowy.ShowDialog(); }
private void btnEdycja_Click(object sender, EventArgs e) { int Id = 0; DataTable g = dgvWypo.DataSource as DataTable; DataRow row = ((DataRowView)dgvWypo.SelectedRows[0].DataBoundItem).Row; Id = row.Field <int>("IdWypo"); DataTable wyp = wypWypozyczTableAdapter1.GetDataBy(Id); Wypo WypoEdyt = new Wypo(wyp); frmWypo Wyp = new frmWypo(WypoEdyt); Wyp.dodano += Main_Load; Wyp.ShowDialog(); }