string liaoxiao;

if (radioButton4.Checked)
   liaoxiao = "+this.radioButton5.Text+";
    liaoxiao = 3;
else if (radioButton5.Checked)
    liaoxiao = "+this.radioButton5.Text+";
else if (radioButton6.Checked)
   liaoxiao = "+this.radioButton6.Text+";
else if (radioButton7.Checked)
   liaoxiao = "+this.radioButton7.Text+";
else if (radioButton8.Checked)
   liaoxiao = "+this.radioButton8.Text+";
else if (radioButton9.Checked)
      liaoxiao = "+this.radioButton9.Text+";
//路����SQL��菘��路���������玫�ID�����,�约��建����菘��� 
//string str_conn = "Data Source=9e72d1a024f740a\SQLEXPRESS;Initial Catalog=msdb;Integrated Security=True";//����一������

SqlConnection m_dbConnection = new SqlConnection(@"Data Source=9e72d1a024f740a\SQLEXPRESS;Initial Catalog=msdb;Integrated Security=True");//����一������,�������始��

if (m_dbConnection != null)//�卸��欠��������
{
    MessageBox.Show("��菘������樱�", "��示", MessageBoxButtons.OK, MessageBoxIcon.Information);

}

try//try catch���只��为�税�全�����谴虿豢���菘��时�虿换�������腔�����示��
//���确�虐�全������只��try��������
{
    m_dbConnection = new System.Data.SqlClient.SqlConnection(@"Data Source=9e72d1a024f740a\SQLEXPRESS;Initial Catalog=msdb;Integrated Security=True");//��一����锌��蕖�������一�话一����芨���一��

    m_dbConnection.Open();

}
catch (Exception ex)
{

    MessageBox.Show("��菘�虿豢���");

}

string str_sql = "update Bingrenmenzhenjiancha set Liaoxiaopanduan=liaoxiao where Xuliehao='" + this.textBox1.Text + "'";
//string str_sql = string.Format("insert into Bingrenmenzhenjiancha(Chati)values('{0}')", textBox18.Text);
//string str_sql = string.Format("update Bingrenmenzhenjiancha set Chati=21 where Xuliehao={'0'}",int.Parse(textBox18.Text));
SqlCommand command1 = m_dbConnection.CreateCommand();//�陆�一�����蟛⒊�始��


command1.CommandText = str_sql;

//command1.Connection.Close();

try
{
    command1.ExecuteNonQuery();

}
catch
{

}

��未��������诘����选��时�迅玫�选���Text���源��到��菘��校��������诤�色�����遣�知����么写���������忙 ��谢谢 
�������������������: ��值  radiobutton   

--
�� ��源:�������实BBS http://bbs.tju.edu.cn [FROM: 202.113.1.201]