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