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("请选择存款账单"); } }