fix controlli null valori uri
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ else
|
||||
@json
|
||||
@if (rawScan != "")
|
||||
{
|
||||
@if (idOpr == "0")
|
||||
@if (string.IsNullOrEmpty(idOpr))
|
||||
{
|
||||
<ProcOperatore lastScanOperatore="@rawScan" sessionId="@inveSessionId" magazzinoId="@codMag"></ProcOperatore>
|
||||
}
|
||||
|
||||
@@ -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++)
|
||||
|
||||
Reference in New Issue
Block a user