daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest Jan 16th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private void button5_Click(object sender, EventArgs e)
  2.         {
  3.             SqlConnection conn = new SqlConnection("Data Source=MAZI-PC\PROJECTACC;Initial Catalog=programDB;Integrated Security=True");
  4.             SqlCommand cmd = new SqlCommand("select label_sh from label_text where label_form='2' and label_form_labelID='1'", conn);
  5.             conn.Open();
  6.             label1.Text = cmd.ExecuteReader().ToString();
  7.             conn.Close();
  8.  
  9.             SqlConnection conn1 = new SqlConnection("Data Source=MAZI-PC\PROJECTACC;Initial Catalog=programDB;Integrated Security=True");
  10.             SqlCommand cmd1 = new SqlCommand("select label_sh from label_text where label_form='2' and label_form_labelID='2'", conn1);
  11.             conn1.Open();
  12.             label2.Text = cmd1.ExecuteReader().ToString();
  13.             conn1.Close();
  14.  
  15.             SqlConnection conn2 = new SqlConnection("Data Source=MAZI-PC\PROJECTACC;Initial Catalog=programDB;Integrated Security=True");
  16.             SqlCommand cmd2 = new SqlCommand("select label_sh from label_text where label_form='2' and label_form_labelID='3'", conn2);
  17.             conn2.Open();
  18.             label3.Text = cmd2.ExecuteReader().ToString();
  19.             conn2.Close();
  20.         }
  21.    
  22. label3.Text = (string) cmd2.ExecuteScalar();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top