private void AddGlass_Click(object sender, EventArgs e) { GlassEdit FormGlassEdit = new GlassEdit(0); FormGlassEdit.ShowDialog(this); this.glassTableAdapter.Fill(this.garageDataSet.glass); }
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["idglassDataGridViewTextBoxColumn"].Value.ToString()); GlassEdit FormGlassEdit = new GlassEdit(tekID); FormGlassEdit.ShowDialog(this); this.glassTableAdapter.Fill(this.garageDataSet.glass); dataGridView1.CurrentCell = dataGridView1.Rows[e.RowIndex].Cells[0]; } } }