private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (dataGridView1.SelectedRows.Count > 0) { DataGridViewRow row = dataGridView1.SelectedRows[0]; int id = (int)row.Cells[SalesCounterIdColumn.Name].Value; AddSalesCounterForm f = new AddSalesCounterForm(); f.SalesCounterId = id; f.Show(); } }
private void AddButton_Click(object sender, EventArgs e) { AddSalesCounterForm form = new AddSalesCounterForm(); form.Show(); }