protected override void ExecuteParticular(MainModel model) { logger.Info("begin"); HSMSignRequest request = new HSMSignRequest(); request.UserInfo = NavigationHandler.CurrentUser; request.IdGruppo = NavigationHandler.RuoloInfo.IdGruppo; request.IdCorrGlobali = NavigationHandler.RuoloInfo.Id; request.IdDoc = _idDoc; HSMSignResponse response = WSStub.hsmVerifySign(request); logger.Info("responseCode: " + response.Code); if (response.Code == HSMSignResponseCode.OK) { model.HSMVerifySignResult = true; } else if (response.Code == HSMSignResponseCode.KO) { model.HSMVerifySignResult = false; } else { logger.Info("add system error"); addSystemError(model); } logger.Info("end"); }
public override MainModel Execute() { AccettaRifiutaTrasmRequest request = new AccettaRifiutaTrasmRequest(); request.IdGruppo = NavigationHandler.RuoloInfo.IdGruppo; request.IdTrasmissione = _idTrasm; request.UserInfo = NavigationHandler.CurrentUser; if (NavigationHandler.DeleganteInfo != null) //Abbiamo una delega in esercizio { request.UserInfo.DelegatoInfo = NavigationHandler.LoggedInfo; } AccettaRifiutaTrasmResponse resp = WSStub.setDataVistaSP_TV(request); if (resp.Code == AccettaRifiutaTrasmResponseCode.OK) { NavigationHandler.ToDoListMemento = null; return(new ToDoListCommand().Execute()); } else if (resp.Code == AccettaRifiutaTrasmResponseCode.BL_ERROR) { //NavigationHandler.ToDoListMemento = null; MainModel model = NavigationHandler.Model; model.Errori = new List <string> { resp.Errore }; return(model); } else { MainModel model = NavigationHandler.Model; addSystemError(model); return(model); } }
protected override void ExecuteParticular(MainModel model) { logger.Info("begin"); HSMSignRequest request = new HSMSignRequest(); request.UserInfo = NavigationHandler.CurrentUser; request.IdGruppo = NavigationHandler.RuoloInfo.IdGruppo; request.IdCorrGlobali = NavigationHandler.RuoloInfo.Id; request.AliasCertificato = this._aliasCertificato.ToUpper(); request.DominioCertificato = this._dominioCertificato.ToUpper(); request.cofirma = this._cofirma; request.ConvertPdf = this._convertPdf; request.OtpFirma = this._otpFirma.ToUpper(); request.PinCertificato = this._pinCertificato.ToUpper(); request.TipoFirma = this._tipoFirma; request.timestamp = this._timestamp; HSMSignResponse response = WSStub.HsmMultiSign(request); logger.Info("responseCode: " + response.Code); if (response.Code == HSMSignResponseCode.OK) { model.HSMSignResult = true; } else { logger.Info("add system error"); model.HSMSignResult = false; addSystemError(model); } logger.Info("end"); }
public override OperationResponse Execute() { logger.Info("begin"); OperationResponse res = new OperationResponse(); CreaDelegaDaModelloRequest request = new CreaDelegaDaModelloRequest(); request.IdModelloDelega = _idModelloDelega; request.DataFine = _dataFine; request.DataInizio = _dataInizio; request.UserInfo = NavigationHandler.CurrentUser; try { logger.Info("Chiamata al ws..."); CreaDelegaDaModelloResponse response = WSStub.creaDelegaDaModello(request); logger.Info("Chiamata effettuata"); if (response.Code == CreaDelegaDaModelloResponseCode.OK) { res.Success = true; return(res); } else { res.Success = false; res.Error = Resources.Errors.Common_SystemError; } } catch (Exception e) { res.Success = false; res.Error = Resources.Errors.Common_SystemError; } return(res); }
protected override void ExecuteParticular(MainModel model) { logger.Info("begin"); HSMSignRequest request = new HSMSignRequest(); request.AliasCertificato = this._aliasCertificato.ToUpper(); request.DominioCertificato = this._dominioCertificato.ToUpper(); request.UserInfo = NavigationHandler.CurrentUser; request.IdGruppo = NavigationHandler.RuoloInfo.IdGruppo; request.IdCorrGlobali = NavigationHandler.RuoloInfo.Id; HSMSignResponse response = WSStub.hsmRequestOTP(request); logger.Info("responseCode: " + response.Code); if (response.Code == HSMSignResponseCode.OK) { model.HSMRequestOTPResult = true; } else { logger.Info("add system error"); model.HSMRequestOTPResult = false; addSystemError(model); } logger.Info("end"); }
public ActionResult Login() { try { //waking up the BE, may give error..(channel security error) bool online = WSStub.beIsReady(); } catch (Exception e) { logger.ErrorFormat("beIsReady gave error {0} :{1} mabee a wakeup error", e.Message, e.StackTrace); } ViewData["WAPath"] = Request.Url.ToString().Replace(Request.AppRelativeCurrentExecutionFilePath.Replace("~", ""), ""); string images = ""; List <String> lstImages = ListImages(); if (lstImages.Count == 0) { ViewData["Images"] = string.Empty; return(View()); } foreach (string a in lstImages) { images += "\"" + a + "\","; } images += "§#§"; //Il mitico carattere di galasso!!!! images = images.Replace(",§#§", ""); ViewData["Images"] = images; return(View()); }
protected override void ExecuteParticular(MainModel model) { RevocaDelegheRequest request = new RevocaDelegheRequest(); request.UserInfo = NavigationHandler.CurrentUser; request.Deleghe = _deleghe.ToArray(); RevocaDelegheResponse response = WSStub.revocaDeleghe(request); logger.Debug("codice: " + response.Code + " errore: " + response.Error); if (response.Code == RevocaDelegheResponseCode.OK) { new ListaDelegheCommand().ExecuteExternal(model); } else { if (!string.IsNullOrEmpty(response.Error)) { model.Errori = new List <string> { response.Error }; } else { addSystemError(model); } } }
public ActionResult RicercaElementi(string descrizione, string ragione) { logger.Info("begin"); try { //NavigationHandler.CurrentUser.Ruoli logger.Debug("descrizione: " + descrizione); logger.Debug("ragione:" + ragione); RicercaSmistamentoRequest request = new RicercaSmistamentoRequest(); ConfigurationHandler confHandler = new ConfigurationHandler(); request.Descrizione = descrizione; request.UserInfo = NavigationHandler.CurrentUser; request.Ruolo = NavigationHandler.RuoloInfo; logger.Debug("idAmministrazione: " + request.UserInfo.IdAmministrazione); request.NumMaxResults = confHandler.MaxNumRisultatiAutocomplete; request.numMaxResultsForCategory = confHandler.MaxNumRisultatiAutocompleteURP; // MEV SMISTAMENTO // metto nella request il tipo di ragione (competenza/conoscenza) request.Ragione = ragione; logger.Debug("Chiamata ws..."); RicercaSmistamentoResponse response = WSStub.ricercaSmistamento(request); logger.Info("end"); return(JsonWithConverters(response.Elements)); } catch (Exception e) { logger.Error("Exception: " + e); return(null); } }
public override OperationResponse Execute() { logger.Info("begin"); OperationResponse res = new OperationResponse(); try { LibroFirmaCambiaStatoRequest request = new LibroFirmaCambiaStatoRequest(); request.elemento = _element; request.UserInfo = NavigationHandler.CurrentUser; request.IdorrGlobaliRuolo = NavigationHandler.RuoloInfo.Id; request.NuovoStato = _nuovoStato; logger.Debug("chiamata ws..."); LibroFirmaResponse response = WSStub.CambiaStatoElementoLibroFirma(request); if (response.Code == LibroFirmaResponseCode.OK) { res.Success = true; } else { res.Success = false; res.Error = Resources.Errors.Common_SystemError; } logger.Debug("chiamata eseguita"); } catch (Exception e) { res.Success = false; res.Error = Resources.Errors.Common_SystemError; return(res); } return(res); }
public ActionResult RicercaUtentiInRuolo(string descrizione) { logger.Debug("RicercaUtentiInRuolo"); logger.Info("begin"); try { //NavigationHandler.CurrentUser.Ruoli logger.Debug("descrizione: " + descrizione); RicercaSmistamentoRequest request = new RicercaSmistamentoRequest(); ConfigurationHandler confHandler = new ConfigurationHandler(); request.Descrizione = descrizione; request.UserInfo = NavigationHandler.CurrentUser; request.Ruolo = NavigationHandler.RuoloInfo; logger.Debug("idAmministrazione: " + request.UserInfo.IdAmministrazione); request.NumMaxResults = -99; request.numMaxResultsForCategory = confHandler.MaxNumRisultatiAutocompleteURP; logger.Debug("Chiamata ws..."); //RicercaSmistamentoResponse response = WSStub.ricercaSmistamento(request); RicercaSmistamentoResponse response = WSStub.aggiungiSmistamentoElement(request); logger.Info("end"); return(JsonWithConverters(response.Elements)); } catch (Exception e) { logger.Error("Exception: " + e); return(null); } }
public ActionResult Logout() { logger.Info("begin"); try { //Ho una delega in esercizio la dismetto prima if (NavigationHandler.DeleganteInfo != null) { DismettiDelegaRequest delegaRequest = new DismettiDelegaRequest(); delegaRequest.IdDelegante = NavigationHandler.DeleganteInfo.UserId; delegaRequest.UserInfo = NavigationHandler.CurrentUser; DismettiDelegaResponse response = WSStub.dismettiDelega(delegaRequest); if (response.Code == DismettiDelegaResponseCode.OK) { NavigationHandler.DeleganteInfo = null; NavigationHandler.ToDoListMemento = null; NavigationHandler.RicercaMemento = null; NavigationHandler.DelegaEsercitata = null; } } LogoutRequest request = new LogoutRequest(); request.UserInfo = NavigationHandler.CurrentUser; LogoutResponse resp = WSStub.logout(request); logger.Info("logout success"); } catch (Exception e) { logger.Info("exception: " + e); } NavigationHandler.clearSession(); logger.Info("end"); return(RedirectToAction("Login", "Login")); }
public ActionResult Index() { logger.Info("begin"); logger.Info("UserAgent: " + Request.UserAgent); if (NavigationHandler.CurrentUser == null) { return(RedirectToAction("Login", "Login")); } MainModel model = NavigationHandler.Model; if (model == null) { //dopo la login. model = new ToDoListCommand().Execute(); //calcolo delege in esercizio CountDelegheAttiveRequest cdr = new CountDelegheAttiveRequest(); cdr.UserInfo = NavigationHandler.CurrentUser; CountDelegheAttiveResponse resp = WSStub.getCountDelegheAttive(cdr); int numDeleghe = resp.NumDeleghe; //inserimento nel model model.NumDeleghe = numDeleghe; } else { //dopo il refresh model.NumDeleghe = 0; } logger.Info("end"); return(View(model)); }
public override MainModel Execute() { AccettaRifiutaTrasmRequest request = new AccettaRifiutaTrasmRequest(); request.IdGruppo = NavigationHandler.RuoloInfo.IdGruppo; request.IdTrasmissione = _idTrasm; request.IdTrasmissioneUtente = _idTrasmUtente; request.UserInfo = NavigationHandler.CurrentUser; if (NavigationHandler.DeleganteInfo != null) //Abbiamo una delega in esercizio { request.UserInfo.DelegatoInfo = NavigationHandler.LoggedInfo; } request.Action = _action; request.Note = _note; AccettaRifiutaTrasmResponse resp = WSStub.accettaRifiutaTrasm(request); if (resp.Code == AccettaRifiutaTrasmResponseCode.OK) { if (_putInAdl) { ADLActionRequest adlRequest = new ADLActionRequest(); adlRequest.DocInfo = new DocInfo { IdDoc = _idDoc, TipoProto = _tipoProto }; adlRequest.UserInfo = request.UserInfo; adlRequest.IdGruppo = request.IdGruppo; adlRequest.IdCorrGlobali = NavigationHandler.RuoloInfo.Id; adlRequest.AdlAction = ADLActionRequest.ADLActions.ADD; ADLActionResponse adlResp = WSStub.ADLAction(adlRequest); if (adlResp.Code != AddToADLResponseCode.OK) { MainModel model = NavigationHandler.Model; addSystemError(model); return(model); } } NavigationHandler.ToDoListMemento = null; return(new ToDoListCommand().Execute()); } else if (resp.Code == AccettaRifiutaTrasmResponseCode.BL_ERROR) { //NavigationHandler.ToDoListMemento = null; MainModel model = NavigationHandler.Model; model.Errori = new List <string> { resp.Errore }; return(model); } else { MainModel model = NavigationHandler.Model; addSystemError(model); return(model); } }
public ActionResult Preview(string id, string page, string dimX, string dimY) { try { logger.Info("begin"); logger.Info("page: " + page + ", dimX: " + dimX + ", dimY: " + dimY); GetPreviewRequest request = new GetPreviewRequest(); int numPage = 1; if (!string.IsNullOrEmpty(page)) { numPage = int.Parse(page); } int _dimX = 845; if (!string.IsNullOrEmpty(dimX)) { _dimX = int.Parse(dimX); } int _dimY = 1200; if (!string.IsNullOrEmpty(dimY)) { _dimY = int.Parse(dimY); } request.UserInfo = NavigationHandler.CurrentUser; request.IdDoc = id; request.RequestedPage = numPage; request.DimX = _dimX; request.DimY = _dimY; request.IdGruppo = NavigationHandler.RuoloInfo.IdGruppo; request.IdCorrGlobali = NavigationHandler.RuoloInfo.Id; GetPreviewResponse response = WSStub.getPreview(request); switch (response.Code) { case GetPreviewResponseCode.OK: logger.Info("return doc"); return(File(response.File.Content, response.File.ContentType)); case GetPreviewResponseCode.NO_PREVIEW_FOR_EXTENSION: logger.Info("doc not found"); return(File("~/Content/Green/img/ipad/no_preview.jpg", "image/jpeg")); case GetPreviewResponseCode.PAGE_NOT_FOUND: return(File("~/Content/Green/img/ipad/no_page.jpg", "image/jpeg")); default: logger.Info("doc not found"); return(File("~/Content/img/ipad/no_acquisito.jpg", "image/jpeg")); } } catch (Exception e) { logger.Error("Eccezione: " + e); return(File(NavigationHandler.NoPreviewImage, "image/jpeg")); } }
protected override void ExecuteParticular(MainModel model) { logger.Info("begin"); try { LibroFirmaRequest request = new LibroFirmaRequest(); request.UserInfo = NavigationHandler.CurrentUser; request.IdGruppo = NavigationHandler.RuoloInfo.IdGruppo; request.PageSize = ConfigurationHandler.NumResultsForPage; request.RequestedPage = 1; LibroFirmaMemento memento = NavigationHandler.LibroFirmaMemento; if (memento != null) { request.Testo = memento.Testo; request.TipoRicerca = memento.TipoRicerca; } else { request.Testo = string.Empty; request.TipoRicerca = RicercaType.RIC_OGGETTO_LF; } logger.Debug("chiamata ws..."); LibroFirmaResponse response = WSStub.FirmaSelezionatiElementiLf(request); if (response.Code == LibroFirmaResponseCode.OK) { LibroFirmaModel tabModel = new LibroFirmaModel(response.TotalRecordCount, ConfigurationHandler.NumResultsForPage); tabModel.LibroFirmaElements = response.Elements; if (response.TotalRecordCount == 0) { tabModel.CurrentPage = 0; } else { tabModel.CurrentPage = 1; } tabModel.NumElements = response.TotalRecordCount; tabModel.Testo = request.Testo; tabModel.TypeRicerca = request.TipoRicerca; model.TabModel = tabModel; model.TabShow = Tab.LIBRO_FIRMA; NavigationHandler.LibroFirmaMemento = new LibroFirmaMemento(tabModel.CurrentPage, tabModel.NumElements, tabModel.Testo, tabModel.TypeRicerca); } else { logger.Info("add system error"); } logger.Info("end"); } catch (Exception e) { } }
protected override void ExecuteParticular(MainModel model) { logger.Info("begin"); model.TabShow = Tab.LIBRO_FIRMA; if (string.IsNullOrEmpty(_testo)) { _doRicerca = true; _tipoRicerca = RicercaType.RIC_OGGETTO_LF; _testo = string.Empty; } LibroFirmaRequest request = new LibroFirmaRequest(); request.UserInfo = NavigationHandler.CurrentUser; request.IdGruppo = NavigationHandler.RuoloInfo.IdGruppo; request.PageSize = ConfigurationHandler.NumResultsForPage; request.RequestedPage = _currentPage; request.Testo = _testo; request.TipoRicerca = _tipoRicerca; LibroFirmaResponse resp = WSStub.GetLibroFirmaElements(request); logger.Info("responseCode: " + resp.Code); if (resp.Code == LibroFirmaResponseCode.OK) { LibroFirmaModel tabModel = new LibroFirmaModel(resp.TotalRecordCount, ConfigurationHandler.NumResultsForPage); tabModel.LibroFirmaElements = resp.Elements; if (resp.TotalRecordCount == 0) { tabModel.CurrentPage = 0; } else { tabModel.CurrentPage = _currentPage; } tabModel.NumElements = resp.TotalRecordCount; tabModel.Testo = _testo; tabModel.TypeRicerca = _tipoRicerca; model.TabModel = tabModel; NavigationHandler.LibroFirmaMemento = Memento; } else { logger.Info("add system error"); addSystemError(model); } logger.Info("end"); }
protected override void ExecuteParticular(MainModel model) { logger.Info("begin"); RuoloInfo ruolo = NavigationHandler.RuoloInfo; bool result = WSStub.isAllowedOTP(ruolo); if (result) { model.HSMIsAllowedOTP = true; } else { model.HSMIsAllowedOTP = false; } logger.Info("end"); }
protected override void ExecuteParticular(MainModel model) { logger.Info("begin"); RuoloInfo ruolo = NavigationHandler.RuoloInfo; bool result = WSStub.LibroFirmaIsAutorized(ruolo); if (result) { model.IsAutorizedLF = true; } else { model.IsAutorizedLF = false; } logger.Info("end"); }
public override MainModel Execute() { string idEvento = this._idEvento; bool result = WSStub.rimuoviNotifica(idEvento); if (result) { NavigationHandler.ToDoListMemento = null; return(new ToDoListCommand().Execute()); } else { MainModel model = NavigationHandler.Model; addSystemError(model); return(model); } }
public override OperationResponse Execute() { OperationResponse res = new OperationResponse(); try { EseguiTrasmRequest request = new EseguiTrasmRequest(); request.IdCorrGlobali = NavigationHandler.RuoloInfo.Id; request.IdModelloTrasm = _idTrasmModel; if (_isDoc) { request.IdDoc = _id; } else { request.IdFasc = _id; } request.UserInfo = NavigationHandler.CurrentUser; if (NavigationHandler.DeleganteInfo != null) //Abbiamo una delega in esercizio { request.UserInfo.DelegatoInfo = NavigationHandler.LoggedInfo; } request.Note = _note; request.Path = getPath(); EseguiTrasmResponse response = WSStub.eseguiTrasm(request); if (response.Code == EseguiTrasmResponseCode.OK) { res.Success = true; } else { res.Success = false; res.Error = Resources.Errors.Common_SystemError; } //NavigationHandler.ToDoListMemento = null; } catch (Exception e) { res.Success = false; res.Error = Resources.Errors.Common_SystemError; } return(res); }
public ActionResult Login(LoginModel model) { logger.Info("begin"); try { //waking up the BE, may give error..(channel security error) bool online = WSStub.beIsReady(); } catch (Exception e) { logger.ErrorFormat("beIsReady gave error {0} :{1} mabee a wakeup error", e.Message, e.StackTrace); } if (ModelState.IsValid) { string username = model.UserName; string password = model.Password; LoginRequest loginRequest = new LoginRequest(); loginRequest.UserName = username; loginRequest.Password = password; try { LoginResponse loginResponse = WSStub.login(loginRequest); if (loginResponse.Code == LoginResponseCode.OK) { logger.Info("login success"); NavigationHandler.clearSession(); NavigationHandler.LoggedInfo = loginResponse.UserInfo; return(RedirectToAction("Index", "Home")); } else { logger.Info("error in login"); ModelState.AddModelError("", LoginValidation.ErrorCodeToString(loginResponse.Code)); } } catch (Exception e) { logger.Info("exception: " + e); ModelState.AddModelError("", LoginValidation.ErrorCodeToString(LoginResponseCode.SYSTEM_ERROR)); } } logger.Info("end"); return(View(model)); }
public override OperationResponse Execute() { logger.Info("begin"); OperationResponse res = new OperationResponse(); try { CreaDelegaRequest request = new CreaDelegaRequest(); request.Delega = _delega; request.UserInfo = NavigationHandler.CurrentUser; logger.Debug("chiamata ws..."); CreaDelegaResponse response = WSStub.creaDelega(request); logger.Debug("chiamata eseguita"); if (response.Code == CreaDelegaResponseCode.OK) { logger.Debug("delega creata"); res.Success = true; } else if (response.Code == CreaDelegaResponseCode.NOT_CREATED) { logger.Debug("delega non creata"); res.Success = false; res.Error = Resources.Errors.Deleghe_DelegaNotCreated; } else if (response.Code == CreaDelegaResponseCode.OVERLAPPING_PERIODS) { logger.Debug("delega non creata per periodi sovrapposti"); res.Success = false; res.Error = Resources.Errors.Deleghe_OverlappingPeriods; } else if (response.Code == CreaDelegaResponseCode.SYSTEM_ERROR) { logger.Debug("errore di sistema"); res.Success = false; res.Error = Resources.Errors.Common_SystemError; } } catch (Exception e) { res.Success = false; res.Error = Resources.Errors.Common_SystemError; } return(res); }
public override OperationResponse Execute() { logger.Info("begin"); OperationResponse res = new OperationResponse(); try { EseguiSmistamentoRequest request = new EseguiSmistamentoRequest(); request.Elements = _elements; request.IdDocumento = _idDocument; request.IdTrasmissione = _idTrasm; request.IdTrasmissioneUtente = _idTrasmUtente; request.IdTrasmissioneSingola = _idTrasmSingola; request.NoteGenerali = _note; request.Ruolo = NavigationHandler.RuoloInfo; request.UserInfo = NavigationHandler.CurrentUser; if (NavigationHandler.DeleganteInfo != null) //Abbiamo una delega in esercizio { request.UserInfo.DelegatoInfo = NavigationHandler.LoggedInfo; } // request.UserInfo. = NavigationHandler.DeleganteInfo ; EseguiSmistamentoResponse response = WSStub.eseguiSmistamento(request); if (response.Code == EseguiSmistamentoResponseCode.OK) { res.Success = true; } else { logger.Debug("errore di sistema"); res.Success = false; res.Error = Resources.Errors.Common_SystemError; } } catch (Exception e) { logger.Debug("eccezione: " + e); res.Success = false; res.Error = Resources.Errors.Common_SystemError; } return(res); }
protected override void ExecuteParticular(MainModel model) { logger.Info("begin"); UserInfo userInfo = NavigationHandler.CurrentUser; RuoloInfo ruolo = NavigationHandler.RuoloInfo; model.TabModel = NavigationHandler.Model.TabModel; bool result = WSStub.ExistsElementWithSignPades(userInfo, ruolo); if (result) { (model.TabModel as LibroFirmaModel).ExistsSignPades = true; } else { (model.TabModel as LibroFirmaModel).ExistsSignPades = false; } logger.Info("end"); }
protected override void ExecuteParticular(MainModel model) { model.TabShow = Tab.CREA_DELEGA; CreaDelegaModel tabModel = new CreaDelegaModel(); model.TabModel = tabModel; ListaModelliDelegaRequest request = new ListaModelliDelegaRequest(); request.UserInfo = NavigationHandler.CurrentUser; ListaModelliDelegaResponse response = WSStub.getListaModelliDelega(request); if (response.Code == ListaModelliDelegaResponseCode.OK) { tabModel.ModelliDelega = response.Modelli; } else { addSystemError(model); } }
public override MainModel Execute() { ADLActionRequest request = new ADLActionRequest(); request.DocInfo = new DocInfo { IdDoc = id, TipoProto = tipoProto }; request.UserInfo = NavigationHandler.CurrentUser; request.IdGruppo = NavigationHandler.RuoloInfo.IdGruppo; request.IdCorrGlobali = NavigationHandler.RuoloInfo.Id; request.AdlAction = ADLActionRequest.ADLActions.REMOVE; if (fascicolo) { request.DocInfo.TipoProto = "fasc"; } if (NavigationHandler.DeleganteInfo != null) //Abbiamo una delega in esercizio { request.UserInfo.DelegatoInfo = NavigationHandler.LoggedInfo; } ADLActionResponse resp = WSStub.ADLAction(request); if (resp.Code == AddToADLResponseCode.OK) { MainModel model = NavigationHandler.Model; return(new AdlCommand().Execute()); /* * NavigationHandler.ToDoListMemento = null; * return new ToDoListCommand().Execute(); */ } else { MainModel model = NavigationHandler.Model; addSystemError(model); return(model); } }
protected override void ExecuteParticular(MainModel model) { logger.Info("begin"); model.TabShow = _tab; GetDocInfoRequest request = new GetDocInfoRequest(); request.UserInfo = NavigationHandler.CurrentUser; request.IdTrasm = _idTrasm; request.IdEvento = _idEvento; request.IdDoc = _idDoc; request.IdGruppo = NavigationHandler.RuoloInfo.IdGruppo; request.IdCorrGlobali = NavigationHandler.RuoloInfo.Id; if (NavigationHandler.DeleganteInfo != null) //Abbiamo una delega in esercizio { request.UserInfo.DelegatoInfo = NavigationHandler.LoggedInfo; } GetDocInfoResponse response = WSStub.getDocInfo(request); logger.Info("responseCode: " + response.Code); if (response.Code == GetDocInfoResponseCode.OK) { DettaglioDFTrasmModel tabModel = new DettaglioDFTrasmModel(); tabModel.IdTrasm = _idTrasm; tabModel.IdEvento = _idEvento;; tabModel.DocInfo = response.DocInfo; tabModel.Allegati = response.Allegati; tabModel.TrasmInfo = response.TrasmInfo; if (tabModel.TrasmInfo != null && !tabModel.TrasmInfo.HasWorkflow && ConfigurationHandler.RemoveTrasmInTDL) { //NavigationHandler.ToDoListMemento = null; } model.TabModel = tabModel; } else { logger.Info("add system error"); addSystemError(model); } logger.Info("end"); }
public ActionResult File(string id) { try { logger.Info("begin"); GetFileRequest request = new GetFileRequest(); request.UserInfo = NavigationHandler.CurrentUser; request.IdDoc = id; request.IdGruppo = NavigationHandler.RuoloInfo.IdGruppo; request.IdCorrGlobali = NavigationHandler.RuoloInfo.Id; GetFileResponse response = WSStub.getFile(request); if (response.Code == GetFileResponseCode.OK) { //forza il content-type ad octet-stream se vuoto if (response.File.ContentType == "") { if (response.File.FullName.ToUpper().Contains(".PDF")) { response.File.ContentType = "Content-type: application/pdf"; } else { response.File.ContentType = "Content-type: application/octet-stream"; } } logger.Info("return doc"); return(File(response.File.Content, response.File.ContentType, response.File.OriginalFileName)); } else { logger.Info("doc not found"); return(View("DocNotFound")); } } catch (Exception e) { logger.Error("eccezione: " + e); return(View("DocNotFound")); } }
protected override void ExecuteParticular(MainModel model) { logger.Info("begin"); AccettaDelegaRequest request = new AccettaDelegaRequest(); request.Delega = _delega; request.UserInfo = NavigationHandler.CurrentUser; request.SessionId = NavigationHandler.SessionId; AccettaDelegaResponse response = WSStub.accettaDelega(request); if (response.Code == AccettaDelegaResponseCode.OK) { NavigationHandler.DelegaEsercitata = response.DelegaAccettata; NavigationHandler.DeleganteInfo = response.UserInfo; NavigationHandler.ToDoListMemento = null; NavigationHandler.RicercaMemento = null; model.DescrUtente = NavigationHandler.CurrentUser.Descrizione; model.IdRuolo = NavigationHandler.RuoloInfo.Id; model.DescrRuolo = NavigationHandler.RuoloInfo.Descrizione; new ToDoListCommand().ExecuteExternal(model); } else { if (_errors.ContainsKey(response.Code)) { model.Errori = new List <string> { _errors[response.Code] }; } else { model.Errori = new List <string> { Resources.Errors.Common_SystemError }; } } }
public ActionResult NavigaUO(string idUO) { logger.Debug("RicercaUtentiInRuolo"); logger.Info("begin"); try { GetSmistamentoTreeRequest request = new GetSmistamentoTreeRequest(); ConfigurationHandler confHandler = new ConfigurationHandler(); request.UserInfo = NavigationHandler.CurrentUser; request.Ruolo = NavigationHandler.RuoloInfo; request.IdUO = idUO; GetSmistamentoTreeResponse response = WSStub.getSmistamentoTree(request); logger.Info("end"); return(JsonWithConverters(response.Element)); } catch (Exception e) { logger.Error("Exception: " + e); return(null); } }