Update gest articoli
- se elimina o insert reset cache
This commit is contained in:
@@ -160,7 +160,9 @@ namespace MP.SPEC.Data
|
||||
/// <returns></returns>
|
||||
public async Task<bool> ArticoliDeleteRecord(AnagArticoli currRec)
|
||||
{
|
||||
return await dbController.ArticoliDeleteRecord(currRec);
|
||||
bool fatto = await dbController.ArticoliDeleteRecord(currRec);
|
||||
await resetCacheArticoli();
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -207,7 +209,9 @@ namespace MP.SPEC.Data
|
||||
/// <returns></returns>
|
||||
public async Task<bool> ArticoliUpdateRecord(AnagArticoli currRec)
|
||||
{
|
||||
return await dbController.ArticoliUpdateRecord(currRec);
|
||||
bool fatto = await dbController.ArticoliUpdateRecord(currRec);
|
||||
await resetCacheArticoli();
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1099,6 +1103,14 @@ namespace MP.SPEC.Data
|
||||
return answ;
|
||||
}
|
||||
|
||||
private async Task resetCacheArticoli()
|
||||
{
|
||||
RedisValue pattern = new RedisValue($"{redisArtByDossier}:*");
|
||||
await ExecFlushRedisPattern(pattern);
|
||||
pattern = new RedisValue($"{redisArtList}:*");
|
||||
await ExecFlushRedisPattern(pattern);
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,6 @@ namespace MP.SPEC.Pages
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
//MessageService.EA_SearchUpdated -= OnSeachUpdated;
|
||||
currRecord = null;
|
||||
ListTipoArt = null;
|
||||
ListAziende = null;
|
||||
|
||||
Reference in New Issue
Block a user