fix controlli null valori uri

This commit is contained in:
zaccaria.majid
2022-12-27 16:19:09 +01:00
parent c4d604f201
commit 7aa1ded434
4 changed files with 21 additions and 9 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ namespace MP.INVE.Components
get
{
string answ = "";
answ = $"{BaseUrlTab}MatrOpr={idOperatore}&UserAuthKey={authKey}&IdSessione=0&IdMag=0";
answ = $"{BaseUrlTab}MatrOpr={idOperatore}&UserAuthKey={authKey}";
return answ;
}
}
+1 -1
View File
@@ -40,7 +40,7 @@ namespace MP.INVE.Pages
get
{
string answ = "";
answ = $"{BaseUrlTab}IdSessione={sessID}&IdMag={codMag}&MatrOpr=0&UserAuthKey=0";
answ = $"{BaseUrlTab}IdSessione={sessID}&IdMag={codMag}";
return answ;
}
}
+1 -1
View File
@@ -19,7 +19,7 @@ else
@json
@if (rawScan != "")
{
@if (idOpr == "0")
@if (string.IsNullOrEmpty(idOpr))
{
<ProcOperatore lastScanOperatore="@rawScan" sessionId="@inveSessionId" magazzinoId="@codMag"></ProcOperatore>
}
+18 -6
View File
@@ -48,12 +48,25 @@ namespace MP.INVE.Pages
var uri = NavManager.ToAbsoluteUri(NavManager.Uri);
if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("MatrOpr", out var _matrOpr) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("UserAuthKey", out var _authKey) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("idSessione", out var _inveSessionId) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("idMag", out var _codMag))
{
idOpr = _matrOpr;
authKey = _authKey;
codMag = _codMag;
inveSessionId = int.Parse(_inveSessionId);
if (!string.IsNullOrEmpty(_matrOpr))
{
idOpr = _matrOpr;
}
if (!string.IsNullOrEmpty(_authKey))
{
authKey = _authKey;
}
if (!string.IsNullOrEmpty(_codMag))
{
codMag = _codMag;
}
if (inveSessionId != 0)
{
inveSessionId = int.Parse(_inveSessionId);
}
}
if (idOpr != "0" && authKey != "0")
if (!string.IsNullOrEmpty(idOpr) && !string.IsNullOrEmpty(authKey))
{
isFullUrl = true;
string pw = MIService.DeriptData(authKey);
@@ -100,7 +113,6 @@ namespace MP.INVE.Pages
var uriProc1 = newScan.Split("?");
//eseguo split su "&" e divido il rimanente del link ottenendo così le variabili singole
var uriProc2 = uriProc1[1].Split("&");
//eseguo split su "=" ottenendo il valore delle variabili
string[] uriProc3;
for (int i = 0; i < uriProc2.Length; i++)