Exemple #1
0
 private void dataGridView2_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Right)
     {
         dataGridView1.Focus();
     }
     else if (e.KeyCode == Keys.Enter)
     {
         OpenAutoPartListForm();
     }
     else if (e.KeyCode == Keys.Up)
     {
         if (dataGridView2.SelectedRows.Count > 0)
         {
             DataGridViewRow row = dataGridView2.SelectedRows[0];
             if (row.Index == 0)
             {
                 APTextbox.Focus();
             }
         }
         else
         {
             APTextbox.Focus();
         }
     }
 }
Exemple #2
0
        private void InventoryControl_Load(object sender, EventArgs e)
        {
            if (!UserInfo.IsAdmin)
            {
                DeleteButton.Visible = false;
                DeleteItem.Visible   = false;
            }

            LoadBrands();
            LoadAutoParts();
            CheckUserAccess();

            if (AllowSelect)
            {
                HideButtons();
            }

            APTextbox.Focus();
        }