Esempio n. 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     
     Control.Control control = new Control.Control();
     int billid = control.current(mainForm.dbv.dgv);
     if (billid != 0)
     {
         bool check = control.judge(Convert.ToInt32(this.textBox1.Text), mainForm.dbv.dgv);
         if(check)
         {
             int affected = control.Draw(billid, Convert.ToInt32(this.textBox1.Text));
             if (affected == 1)
             {
                MessageBox.Show("取款成功");
             }
             else
             {
               MessageBox.Show("取款失败");
             }
         }
         else
         {
             MessageBox.Show("余额不足");
         }
     }
     else 
     {
         MessageBox.Show("请选择取款账单");
     }
 }
Esempio n. 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     Control.Control control = new Control.Control();
     int billid = control.current(mainForm.dbv.dgv);
     if (billid != 0)
     {
         int affected = control.Deposit(billid, Convert.ToInt32(this.textBox1.Text));
         bool time = control.time (billid);
         if (time && affected == 1)
         {
             MessageBox.Show("存款成功");
         }
         else
         {
             MessageBox.Show("存款失败");
         }
     }
     else
     {
         MessageBox.Show("请选择存款账单");
     }
 }