c#点击一个按钮 从数据库一个表中获取其中两个字段的值?解决方案

c#点击一个按钮 从数据库一个表中获取其中两个字段的值???
输入“编号”点击 “查询”
获取到 实际成本、预算成本 两个字段的值。。。

------解决方案--------------------
string strConn = "Data Source=.;Initial Catalog=基于责任中心的企业成本控制系统;Integrated Security=True";
SqlConnection cn = new SqlConnection(strConn);
try
{
string sql="select 实际成本,预算成本 from 产品信息表 where 产品编号='"+textBox1.Text.Trim()+"'";
cn.Open();
MessageBox.Show("查询成功!");
SqlDataAdapter adapter = new SqlDataAdapter(sql,con);
DataSet ds = new DataSet();
adapter.Fill(ds);
foreach(DataRowView drv in ds.Tables[0].DefaultView)
{
MessageBox.Show(drv["实际成本"].ToString()+"|"+drv["预算成本"].ToString());
}
cn.Close();
}
catch (SqlException ex)
{
MessageBox.Show(ex.Message);
}