dati azienda

This commit is contained in:
Marco Audiffredi 2025-05-14 16:49:29 +02:00
parent b49ccc7934
commit b7fafc0d53
3 changed files with 30 additions and 13 deletions

View File

@ -104,7 +104,13 @@ namespace VirtualTask.Controllers
if (model.logo != null)
{
string pic = System.IO.Path.GetFileName(model.logo.FileName);
string path = string.Format("{0}{1}\\{2}",_pathLoghi,tenant2,pic);
//2025-05-05: gestione directory iommagine nel caso che l'azienda sia più corta di 5 caratteri
string dir = tenant2;
if (!string.IsNullOrEmpty(tenant2) && tenant2.Trim().Length < 5)
{
dir = tenant2.Trim();
}
string path = string.Format("{0}{1}\\{2}",_pathLoghi, dir, pic);
//string projectRootPath = _hostingEnvironment.ContentRootPath;
//// file is uploaded
@ -124,7 +130,7 @@ namespace VirtualTask.Controllers
}
dat.azienda = tenant2;
dat.testo_buono = model.testo_buono;
dat.url_logo = string.Format("{0}{1}/{2}", _urlLoghi, tenant2, pic);
dat.url_logo = string.Format("{0}{1}/{2}", _urlLoghi, dir, pic);
dat.ragsoc = model.ragsoc;
dat.tecnico = model.tecnico;
}
@ -229,6 +235,7 @@ namespace VirtualTask.Controllers
token = helper.GetStringValue("tok");
tenant = helper.GetStringValue("tenant");
tenant2 = helper.GetStringValue("tenant2");
if (string.IsNullOrEmpty(token))
{
return RedirectToAction("Login2", "Login");
@ -237,7 +244,14 @@ namespace VirtualTask.Controllers
if(model.logo2!=null)
{
string pic = System.IO.Path.GetFileName(model.logo2.FileName);
string path = string.Format("{0}{1}\\{2}", _pathLoghi, tenant2, pic);
//2025-05-05: gestione directory iommagine nel caso che l'azienda sia più corta di 5 caratteri
string dir = tenant2;
if (!string.IsNullOrEmpty(tenant2) && tenant2.Trim().Length < 5)
{
dir = tenant2.Trim();
}
string path = string.Format("{0}{1}\\{2}", _pathLoghi, dir, pic);
//string projectRootPath = _hostingEnvironment.ContentRootPath;
//// file is uploaded
@ -256,7 +270,7 @@ namespace VirtualTask.Controllers
model.logo = array;
}
model.logo2 = null;
model.url_logo = string.Format("{0}{1}/{2}", _urlLoghi, tenant2, pic); ;
model.url_logo = string.Format("{0}{1}/{2}", _urlLoghi, dir, pic);
}
@ -279,9 +293,12 @@ namespace VirtualTask.Controllers
//https://api.poloinformatico.it:9000/api/Polo/datiazienda/saveFile?azienda=AZI02&tecnico=aaaaa%20%20%20%20%20%20%20%20%20%20&pathSrv=C%3A%5CZAPIPOLO%5Cloghi'
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "datiazienda/savefile";
if(!string.IsNullOrEmpty(model.azienda) && model.azienda.Length<5)
{
model.azienda= model.azienda.Trim();
}
urlBase = urlBase + "?azienda=" + model.azienda;
urlBase = urlBase + "&tecnico=" + model.tecnico.Trim();
//urlBase = urlBase + "&pathSrv=" + "C:\\ZAPIPOLO\\loghi";
urlBase = urlBase + "&pathSrv=" + _pathLoghi;
baseAddress = new Uri(urlBase);
client = new HttpClient();

View File

@ -8,10 +8,10 @@
"ApplicationInsights": {
////PRODUZIONE
//"rootUrlApi": "https://api.poloinformatico.it:9000/api/Polo/",
//"rootUrlApi2": "https://api.poloinformatico.it:9000/VIRTU/",
//"rootWebLoghi": "C:\\ZAPIPOLO\\api_polo\\wwwroot\\VIRTU\\",
//"rootUrl": "https://virtualtask.it/",
"rootUrlApi": "https://api-vt.poloinformatico.it/api/Polo/",
"rootUrlApi2": "https://api-vt.poloinformatico.it/VIRTU/",
"rootWebLoghi": "C:\\ZAPIPOLO\\api_polo\\wwwroot\\VIRTU\\",
"rootUrl": "https://virtualtask.it/",
//TEST
//"rootUrlApi": "http://testapi.poloinformatico.it:9001/api/Polo/",
@ -20,10 +20,10 @@
//"rootUrl": "https://localhost:7140/",
//MICHELE: PUNTAMENTO A MIO PC PER FARE I TEST
"rootUrlApi": "https://localhost:7068/api/Polo/",
"rootUrlApi2": "https://localhost:7068//VIRTU/",
"rootWebLoghi": "C:\\Users\\audif\\source\\repos\\VirtualTask\\wwwroot\\VIRTU\\",
"rootUrl": "https://localhost:7068/",
//"rootUrlApi": "https://localhost:7068/api/Polo/",
//"rootUrlApi2": "https://localhost:7068//VIRTU/",
//"rootWebLoghi": "C:\\Users\\audif\\source\\repos\\VirtualTask\\wwwroot\\VIRTU\\",
//"rootUrl": "https://localhost:7068/",
"mittenteMail": "info@virtualtask.it",
"nomeMail": "Supporto Virtual Task",

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB