<pre lang="c#"> [WebMethod] public static void ws_GetTaskData(string pFromDate) { try { DateTime date = DateTime.ParseExact(pFromDate, "M/d/yyyy", System.Globalization.CultureInfo.InvariantCulture); string formattedDate = date.ToString("yyyy-MM-dd"); var callFunction = new Home_AdminDashboard(); callFunction.s_BindData(pFromDate); } catch (Exception ex) { clsException.WriteLog("AdminDashboard.aspx", "ws_GetTaskData", ex.Message); } }
private void s_BindData(string sFromDate) { try { AdminDashboard objJobPost = new AdminDashboard(); objJobPost.CompanyID = clsSession.CompanyID; objJobPost.Date = sFromDate; DataSet ds = objJobPost.GetList(); if (ds.Tables[2] != null) { rptDateEvents.DataSource = ds.Tables[2]; //NullReference EXception generated here rptDateEvents.DataBind(); } } catch(Exception ex) { clsException.WriteLog(strCodeFile, "s_BindData", ex.Message); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)