Fix comportamento editing condizionato x fastRec
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
using GPW.CORE.Data;
|
||||
using GPW.CORE.Data.DbModels;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace GPW.CORE.UI.Data
|
||||
{
|
||||
@@ -107,7 +109,7 @@ namespace GPW.CORE.UI.Data
|
||||
}
|
||||
}
|
||||
|
||||
public bool DipIsActive
|
||||
public bool IsActive
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -119,31 +121,34 @@ namespace GPW.CORE.UI.Data
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
private string _userPayload { get; set; } = "";
|
||||
public string DipPayload
|
||||
{
|
||||
get
|
||||
{
|
||||
return _userPayload;
|
||||
}
|
||||
set
|
||||
{
|
||||
_userPayload = value;
|
||||
}
|
||||
}
|
||||
private bool _userPayloadOk = false;
|
||||
public bool DipPayloadOk
|
||||
{
|
||||
get
|
||||
{
|
||||
return _userPayloadOk;
|
||||
}
|
||||
set
|
||||
{
|
||||
_userPayloadOk = value;
|
||||
}
|
||||
}
|
||||
public bool PayloadOk { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Calcola HASH del codice impiego = payload utente
|
||||
/// </summary>
|
||||
/// <param name="rigaDip"></param>
|
||||
/// <returns></returns>
|
||||
public string HashDip
|
||||
{
|
||||
get
|
||||
{
|
||||
string hash = "";
|
||||
string answ = "";
|
||||
if (_rigaDip != null)
|
||||
{
|
||||
answ = $"{_rigaDip.IdxDipendente}|{_rigaDip.Cognome}.{_rigaDip.Nome}|{_rigaDip.Cf}|{_rigaDip.DataAssunzione:yyyyMMdd}|{_rigaDip.Email}|{_rigaDip.Matricola}";
|
||||
}
|
||||
// hashing!
|
||||
using (var md5 = MD5.Create())
|
||||
{
|
||||
byte[] InputBytes = Encoding.UTF8.GetBytes(answ);
|
||||
var byteHash = md5.ComputeHash(InputBytes);
|
||||
hash = BitConverter.ToString(byteHash).Replace("-", "").ToLowerInvariant();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
|
||||
public bool ShowSearch
|
||||
{
|
||||
get => showSearch;
|
||||
|
||||
Reference in New Issue
Block a user