private void btnEdit_Click(object sender, EventArgs e)
        {
            if ((dgvAppLinks.Rows.Count > 0) && (dgvAppLinks.SelectedRows.Count > 0))
            {
                int    LinkId;
                int    CountryId;
                int    ApplicationId;
                int    CategoryId;
                string Description;
                string Link;
                int    CredentialId;

                LinkId        = Convert.ToInt32(dgvAppLinks.CurrentRow.Cells[0].Value.ToString());
                Description   = dgvAppLinks.CurrentRow.Cells[1].Value.ToString();
                Link          = dgvAppLinks.CurrentRow.Cells[2].Value.ToString();
                CategoryId    = Convert.ToInt32(dgvAppLinks.CurrentRow.Cells[3].Value.ToString());
                ApplicationId = Convert.ToInt32(dgvAppLinks.CurrentRow.Cells[5].Value.ToString());
                CountryId     = Convert.ToInt32(dgvAppLinks.CurrentRow.Cells[7].Value.ToString());
                CredentialId  = Convert.ToInt32(dgvAppLinks.CurrentRow.Cells[9].Value.ToString());

                frmAddOrUpdateAppLinks formAppLinks = new frmAddOrUpdateAppLinks(LinkId, CountryId, ApplicationId, CategoryId, Description, Link, CredentialId);
                formAppLinks.ShowDialog();
                loadAppLinks();
                dgvAppLinks.ClearSelection();
                formAppLinks.Dispose();
                txtAppLinkSearch.Clear();
            }
        }
        private void btnNew_Click(object sender, EventArgs e)
        {
            frmAddOrUpdateAppLinks formAppLinks = new frmAddOrUpdateAppLinks(0, 0, 0, 0, "", "", 0);

            formAppLinks.ShowDialog();
            loadAppLinks();
            dgvAppLinks.ClearSelection();
            formAppLinks.Dispose();
        }