예제 #1
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;
     }
 }