private void AbbreviationsDataGridViewMouseDownEvent(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                int visibleRows = (AbbreviationsDataGridView.RowCount == 0) ? 0 : AbbreviationsDataGridView.Rows.GetRowCount(DataGridViewElementStates.Visible);

                AbbreviationMenuItemEdit.Enabled   = visibleRows != 0;
                AbbreviationMenuItemDelete.Enabled = visibleRows != 0;

                DataGridView.HitTestInfo hitTest = AbbreviationsDataGridView.HitTest(e.X, e.Y);

                switch (hitTest.Type)
                {
                case DataGridViewHitTestType.ColumnHeader:

                    AbbreviationsDataGridView.ClearSelection();

                    AbbreviationMenuItemEdit.Enabled   = false;
                    AbbreviationMenuItemDelete.Enabled = false;

                    break;

                case DataGridViewHitTestType.RowHeader:

                    break;

                case DataGridViewHitTestType.Cell:

                    if (hitTest.RowIndex >= 0)
                    {
                        if (AbbreviationsDataGridView.SelectedRows.Count <= 1)
                        {
                            AbbreviationsDataGridView.ClearSelection();
                            AbbreviationsDataGridView.CurrentCell = AbbreviationsDataGridView[AbbreviationsDataGridView.Columns.GetFirstColumn(DataGridViewElementStates.Visible).DisplayIndex, hitTest.RowIndex];
                            AbbreviationsDataGridView.Rows[hitTest.RowIndex].Selected = true;
                        }
                        else
                        {
                            if (!ClassLibraryFramework.DataGridViewMethods.GetSelectedRowsIndex(AbbreviationsDataGridView).Contains(hitTest.RowIndex))
                            {
                                AbbreviationsDataGridView.ClearSelection();
                                AbbreviationsDataGridView.CurrentCell = AbbreviationsDataGridView[AbbreviationsDataGridView.Columns.GetFirstColumn(DataGridViewElementStates.Visible).DisplayIndex, hitTest.RowIndex];
                                AbbreviationsDataGridView.Rows[hitTest.RowIndex].Selected = true;
                            }
                        }
                    }

                    break;

                default:

                    break;
                }
            }
        }
        private void EditAbbreviationWord(object sender, EventArgs e)
        {
            DataGridViewRow row = AbbreviationsDataGridView.CurrentRow;

            if (row == null)
            {
                return;
            }

            AbbreviationsDataGridView.ClearSelection();
            AbbreviationsDataGridView.CurrentCell = AbbreviationsDataGridView[AbbreviationsDataGridView.Columns.GetFirstColumn(DataGridViewElementStates.Visible).DisplayIndex, row.Index];
            AbbreviationsDataGridView.Rows[row.Index].Selected = true;

            using (NAVSymbolForm navSymbolForm = new NAVSymbolForm(true))
            {
                if (navSymbolForm.ShowDialog() == DialogResult.OK)
                {
                    Dapper.DynamicParameters param = new Dapper.DynamicParameters();

                    param.Add("@" + Constants.COLUMN_USER_ID, UserHelper.UserPropertiesModel.iUserID);
                    param.Add("@" + Constants.COLUMN_ABBREVIATION_ID, row.Cells[Constants.COLUMN_ABBREVIATION_ID].Value);
                    param.Add("@" + Constants.COLUMN_ABBREVIATION_WORD, navSymbolForm.nvWord);
                    param.Add("@" + Constants.COLUMN_ABBREVIATION, navSymbolForm.nvAbbreviation);
                    param.Add("@" + Constants.COLUMN_ABBREVIATION_DESCRIPTION, navSymbolForm.nvAbbreviationDescription);
                    param.Add("@" + Constants.COLUMN_ABBREVIATION_FLAG, navSymbolForm.bAlwaysUse);
                    param.Add("@" + Constants.COLUMN_ABBREVIATION_RETURNCODE, dbType: System.Data.DbType.Int32, direction: System.Data.ParameterDirection.ReturnValue);

                    try
                    {
                        if (Convert.ToBoolean(DataAccess.EditAbbreviation(param)))
                        {
                            GetAbbreviationDataGridView(navSymbolForm.nvWord, navSymbolForm.nvAbbreviation);
                        }
                    }
                    catch (System.Data.SqlClient.SqlException ex)
                    {
                        MessageBox.Show(Properties.Resources.NOTIFY_ABBREVIATION_EDIT, Properties.Resources.CAPTION_ABBREVIATIONS, MessageBoxButtons.OK, MessageBoxIcon.Error);
                        if (log != null)
                        {
                            log.Error(Properties.Resources.NOTIFY_ABBREVIATION_EDIT, ex);
                        }
                    }
                }
            }
        }