{ string startdate = ""; //string todate = ""; DataTable objDt = null; try { DateTime fromdate = DateTime.Parse(txtfromdate.Text.Trim()); DateTime todate = DateTime.Parse(txttodate.Text.Trim()); TimeSpan ts = todate.Subtract(fromdate); string i = ts.Days.ToString(); int[] values = new int[Convert.ToInt32(i)]; for (int j = 0; j <= Convert.ToInt32(i); j++) { fromdate = fromdate.AddDays(j); DBClass objDBClass = new DBClass(); objDt = new DataTable(); //DateTime start = DateTime.Parse(txtfromdate.Text.Trim()); startdate = fromdate.ToString("yyyy/MM/dd"); objDt = objDBClass.Getdefaulterlist(startdate); if (objDt.Rows.Count > 0) { dgdefaulertlist.DataSource = objDt; dgdefaulertlist.DataBind(); } else { lblmsg.Text = "No Record Found"; dgdefaulertlist.DataSource = null; dgdefaulertlist.DataBind(); } fromdate =DateTime.Parse(txtfromdate.Text.Trim()); } }
dt1.merge(dt2);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)