/// <summary> /// Creditperiod validation /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void txtCreditPeriod_KeyPress(object sender, KeyPressEventArgs e) { try { //Allows to enter numbers only Common CommonlObj = new Common(); Common.NumberOnly(sender, e); } catch (Exception ex) { MessageBox.Show("SV 42 : " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }