private void button1_Click(object sender, EventArgs e) { temp.TeamName = textBox1.Text; temp.TeamLinkman = textBox2.Text; temp.TeamTel = textBox3.Text; temp.TeamAddress = textBox4.Text; temp.Password = textBox5.Text; temp.PolicyModCar = checkBox1.Checked ? 1 : 0; temp.PolicyOrder = checkBox2.Checked ? 1 : 0; temp.PolicyRegion = checkBox3.Checked ? 1 : 0; temp.PolicyRegionAlarm = checkBox4.Checked ? 1 : 0; if (this.Text == "添加车队") { FormMain.C_Info_AddTeam(temp); } else { FormMain.C_Info_ModifyTeam(temp); } }