SqlCoection con = new SqlCoection(@"Data Source=.;Initial Catalog=mobile;Integrated Security=True");
SqlCommand cmd = new SqlCommand();
DataSet ds = new DataSet();
SqlDataAdapter adp = new SqlDataAdapter();
adp.SelectCommand.Coection = con;
adp.SelectCommand = new SqlCommand();
adp.SelectCommand.CommandText = "select * from sabtbuy where tarikh between '" + maskedTextBox1.Text + "' AND '" + maskedTextBox2.Text + "'";
adp.Fill(ds, "sabtbuy");
dataGridView1.DataSource = ds;
dataGridView1.DataMember = "sabtbuy";
برچسب:
نویسنده: خنج