private void button1_Click(object sender, EventArgs e) { if (textbox5.Text == "") { MessageBox.Show("请正确输入信息"); return; } String id, name, address, time; int price; id = textbox1.Text; name = textbox2.Text; address = textbox3.Text; time = textbox4.Text; price = int.Parse(textbox5.Text); chloe_control_all chloe_obj = new chloe_control_all("Data Source=DESKTOP-O4C25KM;Initial Catalog=场馆预约系统;Integrated Security=True"); chloe_obj.Yard_XG(id, name, address, time, price); }