public async Task ResetStampa(STAMPE stampa) { try { stampa.Lock = false; stampa.Tentativi = 0; stampa.DataLock = null; stampa.DataInizioEsecuzione = null; stampa.MessaggioErrore = string.Empty; await _unitOfWork.CompleteAsync(); } catch (Exception e) { Log.Error("Logic - ResetStampa", e); throw e; } }
public async Task <HttpResponseMessage> DownloadStampa(STAMPE stampa) { try { var _pathTemp = string.Empty; _pathTemp = stampa.NotificaDepositoEM ? AppSettingsConfiguration.RootRepository : AppSettingsConfiguration.CartellaLavoroStampe; var result = await ComposeFileResponse(Path.Combine(_pathTemp, stampa.PathFile)); return(result); } catch (Exception e) { Log.Error("Logic - DownloadStampa", e); throw e; } }
public async Task EliminaStampa(STAMPE stampa) { _unitOfWork.Stampe.Remove(stampa); await _unitOfWork.CompleteAsync(); }
public async Task <Stampa_InfoDto> GetLastInfo(STAMPE stampa) { var result = await _unitOfWork.Stampe.GetLastInfo(stampa.UIDStampa); return(Mapper.Map <STAMPE_INFO, Stampa_InfoDto>(result)); }
public async Task <IEnumerable <Stampa_InfoDto> > GetInfo(STAMPE stampa) { var result = await _unitOfWork.Stampe.GetInfo(stampa.UIDStampa); return(result.Select(Mapper.Map <STAMPE_INFO, Stampa_InfoDto>)); }
public async Task AddInfo(STAMPE stampa, string messaggio) { _unitOfWork.Stampe.AddInfo(stampa.UIDStampa, messaggio); await _unitOfWork.CompleteAsync(); }