Exemplo n.º 1
0
 /// <summary>
 /// Enterkey and backspace navigation of cmbPurchaseAccount
 /// alt+c for accountledger creation
 /// ctrl+f for popup
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cmbPurchaseAccount_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Enter)
         {
             cmbCurrency.Focus();
         }
         if (e.KeyCode == Keys.Back)
         {
             if (cmbOrderNo.Visible)
             {
                 cmbOrderNo.Focus();
             }
             else
             {
                 cmbPurchaseMode.Focus();
             }
         }
         if (e.KeyCode == Keys.C && Control.ModifierKeys == Keys.Alt)
         {
             SendKeys.Send("{F10}");
             AccountLedgerCreation();
         }
         if (e.KeyCode == Keys.F && Control.ModifierKeys == Keys.Control) //Pop Up
         {
             if (cmbCashOrParty.SelectedIndex != -1)
             {
                 frmLedgerPopup frmLedgerPopupObj = new frmLedgerPopup();
                 frmLedgerPopupObj.MdiParent = formMDI.MDIObj;
                 frmLedgerPopupObj.CallFromPurchaseInvoice(this, Convert.ToDecimal(cmbPurchaseAccount.SelectedValue.ToString()), "PurchaseAccount");
             }
             else
             {
                 Messages.InformationMessage("Select any purchase account");
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PI117:" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }