Ejemplo n.º 1
0
        private void btAdd_Click(object sender, EventArgs e)
        {
            FormAddCar fAdd = new FormAddCar(db);

            fAdd.ShowDialog();
            dgvCars.Rows.Clear();
            db.LoadTables("cars", dgvCars);
        }
Ejemplo n.º 2
0
        private void toolStripBtEdit_Click(object sender, EventArgs e)
        {
            string id          = dgvCars.CurrentRow.Cells[0].Value.ToString();
            string brand       = dgvCars.CurrentRow.Cells[1].Value.ToString();
            string model       = dgvCars.CurrentRow.Cells[2].Value.ToString();
            string yearCreated = dgvCars.CurrentRow.Cells[3].Value.ToString();
            string dateTO      = dgvCars.CurrentRow.Cells[4].Value.ToString();

            FormAddCar fac = new FormAddCar(db, id, brand, model, yearCreated, dateTO);

            fac.ShowDialog();
            dgvCars.Rows.Clear();
            db.LoadTables("cars", dgvCars);
        }