private void AddService_Click(object sender, EventArgs e) { ServiceEdit FormServiceEdit = new ServiceEdit(0); FormServiceEdit.ShowDialog(this); this.serviceTableAdapter.Fill(this.garageDataSet.service); }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { Int32 tekID; if (e.RowIndex >= 0) { if (this.dataGridView1.Rows[e.RowIndex].IsNewRow == false) { tekID = Convert.ToInt32(this.dataGridView1.Rows[e.RowIndex].Cells["idserviceDataGridViewTextBoxColumn"].Value.ToString()); ServiceEdit FormServiceEdit = new ServiceEdit(tekID); FormServiceEdit.ShowDialog(this); this.serviceTableAdapter.Fill(this.garageDataSet.service); dataGridView1.CurrentCell = dataGridView1.Rows[e.RowIndex].Cells[0]; } } }