private void btnAdd_Click(object sender, EventArgs e) { frmAddModel add = new frmAddModel(User, ""); add.ShowDialog(); btnSearch_Click(sender, e); }
private void btnUpdate_Click(object sender, EventArgs e) { try { if (dgvModel.RowCount > 0) { string modelId = dgvModel.Rows[dgvModel.CurrentRow.Index].Cells["model_id"].Value.ToString(); string modelsub = dgvModel.Rows[dgvModel.CurrentRow.Index].Cells["model_sub_cd"].Value.ToString(); frmAddModel add = new frmAddModel(User, modelId); add.ShowDialog(); btnSearch_Click(sender, e); } else { MessageBox.Show("Choose a Model Sub", "Note", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch { return; } }