diff --git a/ApiPolo/Controllers/AdminController.cs b/ApiPolo/Controllers/AdminController.cs
new file mode 100644
index 0000000..62f0dc5
--- /dev/null
+++ b/ApiPolo/Controllers/AdminController.cs
@@ -0,0 +1,75 @@
+using ApiPolo.Models;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Data.SqlClient;
+using System.Data;
+using System.IdentityModel.Tokens.Jwt;
+
+namespace ApiPolo.Controllers
+{
+ /// Controller per Admin
+ [Route("api/[controller]")]
+ [ApiController]
+ public class AdminController : Controller
+ {
+ private readonly IConfiguration _configuration;
+
+ ///
+ public AdminController(IConfiguration configuration)
+ {
+ _configuration = configuration;
+ }
+
+ ///
+ [HttpGet("esegui")]
+ public IActionResult EseguiStoredProcedure([FromQuery] string token, [FromQuery] int idReg,[FromQuery] string stored)
+ {
+ string connStr = _configuration.GetConnectionString("ApiStr");
+ string sa = getClaimValueByToken(token, "superAdmin");
+ if(!string.IsNullOrEmpty(sa) && sa.Equals("S"))
+ {
+ using (SqlConnection conn = new SqlConnection(connStr))
+ {
+ using (SqlCommand cmd = new SqlCommand(stored, conn))
+ {
+ cmd.CommandType = CommandType.StoredProcedure;
+ // Aggiungi i parametri richiesti dalla stored procedure
+ cmd.Parameters.Add(new SqlParameter("@idReg", idReg));
+
+ try
+ {
+ conn.Open();
+ int righeEffettuate = cmd.ExecuteNonQuery();
+
+ return Ok(new { Successo = true, RigheInserite = righeEffettuate });
+ }
+ catch (Exception ex)
+ {
+ return StatusCode(500, $"Errore durante l'inserimento: {ex.Message}");
+ }
+ }
+ }
+ }
+ else
+ {
+ return StatusCode(403, "Accesso negato: non hai i permessi necessari.");
+ }
+
+
+ }
+
+
+ private string getClaimValueByToken(string token, string claimName)
+ {
+ string t = string.Empty;
+
+ var handler = new JwtSecurityTokenHandler();
+ var jwtSecurityToken = handler.ReadJwtToken(token);
+ if (jwtSecurityToken != null)
+ {
+ var id = jwtSecurityToken.Claims.First(claim => claim.Type == claimName).Value;
+ t = id;
+ }
+ return t;
+ }
+ }
+}
diff --git a/ApiPolo/Controllers/PoloController.cs b/ApiPolo/Controllers/PoloController.cs
index c5911e4..d0b2449 100644
--- a/ApiPolo/Controllers/PoloController.cs
+++ b/ApiPolo/Controllers/PoloController.cs
@@ -71,7 +71,7 @@ namespace ApiPolo.Controllers
private readonly TokenDbContext? _tokens;
- private readonly Maras_DbContext _Maras;
+
#region TECNICI
private readonly FERRA_TECNICIDbContext _Ferra_tecnici;
private readonly MARRO_TECNICIDbContext _Marro_tecnici;
@@ -475,6 +475,8 @@ namespace ApiPolo.Controllers
#region Commesse desc
private readonly SIET_COMMESSE_DESC_DbContext _Siet_commDesc;
private readonly MARRO_COMMESSE_TABLE_DbContext _Marro_commDesc;
+ private readonly GITSR_COMMESSE_TABLE_DbContext _Gitoga_commDesc;
+ private readonly LIFTA_COMMESSE_TABLE_DbContext _Lifta_commDesc;
#endregion
#region Associazione Codici chiusura - codici intervento
@@ -540,7 +542,7 @@ namespace ApiPolo.Controllers
IConfiguration configuration,
ConfigurazioniDbContext config,
TokenDbContext tokens,
- Maras_DbContext maras,
+
#region tecnici
FERRA_TECNICIDbContext Ferra_tecnici,
@@ -857,6 +859,8 @@ namespace ApiPolo.Controllers
#region CommesseDesc
SIET_COMMESSE_DESC_DbContext Siet_commDesc,
MARRO_COMMESSE_TABLE_DbContext Marro_commDesc,
+ GITSR_COMMESSE_TABLE_DbContext Gitoga_commDesc,
+ LIFTA_COMMESSE_TABLE_DbContext Lifta_commDesc,
#endregion
#region Associazione Codici chiusura - codici intervento
@@ -1255,6 +1259,8 @@ namespace ApiPolo.Controllers
#region Commesse desc
_Siet_commDesc = Siet_commDesc;
_Marro_commDesc = Marro_commDesc;
+ _Gitoga_commDesc = Gitoga_commDesc;
+ _Lifta_commDesc = Lifta_commDesc;
#endregion
#region Associazione codici chiusura - codici intervento
@@ -1267,7 +1273,7 @@ namespace ApiPolo.Controllers
_Sys_Buoni = Sys_Buoni;
#endregion
- _Maras = maras;
+
}
#region Utility
@@ -2999,8 +3005,7 @@ namespace ApiPolo.Controllers
/// Syscom
public const string Syscom = "A0001";
- /// Syscom
- public const string Maras = "MARAS";
+
}
///
@@ -12010,6 +12015,61 @@ namespace ApiPolo.Controllers
return co;
}
+ private CommesseAdHoc_out formattaCommessaMarrocco(Commessa commessa)
+ {
+ StringBuilder sb = new StringBuilder();
+ string _item = string.Empty;
+ CommesseAdHoc_out co = new CommesseAdHoc_out();
+
+ if (!string.IsNullOrEmpty(commessa.imcodimp))
+ {
+ sb.AppendLine("Comm: " + commessa.lacodcom);
+
+
+ string via = !string.IsNullOrEmpty(commessa.imindiri1) ? commessa.imindiri1.Trim() : string.Empty;
+ string indiri = !string.IsNullOrEmpty(commessa.imindiri2) ? commessa.imindiri2.Trim() : string.Empty;
+ string num = string.Empty;
+ if (commessa.imindiri3 != null && commessa.imindiri3.Value > 0)
+ {
+ num = commessa.imindiri3.ToString().Trim();
+ }
+ string num2 = !string.IsNullOrEmpty(commessa.imindiri4) ? commessa.imindiri4.Trim() : string.Empty;
+ string sca = !string.IsNullOrEmpty(commessa.imindiri5) ? commessa.imindiri5.Trim() : string.Empty;
+
+ string appo = string.Empty;
+ //appo = via + indiri + num + num2 + sca;
+
+ if (!string.IsNullOrEmpty(via)) appo = appo + via;
+ if (!string.IsNullOrEmpty(indiri)) appo = appo + " " + indiri;
+ if (!string.IsNullOrEmpty(num)) appo = appo + " ," + num;
+ if (!string.IsNullOrEmpty(num2)) appo = appo + " Int: " + num2;
+ if (!string.IsNullOrEmpty(sca)) appo = appo + " Scala: " + sca;
+ sb.AppendLine(appo);
+
+ co.itemList = sb.ToString();
+ }
+ sb = null;
+
+ //copio anche gli altri campi della commessa
+ co.andescri = commessa.andescri;
+ co.imindiri1 = commessa.imindiri1;
+ co.imindiri2 = commessa.imindiri2;
+ co.imindiri3 = commessa.imindiri3;
+ co.imindiri4 = commessa.imindiri4;
+ co.imindiri5 = commessa.imindiri5;
+ co.imcodcap = commessa.imcodcap;
+ co.imcodimp = commessa.imcodimp;
+ co.imlocali = commessa.imlocali;
+ co.improvin = commessa.improvin;
+ co.lacodcli = commessa.lacodcli;
+ co.lacodcom = commessa.lacodcom;
+ co.ladatchi = commessa.ladatchi;
+ co.ladeslav = commessa.ladeslav;
+ co.laserial = commessa.laserial;
+ co.latipcli = commessa.latipcli;
+
+ return co;
+ }
private CommesseAdHoc_out formattaCommessaVT(CommesseVT commessa)
{
StringBuilder sb = new StringBuilder();
@@ -12107,7 +12167,40 @@ namespace ApiPolo.Controllers
foreach(Commessa c in commesse_filtrate)
{
CommesseAdHoc_out co = new CommesseAdHoc_out();
- co=formattaCommessa(c);
+ co= formattaCommessa(c);
+ ll.Add(co);
+ }
+ }
+ else if (ten.Equals(Clienti.Gitoga))
+ {
+ _comm = getCommesseByTenant(ten);
+ var l = await _comm.OrderByDescending(t => t.ladatchi).ToListAsync();
+ List commesse_filtrate = new List();
+ _commDesc = _Gitoga_commDesc.Commdesc;
+ var commesse_tecnico = _commDesc.Where((t => t.latecsup != null && t.latecsup.Equals(tecnico))).ToList();
+ foreach (CommessaDesc c in commesse_tecnico)
+ {
+ var co = _comm.Where(t => t.laserial.Equals(c.laserial)).ToList();
+ if (co != null && co.Count > 0)
+ {
+ commesse_filtrate.Add(co.First());
+ }
+ }
+ foreach (Commessa c in commesse_filtrate)
+ {
+ CommesseAdHoc_out co = new CommesseAdHoc_out();
+ co = formattaCommessaMarrocco(c);
+ ll.Add(co);
+ }
+ }
+ else if ( ten.Equals(Clienti.Lifta))
+ {
+ _comm = getCommesseByTenant(ten);
+ var l = await _comm.OrderByDescending(t => t.ladatchi).ToListAsync();
+ foreach (Commessa c in l)
+ {
+ CommesseAdHoc_out co = new CommesseAdHoc_out();
+ co = formattaCommessaMarrocco(c);
ll.Add(co);
}
}
@@ -12115,10 +12208,11 @@ namespace ApiPolo.Controllers
{
_comm = getCommesseByTenant(ten);
var l = await _comm.OrderByDescending(t => t.ladatchi).ToListAsync();
+
foreach (Commessa c in l)
{
CommesseAdHoc_out co = new CommesseAdHoc_out();
- co = formattaCommessa(c);
+ co = formattaCommessaMarrocco(c);
ll.Add(co);
}
}
@@ -14144,6 +14238,7 @@ namespace ApiPolo.Controllers
new Claim("tenant", model.Tenant),
new Claim("tenant2", tecnico.First().tccodazi),
new Claim("tccodice", tecnico.First().tccodice),
+ new Claim("superAdmin", !string.IsNullOrEmpty (tecnico.First().tcsuper)?tecnico.First().tcsuper:"N"),
};
var authSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(_configuration["JWT:Secret"]));
var token = new JwtSecurityToken(
diff --git a/ApiPolo/Controllers/TestController.cs b/ApiPolo/Controllers/TestController.cs
deleted file mode 100644
index 906b954..0000000
--- a/ApiPolo/Controllers/TestController.cs
+++ /dev/null
@@ -1,791 +0,0 @@
-using ApiPolo.Interfaces;
-using ApiPolo.Models;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.EntityFrameworkCore;
-using System.IdentityModel.Tokens.Jwt;
-using System.Text;
-using static ApiPolo.Controllers.PoloController;
-
-namespace ApiPolo.Controllers
-{
- ///
- public class TestController : Controller
- {
- //interfaccia con tutti i possibili dbset
- private readonly ITenantDbContextFactory _dbContextFactory;
- //DI con ITenantDbContextFactory
- ///
- private DbSet? _chiamate;
- public TestController(ITenantDbContextFactory dbContextFactory)
- {
- _dbContextFactory = dbContextFactory;
- }
-
- //ATTENZIONE - CONFLITTO TRA Compo_Impia_Table e
-
- #region GET_BY_TENANT
- private DbSet getTecniciByTenant(string tenant)
- {
- var dbContext = _dbContextFactory.GetDbContext(tenant);
- return dbContext.Tecnici; // Use Set() to handle different DbContexts
- }
- private DbSet getRappNewByTenant(string tenant)
- {
- var dbContext = _dbContextFactory.GetDbContext(tenant);
- return dbContext.Rapps; // Use Set() to handle different DbContexts
- }
- private DbSet getChiamateByTenant(string tenant)
- {
- var dbContext = _dbContextFactory.GetDbContext(tenant);
- return dbContext.Chiamate; // Use Set() to handle different DbContexts
- }
- private DbSet? getChiusureByTenant(string tenant)
- {
- var dbContext = _dbContextFactory.GetDbContext(tenant);
- return dbContext.Chiusure;
- }
- private DbSet getManutenzioniByTenant(string tenant)
- {
- var dbContext = _dbContextFactory.GetDbContext(tenant);
- return dbContext.Manutenzioni; // Use Set() to handle different DbContexts
- }
- private DbSet getPreseByTenant(string tenant)
- {
- var dbContext = _dbContextFactory.GetDbContext(tenant);
- return dbContext.Prese; // Use Set() to handle different DbContexts
- }
- private DbSet getSto_RappByTenant(string tenant)
- {
- var dbContext = _dbContextFactory.GetDbContext(tenant);
- return dbContext.StoRapp; // Use Set() to handle different DbContexts
- }
- private DbSet getClientiByTenant(string tenant)
- {
- var dbContext = _dbContextFactory.GetDbContext(tenant);
- return dbContext.Clienti; // Use Set() to handle different DbContexts
- }
- private DbSet getCausaliRappByTenant(string tenant)
- {
- var dbContext = _dbContextFactory.GetDbContext(tenant);
- return dbContext.Causali; // Use Set() to handle different DbContexts
- }
- private DbSet getPagamentiByTenant(string tenant)
- {
- var dbContext = _dbContextFactory.GetDbContext(tenant);
- return dbContext.Pagamenti; // Use Set() to handle different DbContexts
- }
-
- private DbSet getSaldiartByTenant(string tenant)
- {
- var dbContext = _dbContextFactory.GetDbContext(tenant);
- return dbContext.Saldi; // Use Set() to handle different DbContexts
- }
- ///
- /// CONFLITTO CON Compo_Impia_Table
- ///
- /*
- private DbSet getComponentiByTenant(string tenant)
- { // IN CONFLITTO CON Compo_Impia_Table
- var dbContext = _dbContextFactory.GetDbContext(tenant);
- return dbContext.Componen; // Use Set() to handle different DbContexts
- }*/
- private DbSet getComponentiTableByTenant(string tenant)
- {
- var dbContext = _dbContextFactory.GetDbContext(tenant);
- return dbContext.Componen; // Use Set() to handle different DbContexts
- }
- private DbSet getMagazziniByTenant(string tenant)
- {
- var dbContext = _dbContextFactory.GetDbContext(tenant);
- return dbContext.Magaz; // Use Set() to handle different DbContexts
- }
- private DbSet getMag_NewByTenant(string tenant)
- {
- var dbContext = _dbContextFactory.GetDbContext(tenant);
- return dbContext.Mag; // Use Set() to handle different DbContexts
- }
- private DbSet getImpiantiByTenant(string tenant)
- {
- var dbContext = _dbContextFactory.GetDbContext(tenant);
- return dbContext.Impia; // Use Set() to handle different DbContexts
- }
- private DbSet getCommesseByTenant(string tenant)
- {
- var dbContext = _dbContextFactory.GetDbContext(tenant);
- return dbContext.Commesse; // Use Set() to handle different DbContexts
- }
- private DbSet getTimbratureByTenant(string tenant)
- {
- var dbContext = _dbContextFactory.GetDbContext(tenant);
- return dbContext.Timbr; // Use Set() to handle different DbContexts
- }
-
- private DbSet getStoricoImpiantoByTenant(string tenant)
- {
- var dbContext = _dbContextFactory.GetDbContext(tenant);
- return dbContext.StoImp; // Use Set() to handle different DbContexts
- }
- private DbSet getAziendeRifByTenant(string tenant)
- {
- var dbContext = _dbContextFactory.GetDbContext(tenant);
- return dbContext.Azi; // Use Set() to handle different DbContexts
- }
- private DbSet getSostituzioneByTenant(string tenant)
- {
- var dbContext = _dbContextFactory.GetDbContext(tenant);
- return dbContext.Sost; // Use Set() to handle different DbContexts
- }
- #endregion
-
- #region utility
- private string getClaimValueByToken(string token, string claimName)
- {
- string t = string.Empty;
-
- var handler = new JwtSecurityTokenHandler();
- var jwtSecurityToken = handler.ReadJwtToken(token);
- if (jwtSecurityToken != null)
- {
- var id = jwtSecurityToken.Claims.First(claim => claim.Type == claimName).Value;
- t = id;
- }
- return t;
- }
- private Chiamate_out fillChiamateOut(Chiamate i, string tenant)
- {
- Chiamate_out o = new Chiamate_out();
- o.chcodazi = i.chcodazi;
- o.chserial = i.chserial;
- o.chstato = i.chstato;
- o.chtchiam = i.chtchiam;
-
- o.chdtapp = i.chdtapp;
- o.choraaPI = i.choraaPI;
- o.chminapi = i.chminapi;
- o.chnote = i.chnote;
-
- o.chcodimp = i.chcodimp;
- o.csdescr = i.csdescr;
- o.antelefo = i.antelefo;
- o.andescri = i.andescri;
- o.imindiri1 = i.imindiri1;
-
- o.imindiri2 = i.imindiri2;
- o.imindiri3 = i.imindiri3;
- o.imindiri4 = i.imindiri4;
- o.imindiri5 = i.imindiri5;
- o.imlocali = i.imlocali;
- o.imrefref = i.imrefref;
- //costruisco il campo indirizzo
- StringBuilder sb = new StringBuilder();
-
- string chiamataIndStampa = string.Empty;
- switch (tenant)
- {
- case Clienti.Marrocco:
- #region marrocco
- chiamataIndStampa = formattaIndirizzoStampaMarrocco(i);
- #endregion
- break;
- case Clienti.Gitoga:
- #region gitoga
- chiamataIndStampa = formattaIndirizzoStampaMarrocco(i);
- #endregion
- break;
- case Clienti.Lifta:
- #region lifta
- chiamataIndStampa = formattaIndirizzoStampaMarrocco(i);
- #endregion
- break;
- case Clienti.Discovery:
- #region Discovery
- chiamataIndStampa = formattaIndirizzoStampaDiscovery(i);
- #endregion
- break;
- case Clienti.Siet:
- //ragione sociale cliente
- sb.Append("SPETT.LE :");
- sb.Append(!string.IsNullOrEmpty(i.andescri) ? i.andescri + " " : string.Empty);
- sb.Append("
");
- //indirizzo
- sb.Append(!string.IsNullOrEmpty(i.imindiri1) ? i.imindiri1.Trim() + " " : string.Empty);
- sb.Append(!string.IsNullOrEmpty(i.imindiri2) ? i.imindiri2.Trim() + " " : string.Empty);
- sb.Append(i.imindiri3 != null ? i.imindiri3.ToString() + " " : string.Empty);
- sb.Append(!string.IsNullOrEmpty(i.imindiri4) ? i.imindiri4.Trim() + " " : string.Empty);
- sb.Append(!string.IsNullOrEmpty(i.imindiri5) ? i.imindiri5.Trim() : string.Empty);
- chiamataIndStampa = sb.ToString();
-
- break;
- default:
- sb.Append("SPETT.LE :");
- if (!string.IsNullOrEmpty(i.andescri))
- {
- sb.Append(!string.IsNullOrEmpty(i.andescri) ? i.andescri + " " : string.Empty);
- sb.Append("
");
- }
-
- sb.Append(!string.IsNullOrEmpty(i.imindiri1) ? i.imindiri1.Trim() + " " : string.Empty);
- sb.Append(!string.IsNullOrEmpty(i.imindiri2) ? i.imindiri2.Trim() + " " : string.Empty);
- sb.Append(i.imindiri3 != null ? i.imindiri3.ToString() + " " : string.Empty);
- sb.Append(!string.IsNullOrEmpty(i.imindiri4) ? i.imindiri4.Trim() + " " : string.Empty);
- sb.Append(!string.IsNullOrEmpty(i.imindiri5) ? i.imindiri5.Trim() : string.Empty);
- chiamataIndStampa = sb.ToString();
- break;
- }
- o.indirizzo_stampa = chiamataIndStampa;
- sb.Clear();
-
- string chiamataItemList = string.Empty;
- switch (tenant)
- {
- case Clienti.Marrocco:
- #region marrocco
- chiamataItemList = formattaItemChiamateMarrocco(i);
- #endregion
- break;
- case Clienti.Gitoga:
- #region gitoga
- chiamataItemList = formattaItemChiamateMarrocco(i);
- #endregion
- break;
- case Clienti.Lifta:
- #region lifta
- chiamataItemList = formattaItemChiamateMarrocco(i);
- #endregion
- break;
- case Clienti.Tedesco:
- #region Tedesco
- chiamataItemList = formattaItemChiamateTedesco(i);
- #endregion
- break;
- case Clienti.VT:
- chiamataItemList = formattaItemChiamateVT(i);
- break;
- default:
- #region default
- sb.Append(!string.IsNullOrEmpty(i.imindiri1) ? i.imindiri1.Trim() + " " : string.Empty);
- sb.Append(!string.IsNullOrEmpty(i.imindiri2) ? i.imindiri2.Trim() + " " : string.Empty);
- sb.Append(i.imindiri3 != null ? i.imindiri3.ToString() + " " : string.Empty);
- sb.Append(!string.IsNullOrEmpty(i.imindiri4) ? i.imindiri4.Trim() + " " : string.Empty);
- sb.Append(!string.IsNullOrEmpty(i.imindiri5) ? i.imindiri5.Trim() + " " : string.Empty);
- sb.Append(!string.IsNullOrEmpty(i.imcodcap) ? " " + i.imcodcap.Trim() + " " : string.Empty);
- sb.Append(!string.IsNullOrEmpty(i.imlocali) ? " " + i.imlocali.Trim() + " " : string.Empty);
-
- if (!string.IsNullOrEmpty(i.chcodimp))
- {
- sb.Append("
");
- sb.Append("Impianto : " + i.chcodimp.Trim());
- }
- chiamataItemList = sb.ToString();
- break;
- #endregion
- }
- o.impianto_list = chiamataItemList;
- sb.Clear();
-
- string rif_impianto = string.Empty;
- switch (tenant)
- {
- case Clienti.Marrocco:
- #region marrocco
- rif_impianto = formattaRiferimentoImpiantoMarrocco(i);
- #endregion
- break;
- case Clienti.Gitoga:
- #region gitoga
- rif_impianto = formattaRiferimentoImpiantoMarrocco(i);
- #endregion
- break;
- case Clienti.Lifta:
- #region lifta
- rif_impianto = formattaRiferimentoImpiantoMarrocco(i);
- #endregion
- break;
- case Clienti.Discovery:
- #region discovery
- rif_impianto = formattaRiferimentoImpiantoDiscovery(i);
- #endregion
- break;
- case Clienti.Ferrari:
- #region ferrari
- rif_impianto = formattaRiferimentoImpiantoFerrari(i);
- #endregion
- break;
- case Clienti.Siet:
- #region SIET
- sb.AppendLine("N. Impianto: " + i.chcodimp);
- if (!string.IsNullOrEmpty(i.imubicaz))
- {
- sb.AppendLine("Ubicazione: " + i.imubicaz);
- }
- if (!string.IsNullOrEmpty(i.chrifer))
- {
- string comm = getCommessaSietBySerial(i.chrifer);
- if (!string.IsNullOrEmpty(comm))
- {
- sb.AppendLine("Commessa: " + comm);
- }
-
- }
-
- rif_impianto = sb.ToString();
- #endregion
- break;
- default:
- sb.AppendLine("N. Impianto: " + i.chcodimp);
- if (!string.IsNullOrEmpty(i.imubicaz))
- sb.AppendLine("Ubicazione: " + i.imubicaz);
-
- rif_impianto = sb.ToString();
- break;
- }
- o.riferimento_impianto = rif_impianto;
- sb.Clear();
-
- o.imcodcap = i.imcodcap;
- o.imcomune = i.imcomune;
- o.improvin = i.improvin;
- o.imcodnaz = i.imcodnaz;
-
- o.immatric = i.immatric;
- o.imnumimp = i.imnumimp;
- o.imubicaz = i.imubicaz;
-
- o.tcdescri = i.tcdescri;
-
- o.tccodice = i.tccodice;
- o.ser_rapp_ic = i.ser_rapp_ic;
- o.tipo_rapp_ic = i.tipo_rapp_ic;
- o.ic = i.ic;
- o.ser_rapp_rif = i.ser_rapp_rif;
-
- o.tipo_rapp_rif = i.tipo_rapp_rif;
- o.rif = i.rif;
- o.ser_rapp_chiu = i.ser_rapp_chiu;
- o.tipo_rapp_chiu = i.tipo_rapp_chiu;
- o.ser_buono_chiu = i.ser_buono_chiu;
-
- o.err_title = i.err_title;
- o.err_detail = i.err_detail;
- o.err_status_code = i.err_status_code;
- o.ancodice = i.ancodice;
- o.chiamata = i.chiamata;
- o.spe_viaggio = i.spe_viaggio;
- o.chnumero = i.chnumero;
-
- Dictionary dic = new Dictionary();
- switch (tenant)
- {
- case Clienti.Marrocco:
- #region marrocco
- dic.Add("Esercizio ", !string.IsNullOrEmpty(i.chcodese) ? i.chcodese : String.Empty);
- dic.Add("REF ", !string.IsNullOrEmpty(i.imrefref) ? i.imrefref : String.Empty);
- dic.Add("Riferimento:", !string.IsNullOrEmpty(i.chrifer) ? i.chrifer : String.Empty);
- dic.Add("Telefono rif.:", !string.IsNullOrEmpty(i.chtelef) ? i.chtelef : String.Empty);
-
- #endregion
- break;
-
- case Clienti.Gitoga:
- #region gitoga
- dic.Add("Esercizio ", !string.IsNullOrEmpty(i.chcodese) ? i.chcodese : String.Empty);
- dic.Add("REF ", !string.IsNullOrEmpty(i.imrefref) ? i.imrefref : String.Empty);
- dic.Add("Riferimento:", !string.IsNullOrEmpty(i.chrifer) ? i.chrifer : String.Empty);
- dic.Add("Telefono rif.:", !string.IsNullOrEmpty(i.chtelef) ? i.chtelef : String.Empty);
- #endregion
- break;
-
- case Clienti.Lifta:
- #region lifta
- dic.Add("Esercizio ", !string.IsNullOrEmpty(i.chcodese) ? i.chcodese : String.Empty);
- dic.Add("REF ", !string.IsNullOrEmpty(i.imrefref) ? i.imrefref : String.Empty);
- dic.Add("Riferimento:", !string.IsNullOrEmpty(i.chrifer) ? i.chrifer : String.Empty);
- dic.Add("Telefono rif.:", !string.IsNullOrEmpty(i.chtelef) ? i.chtelef : String.Empty);
- #endregion
- break;
-
- case Clienti.Ferrari:
- #region ferrari
- dic.Add("Esercizio", !string.IsNullOrEmpty(i.chcodese) ? i.chcodese : String.Empty);
- dic.Add("Tipo", !string.IsNullOrEmpty(i.chtipo) ? i.chtipo : String.Empty);
- dic.Add("Numero chiamata", !string.IsNullOrEmpty(i.chnumero.ToString()) ? i.chnumero.ToString() : String.Empty);
- dic.Add("Data chiamata", !string.IsNullOrEmpty(i.chdata.ToString()) ? i.chdata.ToString() : String.Empty);
- dic.Add("Ora inserimento chiamata", !string.IsNullOrEmpty(i.chora.ToString()) ? i.chora.ToString() : String.Empty);
- dic.Add("Min inserimento chiamata", !string.IsNullOrEmpty(i.chmin.ToString()) ? i.chmin.ToString() : String.Empty);
- dic.Add("Operatore assegnazione", !string.IsNullOrEmpty(i.chopass.ToString()) ? i.chopass.ToString() : String.Empty);
- dic.Add("Operatore chiusura", !string.IsNullOrEmpty(i.chopchi.ToString()) ? i.chopchi.ToString() : String.Empty);
- dic.Add("Azienda impianto", !string.IsNullOrEmpty(i.chaziimp) ? i.chaziimp : String.Empty);
- dic.Add("Ora appuntamento fine", !string.IsNullOrEmpty(i.choraapf.ToString()) ? i.choraapf.ToString() : String.Empty);
- dic.Add("Min appuntamento fine", !string.IsNullOrEmpty(i.chminapf.ToString()) ? i.chminapf.ToString() : String.Empty);
- dic.Add("Riferimento chiamata", !string.IsNullOrEmpty(i.chrifer) ? i.chrifer : String.Empty);
- dic.Add("Riferimento telefono", !string.IsNullOrEmpty(i.chtelef) ? i.chtelef : String.Empty);
- dic.Add("Codice segnalazione", !string.IsNullOrEmpty(i.chcodseg) ? i.chcodseg : String.Empty);
- dic.Add("Fermo impianto", !string.IsNullOrEmpty(i.chstopi) ? i.chstopi : String.Empty);
- dic.Add("Data assegnazione chiamata", !string.IsNullOrEmpty(i.chdtass.ToString()) ? i.chdtass.ToString() : String.Empty);
- dic.Add("Ora assegnazione chiamata", !string.IsNullOrEmpty(i.chorass.ToString()) ? i.chorass.ToString() : String.Empty);
- dic.Add("Min assegnazione chiamata", !string.IsNullOrEmpty(i.chminass.ToString()) ? i.chminass.ToString() : String.Empty);
- dic.Add("Data chiusura chiamata", !string.IsNullOrEmpty(i.chdtchi.ToString()) ? i.chdtchi.ToString() : String.Empty);
- dic.Add("Ora chiusura chiamata", !string.IsNullOrEmpty(i.chorachi.ToString()) ? i.chorachi.ToString() : String.Empty);
- dic.Add("Min chiusura chiamata", !string.IsNullOrEmpty(i.chminchi.ToString()) ? i.chminchi.ToString() : String.Empty);
- dic.Add("Data inizio intervento", !string.IsNullOrEmpty(i.chdtlin.ToString()) ? i.chdtlin.ToString() : String.Empty);
- dic.Add("Ora inizio intervento", !string.IsNullOrEmpty(i.chorali.ToString()) ? i.chorali.ToString() : String.Empty);
- dic.Add("Min inizio intervento", !string.IsNullOrEmpty(i.chminli.ToString()) ? i.chminli.ToString() : String.Empty);
- dic.Add("Data fine intervento", !string.IsNullOrEmpty(i.chdtlfi.ToString()) ? i.chdtlfi.ToString() : String.Empty);
-
- dic.Add("Ora fine intervento", !string.IsNullOrEmpty(i.choralf.ToString()) ? i.choralf.ToString() : String.Empty);
- dic.Add("Min fine intervento", !string.IsNullOrEmpty(i.chminlf.ToString()) ? i.chminlf.ToString() : String.Empty);
- dic.Add("Numero 1 rapportino futuro", !string.IsNullOrEmpty(i.chnrap1.ToString()) ? i.chnrap1.ToString() : String.Empty);
- dic.Add("Serie 1 rapportino futuro", !string.IsNullOrEmpty(i.chsrap1) ? i.chsrap1 : String.Empty);
- dic.Add("Numero 2 rapportino futuro", !string.IsNullOrEmpty(i.chnrap2.ToString()) ? i.chnrap2.ToString() : String.Empty);
- dic.Add("Modalità raccolta chiamata", !string.IsNullOrEmpty(i.chmodrac) ? i.chmodrac : String.Empty);
- dic.Add("Numero chiamata per impianto per anno", !string.IsNullOrEmpty(i.chprgann.ToString()) ? i.chprgann.ToString() : String.Empty);
- dic.Add("Importo manodopera", !string.IsNullOrEmpty(i.chimpman.ToString()) ? i.chimpman.ToString() : String.Empty);
- dic.Add("Percentuale manodopera", !string.IsNullOrEmpty(i.chperman.ToString()) ? i.chperman.ToString() : String.Empty);
- dic.Add("Stampa manodopera", !string.IsNullOrEmpty(i.chflstim) ? i.chflstim : String.Empty);
- dic.Add("Chiusura da remoto", !string.IsNullOrEmpty(i.chfleste) ? i.chfleste : String.Empty);
- dic.Add("Riferimento seriale importazione", !string.IsNullOrEmpty(i.chserext) ? i.chserext : String.Empty);
- dic.Add("Descrizione impianto", !string.IsNullOrEmpty(i.imdescri) ? i.imdescri : String.Empty);
- dic.Add("Tipo impianto", !string.IsNullOrEmpty(i.imtipoim) ? i.imtipoim : String.Empty);
- dic.Add("Matricola impianto ", !string.IsNullOrEmpty(i.immatric) ? i.immatric : String.Empty);
- dic.Add("Numero impianto ", !string.IsNullOrEmpty(i.imnumimp) ? i.imnumimp : String.Empty);
- dic.Add("Ultimo amministratore ", !string.IsNullOrEmpty(i.imultamm) ? i.imultamm : String.Empty);
- dic.Add("Desc Ultimo amministratore ", !string.IsNullOrEmpty(i.imultdam) ? i.imultdam : String.Empty);
- dic.Add("Telefono Ult. Amministratore", !string.IsNullOrEmpty(i.imulttam) ? i.imulttam : String.Empty);
-
-
- dic.Add("Ubicazione impianto", !string.IsNullOrEmpty(i.imubicaz) ? i.imubicaz : String.Empty);
- dic.Add("Zona manutenzione", !string.IsNullOrEmpty(i.imzonman) ? i.imzonman : String.Empty);
- dic.Add("Pubblico/privato", !string.IsNullOrEmpty(i.imflpupr) ? i.imflpupr : String.Empty);
- dic.Add("Zona chiamate", !string.IsNullOrEmpty(i.imzonchi) ? i.imzonchi : String.Empty);
- dic.Add("Zona supervisione", !string.IsNullOrEmpty(i.imzonsup) ? i.imzonsup : String.Empty);
- dic.Add("Data inizio manutenzione", i.imdainma != null ? i.imdainma.ToString() : String.Empty);
- dic.Add("Data fine manutenzione", !string.IsNullOrEmpty(i.imdafima.ToString()) ? i.imdafima.ToString() : String.Empty);
- dic.Add("Data costruzione", !string.IsNullOrEmpty(i.imdatcos.ToString()) ? i.imdatcos.ToString() : String.Empty);
- dic.Add("Numero telesoccorso ", !string.IsNullOrEmpty(i.imteleso) ? i.imteleso : String.Empty);
- dic.Add("Email cliente", !string.IsNullOrEmpty(i.an_email) ? i.an_email : String.Empty);
- dic.Add("Ultimo cliente", !string.IsNullOrEmpty(i.an_email) ? i.an_email : String.Empty);
- dic.Add("Codice cliente", !string.IsNullOrEmpty(i.ancodice) ? i.ancodice : String.Empty);
- dic.Add("Tipo anagrafica", !string.IsNullOrEmpty(i.antipcon) ? i.antipcon : String.Empty);
- #endregion
- break;
- case Clienti.Sicilia:
- #region sicilia
- dic.Add("Esercizio", !string.IsNullOrEmpty(i.chcodese) ? i.chcodese : String.Empty);
- dic.Add("Tipo", !string.IsNullOrEmpty(i.chtipo) ? i.chtipo : String.Empty);
- dic.Add("Numero chiamata", !string.IsNullOrEmpty(i.chnumero.ToString()) ? i.chnumero.ToString() : String.Empty);
- dic.Add("Data chiamata", !string.IsNullOrEmpty(i.chdata.ToString()) ? i.chdata.ToString() : String.Empty);
- dic.Add("Ora inserimento chiamata", !string.IsNullOrEmpty(i.chora.ToString()) ? i.chora.ToString() : String.Empty);
- dic.Add("Min inserimento chiamata", !string.IsNullOrEmpty(i.chmin.ToString()) ? i.chmin.ToString() : String.Empty);
- dic.Add("Operatore assegnazione", !string.IsNullOrEmpty(i.chopass.ToString()) ? i.chopass.ToString() : String.Empty);
- dic.Add("Operatore chiusura", !string.IsNullOrEmpty(i.chopchi.ToString()) ? i.chopchi.ToString() : String.Empty);
- dic.Add("Azienda impianto", !string.IsNullOrEmpty(i.chaziimp) ? i.chaziimp : String.Empty);
- dic.Add("Ora appuntamento fine", !string.IsNullOrEmpty(i.choraapf.ToString()) ? i.choraapf.ToString() : String.Empty);
- dic.Add("Min appuntamento fine", !string.IsNullOrEmpty(i.chminapf.ToString()) ? i.chminapf.ToString() : String.Empty);
- dic.Add("Riferimento chiamata", !string.IsNullOrEmpty(i.chrifer) ? i.chrifer : String.Empty);
- dic.Add("Riferimento telefono", !string.IsNullOrEmpty(i.chtelef) ? i.chtelef : String.Empty);
- dic.Add("Codice segnalazione", !string.IsNullOrEmpty(i.chcodseg) ? i.chcodseg : String.Empty);
- dic.Add("Fermo impianto", !string.IsNullOrEmpty(i.chstopi) ? i.chstopi : String.Empty);
- dic.Add("Data assegnazione chiamata", !string.IsNullOrEmpty(i.chdtass.ToString()) ? i.chdtass.ToString() : String.Empty);
- dic.Add("Ora assegnazione chiamata", !string.IsNullOrEmpty(i.chorass.ToString()) ? i.chorass.ToString() : String.Empty);
- dic.Add("Min assegnazione chiamata", !string.IsNullOrEmpty(i.chminass.ToString()) ? i.chminass.ToString() : String.Empty);
- dic.Add("Data chiusura chiamata", !string.IsNullOrEmpty(i.chdtchi.ToString()) ? i.chdtchi.ToString() : String.Empty);
- dic.Add("Ora chiusura chiamata", !string.IsNullOrEmpty(i.chorachi.ToString()) ? i.chorachi.ToString() : String.Empty);
- dic.Add("Min chiusura chiamata", !string.IsNullOrEmpty(i.chminchi.ToString()) ? i.chminchi.ToString() : String.Empty);
- dic.Add("Data inizio intervento", !string.IsNullOrEmpty(i.chdtlin.ToString()) ? i.chdtlin.ToString() : String.Empty);
- dic.Add("Ora inizio intervento", !string.IsNullOrEmpty(i.chorali.ToString()) ? i.chorali.ToString() : String.Empty);
- dic.Add("Min inizio intervento", !string.IsNullOrEmpty(i.chminli.ToString()) ? i.chminli.ToString() : String.Empty);
- dic.Add("Data fine intervento", !string.IsNullOrEmpty(i.chdtlfi.ToString()) ? i.chdtlfi.ToString() : String.Empty);
-
- dic.Add("Ora fine intervento", !string.IsNullOrEmpty(i.choralf.ToString()) ? i.choralf.ToString() : String.Empty);
- dic.Add("Min fine intervento", !string.IsNullOrEmpty(i.chminlf.ToString()) ? i.chminlf.ToString() : String.Empty);
- dic.Add("Numero 1 rapportino futuro", !string.IsNullOrEmpty(i.chnrap1.ToString()) ? i.chnrap1.ToString() : String.Empty);
- dic.Add("Serie 1 rapportino futuro", !string.IsNullOrEmpty(i.chsrap1) ? i.chsrap1 : String.Empty);
- dic.Add("Numero 2 rapportino futuro", !string.IsNullOrEmpty(i.chnrap2.ToString()) ? i.chnrap2.ToString() : String.Empty);
- dic.Add("Modalità raccolta chiamata", !string.IsNullOrEmpty(i.chmodrac) ? i.chmodrac : String.Empty);
- dic.Add("Numero chiamata per impianto per anno", !string.IsNullOrEmpty(i.chprgann.ToString()) ? i.chprgann.ToString() : String.Empty);
- dic.Add("Importo manodopera", !string.IsNullOrEmpty(i.chimpman.ToString()) ? i.chimpman.ToString() : String.Empty);
- dic.Add("Percentuale manodopera", !string.IsNullOrEmpty(i.chperman.ToString()) ? i.chperman.ToString() : String.Empty);
- dic.Add("Stampa manodopera", !string.IsNullOrEmpty(i.chflstim) ? i.chflstim : String.Empty);
- dic.Add("Chiusura da remoto", !string.IsNullOrEmpty(i.chfleste) ? i.chfleste : String.Empty);
- dic.Add("Riferimento seriale importazione", !string.IsNullOrEmpty(i.chserext) ? i.chserext : String.Empty);
- dic.Add("Descrizione impianto", !string.IsNullOrEmpty(i.imdescri) ? i.imdescri : String.Empty);
- dic.Add("Tipo impianto", !string.IsNullOrEmpty(i.imtipoim) ? i.imtipoim : String.Empty);
- dic.Add("Matricola impianto ", !string.IsNullOrEmpty(i.immatric) ? i.immatric : String.Empty);
- dic.Add("Numero impianto ", !string.IsNullOrEmpty(i.imnumimp) ? i.imnumimp : String.Empty);
- dic.Add("Ultimo amministratore ", !string.IsNullOrEmpty(i.imultamm) ? i.imultamm : String.Empty);
- dic.Add("Desc Ultimo amministratore ", !string.IsNullOrEmpty(i.imultdam) ? i.imultdam : String.Empty);
- dic.Add("Telefono Ult. Amministratore", !string.IsNullOrEmpty(i.imulttam) ? i.imulttam : String.Empty);
-
-
- dic.Add("Ubicazione impianto", !string.IsNullOrEmpty(i.imubicaz) ? i.imubicaz : String.Empty);
- dic.Add("Zona manutenzione", !string.IsNullOrEmpty(i.imzonman) ? i.imzonman : String.Empty);
- dic.Add("Pubblico/privato", !string.IsNullOrEmpty(i.imflpupr) ? i.imflpupr : String.Empty);
- dic.Add("Zona chiamate", !string.IsNullOrEmpty(i.imzonchi) ? i.imzonchi : String.Empty);
- dic.Add("Zona supervisione", !string.IsNullOrEmpty(i.imzonsup) ? i.imzonsup : String.Empty);
- dic.Add("Data inizio manutenzione", i.imdainma != null ? i.imdainma.ToString() : String.Empty);
- dic.Add("Data fine manutenzione", !string.IsNullOrEmpty(i.imdafima.ToString()) ? i.imdafima.ToString() : String.Empty);
- dic.Add("Data costruzione", !string.IsNullOrEmpty(i.imdatcos.ToString()) ? i.imdatcos.ToString() : String.Empty);
- dic.Add("Numero telesoccorso ", !string.IsNullOrEmpty(i.imteleso) ? i.imteleso : String.Empty);
- dic.Add("Email cliente", !string.IsNullOrEmpty(i.an_email) ? i.an_email : String.Empty);
- dic.Add("Ultimo cliente", !string.IsNullOrEmpty(i.an_email) ? i.an_email : String.Empty);
- dic.Add("Codice cliente", !string.IsNullOrEmpty(i.ancodice) ? i.ancodice : String.Empty);
- dic.Add("Tipo anagrafica", !string.IsNullOrEmpty(i.antipcon) ? i.antipcon : String.Empty);
- #endregion
-
- break;
- case Clienti.Discovery:
- #region discovery
- dic.Add("Esercizio", !string.IsNullOrEmpty(i.chcodese) ? i.chcodese : String.Empty);
- dic.Add("Tipo", !string.IsNullOrEmpty(i.chtipo) ? i.chtipo : String.Empty);
- dic.Add("Numero chiamata", !string.IsNullOrEmpty(i.chnumero.ToString()) ? i.chnumero.ToString() : String.Empty);
- dic.Add("Data chiamata", !string.IsNullOrEmpty(i.chdata.ToString()) ? i.chdata.ToString() : String.Empty);
- dic.Add("Ora inserimento chiamata", !string.IsNullOrEmpty(i.chora.ToString()) ? i.chora.ToString() : String.Empty);
- dic.Add("Min inserimento chiamata", !string.IsNullOrEmpty(i.chmin.ToString()) ? i.chmin.ToString() : String.Empty);
- dic.Add("Operatore assegnazione", !string.IsNullOrEmpty(i.chopass.ToString()) ? i.chopass.ToString() : String.Empty);
- dic.Add("Operatore chiusura", !string.IsNullOrEmpty(i.chopchi.ToString()) ? i.chopchi.ToString() : String.Empty);
- dic.Add("Azienda impianto", !string.IsNullOrEmpty(i.chaziimp) ? i.chaziimp : String.Empty);
- dic.Add("Ora appuntamento fine", !string.IsNullOrEmpty(i.choraapf.ToString()) ? i.choraapf.ToString() : String.Empty);
- dic.Add("Min appuntamento fine", !string.IsNullOrEmpty(i.chminapf.ToString()) ? i.chminapf.ToString() : String.Empty);
- dic.Add("Riferimento chiamata", !string.IsNullOrEmpty(i.chrifer) ? i.chrifer : String.Empty);
- dic.Add("Riferimento telefono", !string.IsNullOrEmpty(i.chtelef) ? i.chtelef : String.Empty);
- dic.Add("Codice segnalazione", !string.IsNullOrEmpty(i.chcodseg) ? i.chcodseg : String.Empty);
- dic.Add("Fermo impianto", !string.IsNullOrEmpty(i.chstopi) ? i.chstopi : String.Empty);
- dic.Add("Data assegnazione chiamata", !string.IsNullOrEmpty(i.chdtass.ToString()) ? i.chdtass.ToString() : String.Empty);
- dic.Add("Ora assegnazione chiamata", !string.IsNullOrEmpty(i.chorass.ToString()) ? i.chorass.ToString() : String.Empty);
- dic.Add("Min assegnazione chiamata", !string.IsNullOrEmpty(i.chminass.ToString()) ? i.chminass.ToString() : String.Empty);
- dic.Add("Data chiusura chiamata", !string.IsNullOrEmpty(i.chdtchi.ToString()) ? i.chdtchi.ToString() : String.Empty);
- dic.Add("Ora chiusura chiamata", !string.IsNullOrEmpty(i.chorachi.ToString()) ? i.chorachi.ToString() : String.Empty);
- dic.Add("Min chiusura chiamata", !string.IsNullOrEmpty(i.chminchi.ToString()) ? i.chminchi.ToString() : String.Empty);
- dic.Add("Data inizio intervento", !string.IsNullOrEmpty(i.chdtlin.ToString()) ? i.chdtlin.ToString() : String.Empty);
- dic.Add("Ora inizio intervento", !string.IsNullOrEmpty(i.chorali.ToString()) ? i.chorali.ToString() : String.Empty);
- dic.Add("Min inizio intervento", !string.IsNullOrEmpty(i.chminli.ToString()) ? i.chminli.ToString() : String.Empty);
- dic.Add("Data fine intervento", !string.IsNullOrEmpty(i.chdtlfi.ToString()) ? i.chdtlfi.ToString() : String.Empty);
-
- dic.Add("Ora fine intervento", !string.IsNullOrEmpty(i.choralf.ToString()) ? i.choralf.ToString() : String.Empty);
- dic.Add("Min fine intervento", !string.IsNullOrEmpty(i.chminlf.ToString()) ? i.chminlf.ToString() : String.Empty);
- dic.Add("Numero 1 rapportino futuro", !string.IsNullOrEmpty(i.chnrap1.ToString()) ? i.chnrap1.ToString() : String.Empty);
- dic.Add("Serie 1 rapportino futuro", !string.IsNullOrEmpty(i.chsrap1) ? i.chsrap1 : String.Empty);
- dic.Add("Numero 2 rapportino futuro", !string.IsNullOrEmpty(i.chnrap2.ToString()) ? i.chnrap2.ToString() : String.Empty);
- dic.Add("Modalità raccolta chiamata", !string.IsNullOrEmpty(i.chmodrac) ? i.chmodrac : String.Empty);
- dic.Add("Numero chiamata per impianto per anno", !string.IsNullOrEmpty(i.chprgann.ToString()) ? i.chprgann.ToString() : String.Empty);
- dic.Add("Importo manodopera", !string.IsNullOrEmpty(i.chimpman.ToString()) ? i.chimpman.ToString() : String.Empty);
- dic.Add("Percentuale manodopera", !string.IsNullOrEmpty(i.chperman.ToString()) ? i.chperman.ToString() : String.Empty);
- dic.Add("Stampa manodopera", !string.IsNullOrEmpty(i.chflstim) ? i.chflstim : String.Empty);
- dic.Add("Chiusura da remoto", !string.IsNullOrEmpty(i.chfleste) ? i.chfleste : String.Empty);
- dic.Add("Riferimento seriale importazione", !string.IsNullOrEmpty(i.chserext) ? i.chserext : String.Empty);
- dic.Add("Descrizione impianto", !string.IsNullOrEmpty(i.imdescri) ? i.imdescri : String.Empty);
- dic.Add("Tipo impianto", !string.IsNullOrEmpty(i.imtipoim) ? i.imtipoim : String.Empty);
- dic.Add("Matricola impianto ", !string.IsNullOrEmpty(i.immatric) ? i.immatric : String.Empty);
- dic.Add("Numero impianto ", !string.IsNullOrEmpty(i.imnumimp) ? i.imnumimp : String.Empty);
- dic.Add("Ultimo amministratore ", !string.IsNullOrEmpty(i.imultamm) ? i.imultamm : String.Empty);
- dic.Add("Desc Ultimo amministratore ", !string.IsNullOrEmpty(i.imultdam) ? i.imultdam : String.Empty);
- dic.Add("Telefono Ult. Amministratore", !string.IsNullOrEmpty(i.imulttam) ? i.imulttam : String.Empty);
-
-
- dic.Add("Ubicazione impianto", !string.IsNullOrEmpty(i.imubicaz) ? i.imubicaz : String.Empty);
- dic.Add("Zona manutenzione", !string.IsNullOrEmpty(i.imzonman) ? i.imzonman : String.Empty);
- dic.Add("Pubblico/privato", !string.IsNullOrEmpty(i.imflpupr) ? i.imflpupr : String.Empty);
- dic.Add("Zona chiamate", !string.IsNullOrEmpty(i.imzonchi) ? i.imzonchi : String.Empty);
- dic.Add("Zona supervisione", !string.IsNullOrEmpty(i.imzonsup) ? i.imzonsup : String.Empty);
- dic.Add("Data inizio manutenzione", i.imdainma != null ? i.imdainma.ToString() : String.Empty);
- dic.Add("Data fine manutenzione", !string.IsNullOrEmpty(i.imdafima.ToString()) ? i.imdafima.ToString() : String.Empty);
- dic.Add("Data costruzione", !string.IsNullOrEmpty(i.imdatcos.ToString()) ? i.imdatcos.ToString() : String.Empty);
- dic.Add("Numero telesoccorso ", !string.IsNullOrEmpty(i.imteleso) ? i.imteleso : String.Empty);
- dic.Add("Email cliente", !string.IsNullOrEmpty(i.an_email) ? i.an_email : String.Empty);
- dic.Add("Ultimo cliente", !string.IsNullOrEmpty(i.an_email) ? i.an_email : String.Empty);
- dic.Add("Codice cliente", !string.IsNullOrEmpty(i.ancodice) ? i.ancodice : String.Empty);
- dic.Add("Tipo anagrafica", !string.IsNullOrEmpty(i.antipcon) ? i.antipcon : String.Empty);
- #endregion
- break;
-
- case Clienti.Sarom:
- #region Sarom
- dic.Add("Esercizio", !string.IsNullOrEmpty(i.chcodese) ? i.chcodese : String.Empty);
- dic.Add("Tipo", !string.IsNullOrEmpty(i.chtipo) ? i.chtipo : String.Empty);
- dic.Add("Numero chiamata", !string.IsNullOrEmpty(i.chnumero.ToString()) ? i.chnumero.ToString() : String.Empty);
- dic.Add("Data chiamata", !string.IsNullOrEmpty(i.chdata.ToString()) ? i.chdata.ToString() : String.Empty);
- dic.Add("Ora inserimento chiamata", !string.IsNullOrEmpty(i.chora.ToString()) ? i.chora.ToString() : String.Empty);
- dic.Add("Min inserimento chiamata", !string.IsNullOrEmpty(i.chmin.ToString()) ? i.chmin.ToString() : String.Empty);
- dic.Add("Operatore assegnazione", !string.IsNullOrEmpty(i.chopass.ToString()) ? i.chopass.ToString() : String.Empty);
- dic.Add("Operatore chiusura", !string.IsNullOrEmpty(i.chopchi.ToString()) ? i.chopchi.ToString() : String.Empty);
- dic.Add("Azienda impianto", !string.IsNullOrEmpty(i.chaziimp) ? i.chaziimp : String.Empty);
- dic.Add("Ora appuntamento fine", !string.IsNullOrEmpty(i.choraapf.ToString()) ? i.choraapf.ToString() : String.Empty);
- dic.Add("Min appuntamento fine", !string.IsNullOrEmpty(i.chminapf.ToString()) ? i.chminapf.ToString() : String.Empty);
- dic.Add("Riferimento chiamata", !string.IsNullOrEmpty(i.chrifer) ? i.chrifer : String.Empty);
- dic.Add("Riferimento telefono", !string.IsNullOrEmpty(i.chtelef) ? i.chtelef : String.Empty);
- dic.Add("Codice segnalazione", !string.IsNullOrEmpty(i.chcodseg) ? i.chcodseg : String.Empty);
- dic.Add("Fermo impianto", !string.IsNullOrEmpty(i.chstopi) ? i.chstopi : String.Empty);
- dic.Add("Data assegnazione chiamata", !string.IsNullOrEmpty(i.chdtass.ToString()) ? i.chdtass.ToString() : String.Empty);
- dic.Add("Ora assegnazione chiamata", !string.IsNullOrEmpty(i.chorass.ToString()) ? i.chorass.ToString() : String.Empty);
- dic.Add("Min assegnazione chiamata", !string.IsNullOrEmpty(i.chminass.ToString()) ? i.chminass.ToString() : String.Empty);
- dic.Add("Data chiusura chiamata", !string.IsNullOrEmpty(i.chdtchi.ToString()) ? i.chdtchi.ToString() : String.Empty);
- dic.Add("Ora chiusura chiamata", !string.IsNullOrEmpty(i.chorachi.ToString()) ? i.chorachi.ToString() : String.Empty);
- dic.Add("Min chiusura chiamata", !string.IsNullOrEmpty(i.chminchi.ToString()) ? i.chminchi.ToString() : String.Empty);
- dic.Add("Data inizio intervento", !string.IsNullOrEmpty(i.chdtlin.ToString()) ? i.chdtlin.ToString() : String.Empty);
- dic.Add("Ora inizio intervento", !string.IsNullOrEmpty(i.chorali.ToString()) ? i.chorali.ToString() : String.Empty);
- dic.Add("Min inizio intervento", !string.IsNullOrEmpty(i.chminli.ToString()) ? i.chminli.ToString() : String.Empty);
- dic.Add("Data fine intervento", !string.IsNullOrEmpty(i.chdtlfi.ToString()) ? i.chdtlfi.ToString() : String.Empty);
-
- dic.Add("Ora fine intervento", !string.IsNullOrEmpty(i.choralf.ToString()) ? i.choralf.ToString() : String.Empty);
- dic.Add("Min fine intervento", !string.IsNullOrEmpty(i.chminlf.ToString()) ? i.chminlf.ToString() : String.Empty);
- dic.Add("Numero 1 rapportino futuro", !string.IsNullOrEmpty(i.chnrap1.ToString()) ? i.chnrap1.ToString() : String.Empty);
- dic.Add("Serie 1 rapportino futuro", !string.IsNullOrEmpty(i.chsrap1) ? i.chsrap1 : String.Empty);
- dic.Add("Numero 2 rapportino futuro", !string.IsNullOrEmpty(i.chnrap2.ToString()) ? i.chnrap2.ToString() : String.Empty);
- dic.Add("Modalità raccolta chiamata", !string.IsNullOrEmpty(i.chmodrac) ? i.chmodrac : String.Empty);
- dic.Add("Numero chiamata per impianto per anno", !string.IsNullOrEmpty(i.chprgann.ToString()) ? i.chprgann.ToString() : String.Empty);
- dic.Add("Importo manodopera", !string.IsNullOrEmpty(i.chimpman.ToString()) ? i.chimpman.ToString() : String.Empty);
- dic.Add("Percentuale manodopera", !string.IsNullOrEmpty(i.chperman.ToString()) ? i.chperman.ToString() : String.Empty);
- dic.Add("Stampa manodopera", !string.IsNullOrEmpty(i.chflstim) ? i.chflstim : String.Empty);
- dic.Add("Chiusura da remoto", !string.IsNullOrEmpty(i.chfleste) ? i.chfleste : String.Empty);
- dic.Add("Riferimento seriale importazione", !string.IsNullOrEmpty(i.chserext) ? i.chserext : String.Empty);
- dic.Add("Descrizione impianto", !string.IsNullOrEmpty(i.imdescri) ? i.imdescri : String.Empty);
- dic.Add("Tipo impianto", !string.IsNullOrEmpty(i.imtipoim) ? i.imtipoim : String.Empty);
- dic.Add("Matricola impianto ", !string.IsNullOrEmpty(i.immatric) ? i.immatric : String.Empty);
- dic.Add("Numero impianto ", !string.IsNullOrEmpty(i.imnumimp) ? i.imnumimp : String.Empty);
- dic.Add("Ultimo amministratore ", !string.IsNullOrEmpty(i.imultamm) ? i.imultamm : String.Empty);
- dic.Add("Desc Ultimo amministratore ", !string.IsNullOrEmpty(i.imultdam) ? i.imultdam : String.Empty);
- dic.Add("Telefono Ult. Amministratore", !string.IsNullOrEmpty(i.imulttam) ? i.imulttam : String.Empty);
-
-
- dic.Add("Ubicazione impianto", !string.IsNullOrEmpty(i.imubicaz) ? i.imubicaz : String.Empty);
- dic.Add("Zona manutenzione", !string.IsNullOrEmpty(i.imzonman) ? i.imzonman : String.Empty);
- dic.Add("Pubblico/privato", !string.IsNullOrEmpty(i.imflpupr) ? i.imflpupr : String.Empty);
- dic.Add("Zona chiamate", !string.IsNullOrEmpty(i.imzonchi) ? i.imzonchi : String.Empty);
- dic.Add("Zona supervisione", !string.IsNullOrEmpty(i.imzonsup) ? i.imzonsup : String.Empty);
- dic.Add("Data inizio manutenzione", i.imdainma != null ? i.imdainma.ToString() : String.Empty);
- dic.Add("Data fine manutenzione", !string.IsNullOrEmpty(i.imdafima.ToString()) ? i.imdafima.ToString() : String.Empty);
- dic.Add("Data costruzione", !string.IsNullOrEmpty(i.imdatcos.ToString()) ? i.imdatcos.ToString() : String.Empty);
- dic.Add("Numero telesoccorso ", !string.IsNullOrEmpty(i.imteleso) ? i.imteleso : String.Empty);
- dic.Add("Email cliente", !string.IsNullOrEmpty(i.an_email) ? i.an_email : String.Empty);
- dic.Add("Ultimo cliente", !string.IsNullOrEmpty(i.an_email) ? i.an_email : String.Empty);
- dic.Add("Codice cliente", !string.IsNullOrEmpty(i.ancodice) ? i.ancodice : String.Empty);
- dic.Add("Tipo anagrafica", !string.IsNullOrEmpty(i.antipcon) ? i.antipcon : String.Empty);
- #endregion
- break;
-
- default:
-
- break;
- }
- o.altri = dic;
-
- o.imazirif = i.imazirif;
- o.imrefref = i.imrefref;
- return o;
- }
- private string getCommessaSietBySerial(string seriale)
- {
- string commessa = string.Empty;
-
- try
- {
- //_commDescSiet = _Siet_commDesc.Commdesc;
- //var c = _commDescSiet.Where(c => c.laserial.Equals(seriale)).First();
- //if (c != null && !string.IsNullOrEmpty(c.lacodcom))
- //{
- // commessa = c.lacodcom.Trim();
- // if (!string.IsNullOrEmpty(c.lacodcen))
- // {
- // commessa = commessa + " - " + c.lacodcen.Trim();
- // }
- //}
- }
- catch
- {
- Console.WriteLine(string.Format("*********** {1} Errore Chiamata al metodo getCommessaSietBySerial: seriale:{0} ", seriale, DateTime.Now.ToString()));
- }
-
- return commessa;
- }
- #endregion
- /// chiamatetest
- [HttpGet("chiamatetest")]
- public async Task>> chiamate(string token)
- {
- try
- {
- List ilist = new List();
- string ten = getClaimValueByToken(token, "tenant");
- string ten2 = getClaimValueByToken(token, "tenant2");
- string tenOut = getClaimValueByToken(token, "tenant");
- string tecnico = getClaimValueByToken(token, "tccodice");
- string tenConf = getClaimValueByToken(token, "tenantConfigurazioni");
- if (string.IsNullOrEmpty(ten))
- {
- ten = tenConf;
- }
-
- _chiamate = getChiamateByTenant(ten);
-
-
- var calltec = await _chiamate.Where(
- t => t.tccodice == tecnico
- && t.chcodazi == ten
- ).OrderByDescending(t => t.chdtapp).ToListAsync();
-
- foreach (Chiamate ch in calltec)
- {
- Chiamate_out o = new Chiamate_out();
-
- o = fillChiamateOut(ch, ten);
-
-
- ilist.Add(o);
- }
- // cerco le chiamate che devo fare per sostituzioni SE funzione abilitata
- //bool cerca_sostituzioni = false;
- //cerca_sostituzioni = checkSostituzioneAbilitata(ten);
- //if (cerca_sostituzioni)
- //{
- // //step 1 : trovo tutte le MIE sostituzioni
- // _sostituzione = getSostituzioneByTenant(ten);
- // var s = _sostituzione.Where(t => t.tscodazi.Equals(ten) && t.tscodsos.Trim().Equals(tecnico));
- // foreach (Sostituzione ss in s)
- // {
- // string tecnico_sostituito = string.Empty;
- // tecnico_sostituito = ss.tscodtec != null ? ss.tscodtec : string.Empty;
-
- // //2023-03-13: cancellato il filtro sulla zona perchè il tecnico che sostituisce spesso è di un'altra zona
- // //string zona = string.Empty;
- // //zona = ss.tscodzon != null ? ss.tscodzon : "zonavuota";
-
- // //step 2 : trovo tutte le chiamate del tecnico che sto sostitutendo e le aggiungo alla mie
- // var calltecSost = await _chiamate.Where(
- // t => t.tccodice == tecnico_sostituito
- // && t.chcodazi == ten
- // //&& t.imzonchi.Equals(zona)
- // ).OrderByDescending(t => t.chdtapp).ToListAsync();
-
- // foreach (Chiamate ch in calltecSost)
- // {
- // Chiamate_out o = new Chiamate_out();
- // if (tenOut.Equals(Clienti.VT))
- // {
- // o = fillChiamateOutVT(ch, ten);
- // }
- // else
- // {
- // o = fillChiamateOut(ch, ten);
- // }
-
- // ilist.Add(o);
- // }
- // }
- //}
-
- IEnumerable enumerable = ilist as IEnumerable;
-
- //return StatusCode(StatusCodes.Status200OK, enumerable.Take(100));
- return StatusCode(StatusCodes.Status200OK, enumerable);
- }
- catch (Exception ex)
- {
- string err = "Errore: " + ex.Message;
- return StatusCode(StatusCodes.Status500InternalServerError, err);
- }
- }
-
- }
-
-
-}
diff --git a/ApiPolo/Interfaces/TenantDbContextFactory.cs b/ApiPolo/Interfaces/TenantDbContextFactory.cs
index 58c790e..433e917 100644
--- a/ApiPolo/Interfaces/TenantDbContextFactory.cs
+++ b/ApiPolo/Interfaces/TenantDbContextFactory.cs
@@ -18,11 +18,11 @@ public class TenantDbContextFactory : ITenantDbContextFactory
return tenant switch
{
- Clienti.Maras => scope.ServiceProvider.GetRequiredService(),
- Clienti.Marrocco => scope.ServiceProvider.GetRequiredService(),
- // Add other tenants as needed
- // Clienti.AnotherTenant => scope.ServiceProvider.GetRequiredService(),
- _ => throw new KeyNotFoundException($"No DbContext found for tenant: {tenant}")
+ //Clienti.Maras => scope.ServiceProvider.GetRequiredService(),
+ //Clienti.Marrocco => scope.ServiceProvider.GetRequiredService(),
+ //// Add other tenants as needed
+ //// Clienti.AnotherTenant => scope.ServiceProvider.GetRequiredService(),
+ //_ => throw new KeyNotFoundException($"No DbContext found for tenant: {tenant}")
};
}
}
diff --git a/ApiPolo/Models/Gitoga_dbcontext/GITSR_COMMESSE_TABLE_DbContext.cs b/ApiPolo/Models/Gitoga_dbcontext/GITSR_COMMESSE_TABLE_DbContext.cs
new file mode 100644
index 0000000..ed099ea
--- /dev/null
+++ b/ApiPolo/Models/Gitoga_dbcontext/GITSR_COMMESSE_TABLE_DbContext.cs
@@ -0,0 +1,25 @@
+using Microsoft.EntityFrameworkCore;
+
+namespace ApiPolo.Models.Gitoga_dbcontext
+{
+ ///
+ public class GITSR_COMMESSE_TABLE_DbContext : DbContext
+ {
+ ///
+ public DbSet? Commdesc { get; set; }
+
+ ///
+ public GITSR_COMMESSE_TABLE_DbContext(DbContextOptions options) : base(options)
+ {
+ }
+
+ ///
+ protected override void OnModelCreating(ModelBuilder modelBuilder)
+ {
+ modelBuilder.Entity().ToTable("GITSRLAV_MAST");
+ modelBuilder.Entity().HasKey(table => new {
+ table.laserial
+ });
+ }
+ }
+}
diff --git a/ApiPolo/Models/Lifta_dbcontext/LIFTA_COMMESSE_TABLE_DbContext.cs b/ApiPolo/Models/Lifta_dbcontext/LIFTA_COMMESSE_TABLE_DbContext.cs
new file mode 100644
index 0000000..8600cc5
--- /dev/null
+++ b/ApiPolo/Models/Lifta_dbcontext/LIFTA_COMMESSE_TABLE_DbContext.cs
@@ -0,0 +1,25 @@
+using Microsoft.EntityFrameworkCore;
+
+namespace ApiPolo.Models.Lifta_dbcontext
+{
+ ///
+ public class LIFTA_COMMESSE_TABLE_DbContext : DbContext
+ {
+ ///
+ public DbSet? Commdesc { get; set; }
+
+ ///
+ public LIFTA_COMMESSE_TABLE_DbContext(DbContextOptions options) : base(options)
+ {
+ }
+
+ ///
+ protected override void OnModelCreating(ModelBuilder modelBuilder)
+ {
+ modelBuilder.Entity().ToTable("LIFTALAV_MAST");
+ modelBuilder.Entity().HasKey(table => new {
+ table.laserial
+ });
+ }
+ }
+}
diff --git a/ApiPolo/Properties/PublishProfiles/FolderProfile.pubxml.user b/ApiPolo/Properties/PublishProfiles/FolderProfile.pubxml.user
index 48d9403..19ac6a5 100644
--- a/ApiPolo/Properties/PublishProfiles/FolderProfile.pubxml.user
+++ b/ApiPolo/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<_PublishTargetUrl>C:\SORGENTI\_publish
- True|2025-02-25T08:03:44.0865040Z;True|2025-02-19T16:40:50.7771121+01:00;True|2025-02-19T12:27:09.7325840+01:00;True|2025-02-18T12:42:36.1131727+01:00;True|2025-02-04T10:14:33.8389270+01:00;True|2025-02-03T18:08:01.9222869+01:00;True|2025-01-10T14:46:31.1125722+01:00;True|2025-01-09T12:37:44.4800238+01:00;True|2024-08-08T14:26:24.6701786+02:00;True|2024-08-08T09:47:57.4034373+02:00;True|2024-08-06T08:27:53.2075910+02:00;True|2024-08-01T12:54:22.9356998+02:00;True|2024-05-28T12:33:55.2004491+02:00;True|2024-05-28T10:03:22.0746253+02:00;True|2024-05-23T17:46:39.7923992+02:00;True|2024-05-20T14:38:48.9510222+02:00;True|2024-05-16T14:58:45.4167131+02:00;True|2024-05-16T12:48:07.6863652+02:00;True|2024-05-14T15:24:15.9889498+02:00;True|2024-05-13T17:14:51.9627438+02:00;True|2024-05-13T09:55:47.6642637+02:00;True|2024-05-07T15:34:14.3854449+02:00;True|2024-04-30T15:16:06.7760827+02:00;True|2024-04-30T14:47:35.3761581+02:00;True|2024-04-24T16:24:33.9768863+02:00;True|2024-04-23T14:16:13.9278392+02:00;True|2024-04-22T11:21:15.8891978+02:00;True|2024-04-19T17:01:58.4424326+02:00;True|2024-04-19T16:00:37.1516625+02:00;True|2024-04-18T17:56:38.4740471+02:00;True|2024-04-18T15:19:13.0301345+02:00;True|2024-04-18T15:08:29.5009047+02:00;True|2024-04-16T17:19:13.2405268+02:00;True|2024-04-16T16:44:53.5665827+02:00;True|2024-04-09T15:05:21.6859040+02:00;True|2024-04-09T12:31:53.7105489+02:00;True|2024-03-29T12:02:59.3951106+01:00;True|2024-03-28T15:51:54.4771087+01:00;True|2024-03-28T15:40:46.5889318+01:00;True|2024-03-28T15:02:39.2709767+01:00;True|2024-03-19T10:11:02.2184437+01:00;True|2024-03-19T09:46:29.5213786+01:00;True|2024-03-13T15:41:36.5129417+01:00;True|2024-03-13T15:04:45.8815190+01:00;True|2024-03-12T12:09:28.7378666+01:00;True|2024-03-07T16:49:05.8765453+01:00;True|2024-03-07T15:04:48.6785344+01:00;True|2024-03-05T18:12:38.1587810+01:00;True|2024-03-05T17:04:25.2897417+01:00;True|2024-02-23T17:51:33.5228272+01:00;True|2024-02-23T15:30:52.3064822+01:00;True|2024-02-21T17:45:19.5871889+01:00;True|2024-02-16T14:49:42.6218309+01:00;True|2024-01-12T15:28:14.3310950+01:00;True|2024-01-11T12:17:47.0416265+01:00;True|2024-01-09T10:56:10.6108110+01:00;True|2024-01-09T10:01:29.4419062+01:00;True|2024-01-09T09:09:56.0678886+01:00;False|2024-01-09T09:09:34.2552726+01:00;True|2024-01-08T17:12:45.9831372+01:00;True|2024-01-08T14:29:20.6298939+01:00;True|2024-01-05T16:13:20.1834182+01:00;True|2024-01-04T16:37:06.7941235+01:00;True|2023-12-21T17:18:34.0526998+01:00;True|2023-12-21T16:15:05.7983943+01:00;False|2023-12-21T16:14:46.9213541+01:00;True|2023-12-21T15:37:56.3166908+01:00;True|2023-12-21T15:06:45.2960170+01:00;True|2023-12-19T10:07:15.3406839+01:00;True|2023-12-19T09:40:37.4542645+01:00;True|2023-12-18T18:10:38.7733804+01:00;True|2023-12-18T17:52:35.2759182+01:00;True|2023-12-18T17:27:30.6925247+01:00;False|2023-12-18T17:27:18.6654468+01:00;True|2023-12-18T17:19:53.6193809+01:00;True|2023-12-18T11:34:31.9683375+01:00;True|2023-12-18T10:49:14.0195219+01:00;True|2023-12-14T15:24:45.4235825+01:00;True|2023-12-14T12:12:59.2505838+01:00;True|2023-12-14T10:06:03.4821381+01:00;False|2023-12-14T10:05:56.1675464+01:00;True|2023-12-13T17:46:06.5114228+01:00;True|2023-12-13T17:18:32.9967555+01:00;True|2023-12-13T17:09:02.2153382+01:00;True|2023-12-13T16:54:26.3998101+01:00;True|2023-12-12T12:29:15.4496576+01:00;True|2023-12-12T10:07:33.8605887+01:00;True|2023-12-07T16:48:32.3661089+01:00;False|2023-12-07T16:48:16.7800909+01:00;True|2023-12-07T15:59:01.9494614+01:00;True|2023-12-06T16:37:11.4189532+01:00;False|2023-12-06T16:36:58.1903924+01:00;True|2023-12-06T15:04:14.7658513+01:00;True|2023-12-06T15:03:56.8183271+01:00;False|2023-12-06T15:02:43.1658892+01:00;True|2023-12-05T14:56:58.6533793+01:00;True|2023-12-05T11:27:46.7461820+01:00;False|2023-12-05T11:27:33.9312828+01:00;True|2023-12-05T10:50:28.4716173+01:00;True|2023-11-30T16:42:31.8596611+01:00;
+ True|2025-04-23T07:05:44.9093935Z;True|2025-04-18T08:34:41.5118067+02:00;True|2025-02-25T09:03:44.0865040+01:00;True|2025-02-19T16:40:50.7771121+01:00;True|2025-02-19T12:27:09.7325840+01:00;True|2025-02-18T12:42:36.1131727+01:00;True|2025-02-04T10:14:33.8389270+01:00;True|2025-02-03T18:08:01.9222869+01:00;True|2025-01-10T14:46:31.1125722+01:00;True|2025-01-09T12:37:44.4800238+01:00;True|2024-08-08T14:26:24.6701786+02:00;True|2024-08-08T09:47:57.4034373+02:00;True|2024-08-06T08:27:53.2075910+02:00;True|2024-08-01T12:54:22.9356998+02:00;True|2024-05-28T12:33:55.2004491+02:00;True|2024-05-28T10:03:22.0746253+02:00;True|2024-05-23T17:46:39.7923992+02:00;True|2024-05-20T14:38:48.9510222+02:00;True|2024-05-16T14:58:45.4167131+02:00;True|2024-05-16T12:48:07.6863652+02:00;True|2024-05-14T15:24:15.9889498+02:00;True|2024-05-13T17:14:51.9627438+02:00;True|2024-05-13T09:55:47.6642637+02:00;True|2024-05-07T15:34:14.3854449+02:00;True|2024-04-30T15:16:06.7760827+02:00;True|2024-04-30T14:47:35.3761581+02:00;True|2024-04-24T16:24:33.9768863+02:00;True|2024-04-23T14:16:13.9278392+02:00;True|2024-04-22T11:21:15.8891978+02:00;True|2024-04-19T17:01:58.4424326+02:00;True|2024-04-19T16:00:37.1516625+02:00;True|2024-04-18T17:56:38.4740471+02:00;True|2024-04-18T15:19:13.0301345+02:00;True|2024-04-18T15:08:29.5009047+02:00;True|2024-04-16T17:19:13.2405268+02:00;True|2024-04-16T16:44:53.5665827+02:00;True|2024-04-09T15:05:21.6859040+02:00;True|2024-04-09T12:31:53.7105489+02:00;True|2024-03-29T12:02:59.3951106+01:00;True|2024-03-28T15:51:54.4771087+01:00;True|2024-03-28T15:40:46.5889318+01:00;True|2024-03-28T15:02:39.2709767+01:00;True|2024-03-19T10:11:02.2184437+01:00;True|2024-03-19T09:46:29.5213786+01:00;True|2024-03-13T15:41:36.5129417+01:00;True|2024-03-13T15:04:45.8815190+01:00;True|2024-03-12T12:09:28.7378666+01:00;True|2024-03-07T16:49:05.8765453+01:00;True|2024-03-07T15:04:48.6785344+01:00;True|2024-03-05T18:12:38.1587810+01:00;True|2024-03-05T17:04:25.2897417+01:00;True|2024-02-23T17:51:33.5228272+01:00;True|2024-02-23T15:30:52.3064822+01:00;True|2024-02-21T17:45:19.5871889+01:00;True|2024-02-16T14:49:42.6218309+01:00;True|2024-01-12T15:28:14.3310950+01:00;True|2024-01-11T12:17:47.0416265+01:00;True|2024-01-09T10:56:10.6108110+01:00;True|2024-01-09T10:01:29.4419062+01:00;True|2024-01-09T09:09:56.0678886+01:00;False|2024-01-09T09:09:34.2552726+01:00;True|2024-01-08T17:12:45.9831372+01:00;True|2024-01-08T14:29:20.6298939+01:00;True|2024-01-05T16:13:20.1834182+01:00;True|2024-01-04T16:37:06.7941235+01:00;True|2023-12-21T17:18:34.0526998+01:00;True|2023-12-21T16:15:05.7983943+01:00;False|2023-12-21T16:14:46.9213541+01:00;True|2023-12-21T15:37:56.3166908+01:00;True|2023-12-21T15:06:45.2960170+01:00;True|2023-12-19T10:07:15.3406839+01:00;True|2023-12-19T09:40:37.4542645+01:00;True|2023-12-18T18:10:38.7733804+01:00;True|2023-12-18T17:52:35.2759182+01:00;True|2023-12-18T17:27:30.6925247+01:00;False|2023-12-18T17:27:18.6654468+01:00;True|2023-12-18T17:19:53.6193809+01:00;True|2023-12-18T11:34:31.9683375+01:00;True|2023-12-18T10:49:14.0195219+01:00;True|2023-12-14T15:24:45.4235825+01:00;True|2023-12-14T12:12:59.2505838+01:00;True|2023-12-14T10:06:03.4821381+01:00;False|2023-12-14T10:05:56.1675464+01:00;True|2023-12-13T17:46:06.5114228+01:00;True|2023-12-13T17:18:32.9967555+01:00;True|2023-12-13T17:09:02.2153382+01:00;True|2023-12-13T16:54:26.3998101+01:00;True|2023-12-12T12:29:15.4496576+01:00;True|2023-12-12T10:07:33.8605887+01:00;True|2023-12-07T16:48:32.3661089+01:00;False|2023-12-07T16:48:16.7800909+01:00;True|2023-12-07T15:59:01.9494614+01:00;True|2023-12-06T16:37:11.4189532+01:00;False|2023-12-06T16:36:58.1903924+01:00;True|2023-12-06T15:04:14.7658513+01:00;True|2023-12-06T15:03:56.8183271+01:00;False|2023-12-06T15:02:43.1658892+01:00;True|2023-12-05T14:56:58.6533793+01:00;True|2023-12-05T11:27:46.7461820+01:00;False|2023-12-05T11:27:33.9312828+01:00;
diff --git a/ApiPolo/Startup.cs b/ApiPolo/Startup.cs
index f432278..7307bae 100644
--- a/ApiPolo/Startup.cs
+++ b/ApiPolo/Startup.cs
@@ -428,6 +428,9 @@ namespace ApiPolo
services.AddDbContext(options => options.UseSqlServer(Configuration.GetConnectionString("MARRO")
, options => { options.CommandTimeout(commandTimeoutInSeconds); }
));
+ services.AddDbContext(options => options.UseSqlServer(Configuration.GetConnectionString("MARRO")
+ , options => { options.CommandTimeout(commandTimeoutInSeconds); }
+ ));
#endregion
#region LIFTA
@@ -477,6 +480,9 @@ namespace ApiPolo
services.AddDbContext(options => options.UseSqlServer(Configuration.GetConnectionString("MARRO")
, options => { options.CommandTimeout(commandTimeoutInSeconds); }
));
+ services.AddDbContext(options => options.UseSqlServer(Configuration.GetConnectionString("MARRO")
+ , options => { options.CommandTimeout(commandTimeoutInSeconds); }
+ ));
#endregion
#region SIET
@@ -1018,12 +1024,12 @@ namespace ApiPolo
//TEST
- services.AddDbContext(options => options.UseSqlServer(Configuration.GetConnectionString("MARAS")
- , options => { options.CommandTimeout(commandTimeoutInSeconds); }
- ));
- services.AddDbContext(options => options.UseSqlServer(Configuration.GetConnectionString("MARRO")
- , options => { options.CommandTimeout(commandTimeoutInSeconds); }
- ));
+ //services.AddDbContext(options => options.UseSqlServer(Configuration.GetConnectionString("MARAS")
+ // , options => { options.CommandTimeout(commandTimeoutInSeconds); }
+ // ));
+ //services.AddDbContext(options => options.UseSqlServer(Configuration.GetConnectionString("MARRO")
+ // , options => { options.CommandTimeout(commandTimeoutInSeconds); }
+ // ));
// FACTORY MUTI-TENANT
diff --git a/ApiPolo/appsettings.json b/ApiPolo/appsettings.json
index 889cc17..4137566 100644
--- a/ApiPolo/appsettings.json
+++ b/ApiPolo/appsettings.json
@@ -10,25 +10,25 @@
//connessione non sicura: Encrypt=False
- //"ApiStr": "Data Source=172.25.30.1;Initial Catalog=API_POLO;User Id=sa; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
- "ApiStr": "Data Source=MARCO_PC\\SQL_2022;Initial Catalog=API_POLO;User Id=sa; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+ "ApiStr": "Data Source=172.25.30.1;Initial Catalog=API_POLO;User Id=sa; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+ //"ApiStr": "Data Source=MARCO_PC\\SQL_2022;Initial Catalog=API_POLO;User Id=sa; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
/*"FERRA": "Data Source=10.0.0.10;Initial Catalog=AHR60_FERRARI;User Id=sa; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",*/
"FERRA": "Data Source=37.159.179.14;Initial Catalog=AHR80_TEST;User Id=AppPolo; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False;Encrypt=False;Trust Server Certificate=True",
- "MARRO": "Data Source=172.25.30.177;Initial Catalog=R80_MARROCCO_TEST;User Id=app; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
- /*"MARRO": "Data Source=172.25.30.177;Initial Catalog=R80_MARROCCO;User Id=sa; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",*/
+ /*"MARRO": "Data Source=172.25.30.177;Initial Catalog=R80_MARROCCO_TEST;User Id=app; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",*/
+ "MARRO": "Data Source=172.25.30.177;Initial Catalog=R80_MARROCCO;User Id=sa; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
/*"MARRO": "Data Source=poloinformatico57.clienti.init-s.it;Initial Catalog=R80_MARROCCO;User Id=app; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",*/
- /*"GITSR": "Data Source=172.25.30.177;Initial Catalog=R80_GITSR;User Id=app; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",*/
- "GITSR": "Data Source=172.25.30.177;Initial Catalog=R80_GITSR_TEST;User Id=app; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
- //"GITSR_MARRO": "Data Source=172.25.30.177;Initial Catalog=R80_MARROCCO;User Id=app; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
- "GITSR_MARRO": "Data Source=172.25.30.177;Initial Catalog=R80_MARROCCO_TEST;User Id=app; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+ "GITSR": "Data Source=172.25.30.177;Initial Catalog=R80_GITSR;User Id=app; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+ /*"GITSR": "Data Source=172.25.30.177;Initial Catalog=R80_GITSR_TEST;User Id=app; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",*/
+ "GITSR_MARRO": "Data Source=172.25.30.177;Initial Catalog=R80_MARROCCO;User Id=app; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+ //"GITSR_MARRO": "Data Source=172.25.30.177;Initial Catalog=R80_MARROCCO_TEST;User Id=app; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
- /*"LIFTA": "Data Source=172.25.30.177;Initial Catalog=R80_LIFTA;User Id=app; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",*/
- "LIFTA": "Data Source=172.25.30.177;Initial Catalog=R80_LIFTA_TEST;User Id=app; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
- //"LIFTA_MARRO": "Data Source=172.25.30.177;Initial Catalog=R80_MARROCCO;User Id=app; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
- "LIFTA_MARRO": "Data Source=172.25.30.177;Initial Catalog=R80_MARROCCO_TEST;User Id=app; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+ "LIFTA": "Data Source=172.25.30.177;Initial Catalog=R80_LIFTA;User Id=app; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+ /*"LIFTA": "Data Source=172.25.30.177;Initial Catalog=R80_LIFTA_TEST;User Id=app; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",*/
+ "LIFTA_MARRO": "Data Source=172.25.30.177;Initial Catalog=R80_MARROCCO;User Id=app; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+ //"LIFTA_MARRO": "Data Source=172.25.30.177;Initial Catalog=R80_MARROCCO_TEST;User Id=app; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
/*"SICILIA": "Data Source=10.0.0.10;Initial Catalog=AHR_SICILIA;User Id=sa; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",*/
"SICILIA": "Data Source=studioliuzzo.selfip.net;Initial Catalog=AHR_TEST_APP;User Id=sa; Password=1Zucchetti;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
@@ -55,9 +55,9 @@
/*"SYSCOM": "Data Source=docker1.polo;Initial Catalog= AHRW_SYSCOM;User Id=sa; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",*/
"SYSCOM": "Data Source=dbsql01.poloinformatico.it;Initial Catalog= AHRW_SYSCOM;User Id=syscom; Password=4@QLHV?cpVYbr+GB;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
- "TEDESCO": "Data Source=MARCO_PC\\SQL_2022;Initial Catalog= AHR_TEDESCO;User Id=sa; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+ "TEDESCO": "Data Source=172.25.30.38;Initial Catalog= AHR_80;User Id=sa; Password=ZS1c1l1@;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False"
- "MARAS": "Data Source=docker1.polo;Initial Catalog= AHRW_MARAS;User Id=sa; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False;Encrypt=False"
+ //"MARAS": "Data Source=docker1.polo;Initial Catalog= AHRW_MARAS;User Id=sa; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False;Encrypt=False"
},
"JWT": {
"ValidAudience": "http://localhost:4200",