/// <summary> /// Enterkey and backspace navigation of cmbCashOrParty /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void cmbCashOrParty_KeyDown(object sender, KeyEventArgs e) { try { if (e.KeyCode == Keys.Enter) { cmbPricinglevel.Focus(); } if (e.KeyCode == Keys.Back) { if (cmbCashOrParty.Text == string.Empty || cmbCashOrParty.SelectionStart == 0) { txtSalesQuotationDate.Focus(); txtSalesQuotationDate.SelectionStart = 0; txtSalesQuotationDate.SelectionLength = 0; } } /*----new salesman creation -------------------*/ if (e.KeyCode == Keys.C && Control.ModifierKeys == Keys.Alt) { SendKeys.Send("{F10}"); btnNewLedger_Click(sender, e); } /*----------Showing ledger pop up window---------------*/ if (e.KeyCode == Keys.F && Control.ModifierKeys == Keys.Control) { if (cmbCashOrParty.Focus()) { if (cmbCashOrParty.Focused) { cmbCashOrParty.DropDownStyle = ComboBoxStyle.DropDown; } else { cmbCashOrParty.DropDownStyle = ComboBoxStyle.DropDownList; } if (cmbCashOrParty.SelectedIndex != -1) { frmLedgerPopup frmLedgerPopupObj = new frmLedgerPopup(); frmLedgerPopupObj.MdiParent = formMDI.MDIObj; frmLedgerPopupObj.CallFromSalesQuotation(this, Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString()), "CashOrSundryDeptors"); } else { Messages.InformationMessage("select any ledger"); } } } } catch (Exception ex) { MessageBox.Show("SQ:70" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }