public IHttpActionResult getcollectedData([FromBody] Statistic myresponse) { Boolean op = StatisticDbHandler.getcollectedData(myresponse); if (op == false) { return(Ok(new { success = false, message = "Could not add data" })); } return(Ok(new { success = true })); }
public IHttpActionResult getStatisticAfterDate([FromBody] StatisticAfterDateModel datestat) { List <Statistic> stat = StatisticDbHandler.getStatisticAfterDateProcedure(datestat.firstdate, datestat.lastdate); if (stat != null) { return(Ok(stat)); } else { return(Ok(new { success = false, message = "error can't retrieve statistic " })); } }
public IHttpActionResult getStatistic([FromBody] Statistic statistic) { List <Statistic> stat = StatisticDbHandler.getStatistic(); if (stat != null) { return(Ok(stat)); } else { return(Ok(new { success = false, message = "error can't retrieve statistic " })); } }