Modifica x gestione file inattivi (vecchie rev) + fix selezioni
This commit is contained in:
@@ -234,6 +234,18 @@ namespace MP.FileData.Controllers
|
||||
return done;
|
||||
}
|
||||
|
||||
public bool FileExport(FileModel currFile)
|
||||
{
|
||||
bool done = false;
|
||||
using (MoonPro_ProgContext localDbCtx = new MoonPro_ProgContext(_configuration))
|
||||
{
|
||||
// sovrascrivo il file su disco
|
||||
File.WriteAllBytes(currFile.Path, currFile.FileContent);
|
||||
done = true;
|
||||
}
|
||||
return done;
|
||||
}
|
||||
|
||||
public FileModel FileGetByKey(int FileId)
|
||||
{
|
||||
FileModel thisFile = null;
|
||||
@@ -450,10 +462,10 @@ namespace MP.FileData.Controllers
|
||||
|
||||
// rileggo file...
|
||||
var newFileInfo = new FileInfo(currFile.Path);
|
||||
currFile.LastMod = newFileInfo.LastWriteTime;
|
||||
|
||||
// aggiorno stato del file a unchanged e data mod ad ora...
|
||||
currFile.DiskStatus = FileState.Ok;
|
||||
currFile.LastMod = newFileInfo.LastWriteTime;
|
||||
localDbCtx.Entry(currFile).State = EntityState.Modified;
|
||||
|
||||
// salvo DB
|
||||
|
||||
Reference in New Issue
Block a user