DataTable dt = new DataTable(); try { string spName = "spResult1"; List<sqlparameter> paramlist=new List<sqlparameter>(); paramlist.Add(new SqlParameter("@fromDate",obj.dateFrom)); paramlist.Add(new SqlParameter("@toDate",obj.dateTo)); DataSet ds = SqlHelper.ExecuteDataset(objconn._connectionString, spName, paramlist.ToArray()); dt = ds.Tables[0]; } catch(Exception ex) { MessageBox.Show(ex.Message.ToString()); } return dt;</sqlparameter></sqlparameter>
obj.dateFrom
obj.dateTo
SqlHelper
SqlParameter
DateTime
SqlHelper.ExecuteDataset
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)