public IHttpActionResult Get(string id, DateTime?beginDate, DateTime?endDate, int?memberNumber) { var result = serv.getQuery( new Service.DTO.SearchOptions { idOrName = id, endDate = endDate, beginDate = beginDate, dwccardnum = memberNumber }); return(Json(new { data = result })); }
public ActionResult Get( [FromRoute] string id, [FromQuery] DateTime?beginDate, [FromQuery] DateTime?endDate, [FromQuery] int?memberNumber ) { endDate = endDate?.AddDays(1); // date passed by TS does not reflect desired range, and is of type string... var result = serv.getQuery( new Service.DTO.SearchOptions { idOrName = id, endDate = endDate, beginDate = beginDate, dwccardnum = memberNumber }); return(new JsonResult(new { data = result })); }
public ActionResult Get( [FromRoute] string id, [FromQuery] DateTime?beginDate, [FromQuery] DateTime?endDate, [FromQuery] int?memberNumber ) { MapperHelpers.ClientTimeZoneInfo = _clientTimeZoneInfo; endDate = endDate?.AddDays(1); // date passed does not reflect desired range, and is of type string... var result = _serv.getQuery( new Service.DTO.SearchOptions { idOrName = id, endDate = endDate.ToUtcDatetime(), beginDate = beginDate.ToUtcDatetime(), dwccardnum = memberNumber }); return(new JsonResult(new { data = result })); }