Пример #1
0
        private void CardNO_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyData == Keys.Enter)
            {
                if (this.CardNO.Text == "")
                {
                    MessageBox.Show("请输入卡号");
                    return;
                }
                LendList = null;
                LendList = this.card.QueryLendInfo(this.CardNO.Text);
                if (LendList == null)
                {
                    CardNO.SelectAll();
                    MessageBox.Show("查询借阅信息出错");
                    return;
                }
                if (LendList.Count == 0)
                {
                    CardNO.SelectAll();
                    MessageBox.Show("没有查到尚未归还的借阅信息");
                    return;
                }

                AddDateInfo(LendList);
                this.cbContinueLend.Focus();
            }
        }
Пример #2
0
 private void CardNO_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
 {
     if (e.KeyData == Keys.Enter)
     {
         this.caseDetail.RowCount = 0;
         this.caseMain.RowCount   = 0;
         if (CardNO.Text == "")
         {
             CardNO.Focus();
             MessageBox.Show("请输入卡号");
             return;
         }
         Cardinfo = null;
         Cardinfo = card.GetCardInfo(this.CardNO.Text);
         if (Cardinfo == null)
         {
             MessageBox.Show("查询出错");
             return;
         }
         if (Cardinfo.CardID == null || Cardinfo.CardID == "")
         {
             MessageBox.Show("没有查到该卡号的相关信息");
             return;
         }
         CardNO.Text    = Cardinfo.CardID;
         comPerson.Text = Cardinfo.EmployeeInfo.Name;
         comPerson.Tag  = Cardinfo.EmployeeInfo.ID;
         comType.Text   = "内借";
         //				this.txDays.Focus();
         this.comType.Focus();
     }
 }