Aggiunta stored da testare x eliminazione IstKIT
This commit is contained in:
@@ -1686,6 +1686,25 @@ namespace MP.Data.Controllers
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua il task di eliminazione PODL KIT + istanze + riattivazione PODL originali disattivate tramite stored
|
||||
/// </summary>
|
||||
/// <param name="IdxPODL">IdxPODL parent</param>
|
||||
public bool PodlIstKitDelete(int IdxPODL)
|
||||
{
|
||||
bool answ = false;
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
var pIdxPODL = new SqlParameter("@IdxPODL", IdxPODL);
|
||||
|
||||
var dbResult = dbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("EXEC dbo.stp_PodlIstKit_delete @IdxPODL", pIdxPODL);
|
||||
answ = true;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update Record
|
||||
/// </summary>
|
||||
|
||||
@@ -117,30 +117,12 @@ namespace MP.SPEC.Components.ProdKit
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Eliminazione PODL + Istanze KIT: sei sicuro di voler procedere?"))
|
||||
return;
|
||||
|
||||
await Task.Delay(1);
|
||||
// chiamare nuova stored!!!
|
||||
#if false
|
||||
var done = await MDService.IstKitDelete(selRec);
|
||||
#endif
|
||||
// da provare...
|
||||
var done = MDService.PodlIstKitDelete(selRec.IdxPromessa);
|
||||
EditRecord = null;
|
||||
ReloadData();
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
#if false
|
||||
protected async Task DoUpdate(IstanzeKitModel selRec)
|
||||
{
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Confermi di voler salvare le modifiche?"))
|
||||
return;
|
||||
|
||||
await Task.Delay(1);
|
||||
var done = await MDService.IstKitUpsert(selRec);
|
||||
EditRecord = null;
|
||||
ReloadData();
|
||||
await Task.Delay(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
private bool OptAdmKitEnabled = false;
|
||||
|
||||
protected override void OnInitialized()
|
||||
|
||||
@@ -1218,7 +1218,7 @@ namespace MP.SPEC.Data
|
||||
string currKey = $"{Utils.redisPOdlByCodArt}:{CodArticolo}:{avType}";
|
||||
// cerco in redis dato valore sel macchina...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue && rawData.Length()>2)
|
||||
if (rawData.HasValue && rawData.Length() > 2)
|
||||
{
|
||||
var rawResult = JsonConvert.DeserializeObject<List<PODLExpModel>>($"{rawData}");
|
||||
if (rawResult != null)
|
||||
@@ -1815,6 +1815,21 @@ namespace MP.SPEC.Data
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua il task di eliminazione PODL KIT + istanze + riattivazione PODL originali disattivate tramite stored
|
||||
/// </summary>
|
||||
/// <param name="IdxPODL">IdxPODL parent</param>
|
||||
public bool PodlIstKitDelete(int IdxPODL)
|
||||
{
|
||||
bool fatto = false;
|
||||
// salvo
|
||||
fatto = dbController.PodlIstKitDelete(IdxPODL);
|
||||
// svuoto cache
|
||||
RedisValue pattern = $"{Utils.redisKit}:*";
|
||||
ExecFlushRedisPattern(pattern);
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco PODL non avviati filtrati x articolo, KeyRich (che contiene stato)
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user