C#操作数据库,如图sql语句,我想将winform上控件的Text值赋为查出来的批号和所属批次数据

SQL语句:
string sql = "select 批号,所属批次 from pihao_db where 罐号 like '"+guanhao+"%'";

 SqlConnection conn = new SqlConnection(你的连接字符串);
conn.Open();
SqlCommand cmd = new SqlCommand(你的sql);
DataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
textBox1.Text = dr["批号"].ToString();
textBox2.Text = dr["所属批次"].ToString();
}
else
{
MessageBox.Show("没有找到");
}