private void PodmiotyGrid_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { Podmiot podmiot = PodmiotyGrid.Rows[e.RowIndex].DataBoundItem as Podmiot; PodmiotForm form = new PodmiotForm(podmiot); form.ShowDialog(); PodmiotyGrid.DataSource = module.Podmioty.ToList(); PodmiotyGrid.Refresh(); }
private void AddPodmiot_Click(object sender, EventArgs e) { Podmiot podmiot = new Podmiot(); PodmiotForm form = new PodmiotForm(podmiot); form.ShowDialog(); PodmiotyGrid.DataSource = module.Podmioty.ToList(); PodmiotyGrid.Refresh(); }
private void formularzToolStripMenuItem_Click(object sender, EventArgs e) { foreach(DataGridViewRow row in PodmiotyGrid.SelectedRows) { Podmiot podmiot = row.DataBoundItem as Podmiot; PodmiotForm form = new PodmiotForm(podmiot); form.ShowDialog(); break; } }