private void button3_Click(object sender, EventArgs e) { int Find_result; chloe_control_all chloe_obj = new chloe_control_all("Data Source=DESKTOP-O4C25KM;Initial Catalog=场馆预约系统;Integrated Security=True"); Find_result = chloe_obj.user_find(textBox1.Text); if (Find_result == 0) { MessageBox.Show("该用户名可以使用!"); } else if (Find_result == 1) { MessageBox.Show("该用户名已被注册,请重新输入"); } }