Merge branch 'master' of 10.0.0.83:/usr/local/git/VirtualTask
This commit is contained in:
commit
78fa7b0286
@ -137,19 +137,33 @@ namespace VirtualTask.Controllers
|
||||
|
||||
modelList = JsonConvert.DeserializeObject<List<Rapportini>>(data);
|
||||
|
||||
if (impianto != null)
|
||||
if (string.IsNullOrEmpty(impianto))
|
||||
{
|
||||
modelList = modelList.Where(x => x.codice_impianto.Equals(impianto)).ToList();
|
||||
impianto = "- Impianto";
|
||||
}
|
||||
|
||||
if (!dataFin.ToString().Substring(0, 10).Equals("01/01/0001"))
|
||||
if (impianto.Equals("System.Collections.Generic.List`1[Microsoft.AspNetCore.Mvc.Rendering.SelectListItem]") || impianto.Equals("- Impianto"))
|
||||
{
|
||||
modelList = modelList.Where(x => x.data_rapportino.GetValueOrDefault().Date >= dataIni.Date && x.data_rapportino.GetValueOrDefault().Date <= dataFin.Date).ToList();
|
||||
modelList = modelList;
|
||||
}
|
||||
else
|
||||
{
|
||||
modelList = modelList.Where(x => x.data_rapportino.GetValueOrDefault().Date >= dataIni.Date).ToList();
|
||||
if (impianto != null)
|
||||
{
|
||||
modelList = modelList.Where(x => x.codice_impianto.Equals(impianto)).ToList();
|
||||
}
|
||||
|
||||
if (!dataFin.ToString().Substring(0, 10).Equals("01/01/0001"))
|
||||
{
|
||||
modelList = modelList.Where(x => x.data_rapportino.GetValueOrDefault().Date >= dataIni.Date
|
||||
&& x.data_rapportino.GetValueOrDefault().Date <= dataFin.Date).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
modelList = modelList.Where(x => x.data_rapportino.GetValueOrDefault().Date >= dataIni.Date).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var workbook = new XLWorkbook();
|
||||
workbook.AddWorksheet("sheetName");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user