Exemple #1
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     this.btnOK.Enabled = false;
     BikesHistory.Return(this.bike);
     this.txtUser.Clear();
     this.cboBike.Items.Remove(this.bike);
     MessageBox.Show("成功归还!");
 }
Exemple #2
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     this.btnOK.Enabled = false;
     this.bike          = this.txtBike.Text.Trim();
     this.user          = this.txtUser.Text.Trim();
     if (BikesHistory.Borrow(bike, user))
     {
         MessageBox.Show("借车成功!");
     }
     else
     {
         MessageBox.Show("此车已经借出,不能再借!");
     }
 }
Exemple #3
0
 private void frmStart_FormClosing(object sender, FormClosingEventArgs e)
 {
     BikesHistory.SaveHistory();
 }
Exemple #4
0
 private void frmStart_Load(object sender, EventArgs e)
 {
     BikesHistory.ReadHistory();
 }