private void lnkAdd_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            frmTool frm = new frmTool();

            if (frm.ShowDialog() == DialogResult.OK)
            {
                PopulateGrid();
            }
        }
        private void dgvTools_DoubleClick(object sender, EventArgs e)
        {
            // if no current row or cell selected, do nothing
            if (dgvTools.CurrentCell == null)
            {
                return;
            }

            // Get the primary key id of the selected row, which is in column 0
            long pkId = long.Parse(dgvTools[0, dgvTools.CurrentCell.RowIndex].Value.ToString());

            frmTool frm = new frmTool(pkId);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                PopulateGrid();
            }
        }