private void txtProSearch_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Down) { ProDataGrid.Focus(); } }
private void Stock_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F8) { lblMode.Text = ConfigApp.SEARCH_MODE_ID_MESSAGE; ModeID = true; txtSearch.Focus(); lblModePro.Text = ConfigApp.SEARCH_MODE_ID_MESSAGE; ModeIDPRO = true; txtProSearch.Focus(); } else if (e.KeyCode == Keys.F9) { lblMode.Text = ConfigApp.SEARCH_MODE_TEXT_MESSAGE; ModeID = false; txtSearch.Focus(); lblModePro.Text = ConfigApp.SEARCH_MODE_TEXT_MESSAGE; ModeIDPRO = false; txtProSearch.Focus(); } if (e.Control && e.KeyCode == Keys.S) { addRecord(); } if (e.KeyCode == Keys.F12) { txtInvoice.Focus(); } if (e.KeyCode == Keys.F11) { if (ComDataGrid.Focused) ProDataGrid.Focus(); else ComDataGrid.Focus(); } if (e.Control && e.KeyCode == Keys.Down) { txtInvoice.Focus(); } if (e.Control && e.KeyCode == Keys.Up) { ComDataGrid.Focus(); } if (e.Control && e.KeyCode == Keys.Right) { ProDataGrid.Focus(); } if (e.Control && e.KeyCode == Keys.Left) { ComDataGrid.Focus(); } if (e.Control && e.KeyCode == Keys.Enter) { nextStage(); } if (e.Shift && e.KeyCode == Keys.Enter) { PreviousStage(); } if (e.KeyCode == Keys.Enter) { if (CurrentStage != Stage.locked && txtInvoice.Enabled!=false) { if (txtInvoice.AdvanceText != "") { setInvoice(); } } else if(txtBatchNo.Enabled!=false) { setBatch(); } } }