Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void textBox1_TextChanged(object sender, EventArgs e)
- {
- string k = "select * from Glumac where GlumacId=" + textBox1.Text;
- try
- {
- con.Open();
- SqlCommand cmd = new SqlCommand(k, con);
- SqlDataReader dr = cmd.ExecuteReader();
- while(dr.Read())
- {
- textBox2.Text = dr[1].ToString();
- textBox3.Text = dr[2].ToString();
- textBox4.Text = dr[3].ToString();
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- throw;
- }
- finally
- {
- if (con.State == ConnectionState.Open) con.Close();
- osvezi();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement