/// <summary>
 /// Enter key and Backspace navigation
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void txtvoucherNo_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Enter)
         {
             DgvPdCreceivable.Focus();
         }
         if (e.KeyCode == Keys.Back)
         {
             if (txtvoucherNo.Text == string.Empty || txtvoucherNo.SelectionStart == 0)
             {
                 cmbAccountLedger.Focus();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PRREG19:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Enter key and Backspace navigation
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void txtvoucherNo_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Enter)
         {
             DgvPdCreceivable.Focus();
         }
         if (e.KeyCode == Keys.Back)
         {
             if (txtvoucherNo.Text == string.Empty || txtvoucherNo.SelectionStart == 0)
             {
                 cmbAccountLedger.Focus();
             }
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PRREG19:" + ex.Message;
     }
 }