public string GetNoStartAndWorkingEventList(string pRequest) { EventListRD rd = new EventListRD(); var reqObj = pRequest.DeserializeJSONTo <APIRequest <EventListRP> >(); var loggingSessionInfo = new SessionManager().CurrentUserLoginInfo; LEventsBLL bll = new LEventsBLL(loggingSessionInfo); var ds = bll.GetNoStartAndWorkingEventList(); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { rd.LEventsList = DataTableToObject.ConvertToList <EventsList>(ds.Tables[0]).ToArray();//直接根据所需要的字段反序列化 } var rsp = new SuccessResponse <IAPIResponseData>(rd); return(rsp.ToJSON()); }
public string GetEventList(string pRequest) { EventListRD rd = new EventListRD(); var reqObj = pRequest.DeserializeJSONTo <APIRequest <EventListRP> >(); var loggingSessionInfo = new SessionManager().CurrentUserLoginInfo; LEventsBLL bll = new LEventsBLL(loggingSessionInfo); DataSet ds = bll.GetEventList(reqObj.Parameters.PageIndex, reqObj.Parameters.PageSize, reqObj.Parameters.Title, reqObj.Parameters.DrawMethodName, reqObj.Parameters.BeginTime, reqObj.Parameters.EndTime); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { rd.LEventsList = DataTableToObject.ConvertToList <EventsList>(ds.Tables[0]).ToArray();//直接根据所需要的字段反序列化 rd.TotalCount = Convert.ToInt32(ds.Tables[1].Rows[0]["TotalCount"].ToString()); rd.PageCount = Convert.ToInt32(ds.Tables[1].Rows[0]["PageCount"].ToString()); } var rsp = new SuccessResponse <IAPIResponseData>(rd); return(rsp.ToJSON()); }