maximkustreev

Untitled

Apr 18th, 2013
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.59 KB | None | 0 0
  1.  private void Que(string q = "")
  2.         {
  3.             string constring = en.connectstr();
  4.             SqlConnection conn = new SqlConnection(constring);
  5.             SqlCommand cmd = new SqlCommand();
  6.             cmd.CommandType = CommandType.Text;
  7.             cmd.CommandText = q;
  8.             cmd.Connection = conn;
  9.             try
  10.             {
  11.                 conn.Open();
  12.             }
  13.             catch (SqlException) { en.message(); }
  14.             cmd.ExecuteNonQuery();
  15.             conn.Close();
  16.             this.Hide();
  17.             add a = new add();
  18.             a.Show();
  19.  
  20.         }
Advertisement
Add Comment
Please, Sign In to add comment