/// <summary> /// For enter key, backspace navigation and create new ledger from here /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void cmbCashOrParty_KeyDown(object sender, KeyEventArgs e) { try { if (e.KeyCode == Keys.Enter) { if (txtDueDate.Enabled) { txtDueDate.Focus(); txtDueDate.SelectionStart = 0; txtDueDate.SelectionLength = 0; } } if (e.KeyCode == Keys.Back) { if (txtDate.Enabled) { txtDate.Focus(); txtDate.SelectionLength = 0; txtDate.SelectionStart = 0; } } if (e.KeyCode == Keys.F && Control.ModifierKeys == Keys.Control) //Pop Up { if (cmbCashOrParty.SelectedIndex != -1) { frmLedgerPopup frmLedgerPopupObj = new frmLedgerPopup(); frmLedgerPopupObj.MdiParent = formMDI.MDIObj; frmLedgerPopupObj.CallFromPurchaseOrder(this, Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString()), "CashOrSundryCreditors"); } else { Messages.InformationMessage("Select any cash or party"); } } if (e.KeyCode == Keys.C && Control.ModifierKeys == Keys.Alt)//new ledger add { btnCashOrPartyAdd_Click(sender, e); } } catch (Exception ex) { MessageBox.Show("PO64:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }