Beispiel #1
0
 /// <summary>
 /// CardXID TextBox Key Down Event.
 /// </summary>
 private void CardXIDTB_KeyDown(object sender, KeyEventArgs e)
 {
     try {
         if (e.KeyCode == Keys.Enter && ReadBtn.Tag.Equals("1") && !String.IsNullOrWhiteSpace(CardIDTB.Text))
         {
             ReadCard();
             CardXIDTB.Clear();
             CardXIDTB.Focus();
         }
     } catch (Exception err) {
         Common.WriteLog(DateTime.Now, EnmMsgType.Error, "System", "Delta.MPS.AccessSystem.BatchOrgCardsForm.CardXIDTB.KeyDown", err.Message, err.StackTrace);
         MessageBox.Show(err.Message, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Beispiel #2
0
 /// <summary>
 /// CardID TextBox Text Changed Event.
 /// </summary>
 private void CardIDTB_TextChanged(object sender, EventArgs e)
 {
     try {
         CardXIDTB.TextChanged -= CardXIDTB_TextChanged;
         if (String.IsNullOrWhiteSpace(CardIDTB.Text))
         {
             CardXIDTB.Clear();
         }
         else
         {
             CardXIDTB.Text = Common.GetCardSn10to16(CardIDTB.Text);
         }
     } catch (Exception err) {
         Common.WriteLog(DateTime.Now, EnmMsgType.Error, "System", "Delta.MPS.AccessSystem.BatchOrgCardsForm.CardIDTB.TextChanged", err.Message, err.StackTrace);
         MessageBox.Show(err.Message, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
     } finally {
         CardXIDTB.TextChanged += CardXIDTB_TextChanged;
     }
 }