Example #1
0
        private void AddParts_Click(object sender, EventArgs e)
        {
            PartsEdit FormPartsEdit = new PartsEdit(0);

            FormPartsEdit.ShowDialog(this);

            this.PartsTableAdapter.Fill(this.garageDataSet.Parts);
        }
Example #2
0
        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["idPartsDataGridViewTextBoxColumn"].Value.ToString());

                    PartsEdit FormPartsEdit = new PartsEdit(tekID);
                    FormPartsEdit.ShowDialog(this);

                    this.PartsTableAdapter.Fill(this.garageDataSet.Parts);
                    dataGridView1.CurrentCell = dataGridView1.Rows[e.RowIndex].Cells[0];
                }
            }
        }