Example #1
0
        private void btAdd_Click(object sender, EventArgs e)
        {
            FormAddRepair fAdd = new FormAddRepair(db);

            fAdd.ShowDialog();
            dataGridView1.Rows.Clear();
            db.LoadTables("repairs", dataGridView1);
        }
Example #2
0
        private void редактироватьРаботуToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string idRepair = dataGridView1.CurrentRow.Cells[0].Value.ToString();
            string name     = dataGridView1.CurrentRow.Cells[1].Value.ToString();
            string category = dataGridView1.CurrentRow.Cells[2].Value.ToString();
            string cost     = dataGridView1.CurrentRow.Cells[3].Value.ToString();
            string position = dataGridView1.CurrentRow.Cells[4].Value.ToString();

            FormAddRepair far = new FormAddRepair(db, idRepair, name, category, cost, position);

            far.ShowDialog();
            dataGridView1.Rows.Clear();
            db.LoadTables("repairs", dataGridView1);
        }