/// <summary> /// Enter key and backspace navigation and calls frmLedgerPopup to create new Ledger /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void cmbCashOrBank_KeyDown(object sender, KeyEventArgs e) { try { if (e.KeyCode == Keys.Enter) { if (txtCheckNo.Enabled == true) { txtCheckNo.Focus(); } else { txtNarration.Focus(); } } if (e.KeyCode == Keys.Back) { dtpSalaryMonth.Focus(); } if (e.KeyCode == Keys.F && Control.ModifierKeys == Keys.Control) //Pop Up { if (cmbCashOrBank.SelectedIndex != -1) { frmLedgerPopupObj = new frmLedgerPopup(); frmLedgerPopupObj.MdiParent = formMDI.MDIObj; frmLedgerPopupObj.CallFromAdvancePayment(this, Convert.ToDecimal(cmbCashOrBank.SelectedValue.ToString()), "CashOrBank"); } else { Messages.InformationMessage("Select any cash or bank account"); } } } catch (Exception ex) { MessageBox.Show("AP42:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }