update comportamento: se 0 --> anno corrente
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
using MapoSDK;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace MP.Controllers
|
||||
@@ -78,8 +74,6 @@ namespace MP.Controllers
|
||||
public List<EventDetail> Get()
|
||||
{
|
||||
int anno = DateTime.Now.Year;
|
||||
//string answ = JsonConvert.SerializeObject(elencoEventi(anno));
|
||||
//return answ;
|
||||
return elencoEventi(anno);
|
||||
}
|
||||
|
||||
@@ -91,8 +85,8 @@ namespace MP.Controllers
|
||||
[HttpGet]
|
||||
public List<EventDetail> Get(int id)
|
||||
{
|
||||
//string answ = JsonConvert.SerializeObject(elencoEventi(id));
|
||||
//return answ;
|
||||
// se chiede 0 --> prende anno corrente!
|
||||
id = id == 0 ? DateTime.Now.Year : id;
|
||||
return elencoEventi(id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user