/// <summary> /// Load /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void cmbCurrency_KeyDown(object sender, KeyEventArgs e) { try { if (e.KeyCode == Keys.Enter) { txtDate.Focus(); } if (e.KeyCode == Keys.F && Control.ModifierKeys == Keys.Control) //POP UP { frmCurrencyObj = new frmCurrencyDetails(); frmCurrencyObj.MdiParent = formMDI.MDIObj; if (cmbCurrency.SelectedIndex >= 0) { frmCurrencyObj.CallFromExchangerate(this, Convert.ToDecimal(cmbCurrency.SelectedValue.ToString())); } else { Messages.InformationMessage("Select Currency"); cmbCurrency.Focus(); } } if (e.KeyCode == Keys.C && Control.ModifierKeys == Keys.Alt) { SendKeys.Send("{F10}"); btnCurrencyAdd_Click(sender, e); } } catch (Exception ex) { MessageBox.Show("ER38:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function toi call this form from Currency Form /// </summary> /// <param name="frmCurrencyDetails"></param> /// <param name="decId"></param> public void CallFromCurrenCyDetails(frmCurrencyDetails frmCurrencyDetails, decimal decId) //PopUp { try { base.Show(); this.frmCurrencyObj = frmCurrencyDetails; CurrencyComboFill(); cmbCurrency.SelectedValue = decId; cmbCurrency.Focus(); frmCurrencyObj.Close(); frmCurrencyObj = null; } catch (Exception ex) { MessageBox.Show("ER12:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }