SqlConnection con = new SqlConnection("Data Source=SW-PC-20;Initial Catalog=PSM;Integrated Security=True"); con.Open(); SqlCommand com = new SqlCommand("select Prospect_ID,Prospect_Name from Filter where Prospect_ID='" + dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString() + "'", con); SqlDataReader dr = com.ExecuteReader(); if (dr.HasRows) { dr.Read(); cboprospectid.Text = dr[0].ToString(); cboprospectname.Text = dr[1].ToString(); } dr.Close(); con.Close();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)