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) { } }
public LibroFirmaCommand() { LibroFirmaMemento memento = NavigationHandler.LibroFirmaMemento; if (memento != null) { this._path = memento.Path; this._currentPage = memento.CurrentPage; this._numElements = memento.NumElements; this._testo = memento.Testo; this._tipoRicerca = memento.TipoRicerca; this._doRicerca = memento.DoRicerca; } }