protected void Page_Load(object sender, EventArgs e) { } protected void btnshowreng_Click(object sender, EventArgs e) { ConnectionManager cm = new ConnectionManager(); cm.Command.CommandText = "select * from tblFeedsItems where InsertDate between '" + JQDatePickerstart.Date + "' and '" + JQDatePickerend.Date + "' "; cm.Command.CommandType = CommandType.Text; cm.Connection.Open(); SqlDataReader dr=cm.Command.ExecuteReader(); DataTable dt = new DataTable("dt"); dt.Load(dr); GridView1.DataSource = dt; GridView1.DataBind(); cm.Connection.Close(); } protected void btndelete_Click(object sender, EventArgs e) { ConnectionManager cm=new ConnectionManager(); cm.Command.Parameters.Clear(); cm.Command.CommandText = "Mysp_tblFeedsItems_delete_byDate"; cm.Command.CommandType = CommandType.StoredProcedure; cm.Command.Parameters.Add("@start", SqlDbType.DateTime).Value = JQDatePickerstart.Date; cm.Command.Parameters.Add("@end", SqlDbType.DateTime).Value = JQDatePickerend.Date; cm.Connection.Open(); cm.Command.EndExecuteNonQuery(); cm.Connection.Close(); }
cm.Command.EndExecuteNonQuery();
cm.Command.ExecuteNonQuery();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)