This commit is contained in:
Thermo_SIM
2021-03-19 18:00:03 +01:00
parent 7b132793d0
commit 36e0927bd1
3 changed files with 116 additions and 0 deletions
@@ -15,6 +15,7 @@ using System.Windows.Media.Animation;
using TeamDev.SDK.MVVM;
using Thermo.Active.Config;
using Thermo.Active.Database.Controllers;
using Thermo.Active.Model.DatabaseModels;
using Thermo.Active.Model.DTOModels;
using Thermo.Active.Model.DTOModels.ThIO;
using Thermo.Active.Model.DTOModels.ThRecipe;
@@ -364,5 +365,41 @@ namespace Thermo.Active.Controllers.WebApi
// ritorno solo fatto!
return Ok(expires);
}
[ResponseType(typeof(List<HistorySheetModel>))]
[Route("SheetHistory"), HttpGet]
public IHttpActionResult GetSheetHistory()
{
using (HistorySheetsController hsc = new HistorySheetsController())
{
List<HistorySheetModel> models = hsc.GetData();
return Ok(models);
}
}
[ResponseType(typeof(List<HistorySheetModel>))]
[Route("SheetHistoryFiltered"), HttpGet]
public IHttpActionResult GetSheetHistoryFiltered(int start, int number)
{
using (HistorySheetsController hsc = new HistorySheetsController())
{
List<HistorySheetModel> models = hsc.GetData(start, number);
return Ok(models);
}
}
[ResponseType(typeof(int))]
[Route("SheetHistoryCount"), HttpGet]
public IHttpActionResult GetSheetHistoryCount()
{
using (HistorySheetsController hsc = new HistorySheetsController())
{
return Ok(hsc.count());
}
}
}
}