private void BtnAdd_MouseUp(object sender, MouseEventArgs e) { FormSettingCars fCar = new FormSettingCars(); DialogResult Ret = fCar.ShowDialog(); if (Ret == DialogResult.Yes) { Setup(); } fCar.Close(); fCar.Dispose(); }
private void BtnEdit_MouseUp(object sender, MouseEventArgs e) { if (CheckDataAndSelect() == false) { return; } if (dgvCar.CurrentRow.Selected == true) { DaoPartNumber PN = (DaoPartNumber)dgvCar.Rows[dgvCar.CurrentCell.RowIndex].DataBoundItem; FormSettingCars fCar = new FormSettingCars(PN); DialogResult Ret = fCar.ShowDialog(); if (Ret == DialogResult.Yes) { Setup(); } fCar.Close(); fCar.Dispose(); } }