C# code

mail@pastecode.io avatar
unknown
assembly_x86
2 years ago
396 B
4
Indexable
Never
public void selectOrsearch()
        {
            dt.Clear();
            cmd = new SqlCommand("selectOrsearch_material", cn);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@searchtxt", SqlDbType.VarChar).Value = searchtxt.Text;
            da = new SqlDataAdapter(cmd);
            da.Fill(dt);
            this.metroGrid1.DataSource = dt;
        }