In this code it shows me 3 data with the same number of folio and the same department, with the help of a listBox
, however I want it to also be shown in 3 textbox that I have (Obviously the data that will show are 3 different, such as listBox
)
public void listSMTQA()
{
DateTime hoy = DateTime.Now;
string folioid = hoy.ToString("ddMMyy");
cn.Open();
SqlCommand comando = new SqlCommand("Select SMT from tbl_Issues where folio='" + folioid + "' and Dpto='Quality'", cn);
SqlDataReader leer;
leer = comando.ExecuteReader();
while (leer.Read() == true)
{
listBox3.Items.Add(leer[0].ToString());
//Aqui quiero que los muestre tambien
textBox5.Text = leer["SMT"].ToString();
textBox6.Text = leer["SMT"].ToString();
textBox7.Text = leer["SMT"].ToString();
}
cn.Close();
}