Beispiel #1
0
 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)
     {
     }
 }
Beispiel #2
0
        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");
        }