示例#1
0
        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;
            }
        }
示例#2
0
        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;
            }
        }
示例#3
0
 public async Task EliminaStampa(STAMPE stampa)
 {
     _unitOfWork.Stampe.Remove(stampa);
     await _unitOfWork.CompleteAsync();
 }
示例#4
0
        public async Task <Stampa_InfoDto> GetLastInfo(STAMPE stampa)
        {
            var result = await _unitOfWork.Stampe.GetLastInfo(stampa.UIDStampa);

            return(Mapper.Map <STAMPE_INFO, Stampa_InfoDto>(result));
        }
示例#5
0
        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>));
        }
示例#6
0
 public async Task AddInfo(STAMPE stampa, string messaggio)
 {
     _unitOfWork.Stampe.AddInfo(stampa.UIDStampa, messaggio);
     await _unitOfWork.CompleteAsync();
 }