コード例 #1
0
        protected override void ExecuteParticular(MainModel model)
        {
            logger.Info("begin");
            model.TabShow = Tab.AREA_DI_LAVORO;
            AdlModel adlModel = new AdlModel(0, ConfigurationHandler.NumResultsForPage);

            if (!_doRicerca)
            {
                _doRicerca   = true;
                _tipoRicerca = RicercaType.RIC_DOCUMENTO_ADL;
                _testo       = "";
            }

            if (_doRicerca)
            {
                RicercaRequest ricRequest = new RicercaRequest();

                //Normalizzo per ADL
                if (_tipoRicerca == RicercaType.RIC_DOCUMENTO)
                {
                    _tipoRicerca = RicercaType.RIC_DOCUMENTO_ADL;
                }
                if (_tipoRicerca == RicercaType.RIC_FASCICOLO)
                {
                    _tipoRicerca = RicercaType.RIC_FASCICOLO_ADL;
                }

                ricRequest.UserInfo = NavigationHandler.CurrentUser;
                if (NavigationHandler.DeleganteInfo != null) //Abbiamo una delega in esercizio
                {
                    ricRequest.UserInfo.DelegatoInfo = NavigationHandler.LoggedInfo;
                }

                ricRequest.IdGruppo           = NavigationHandler.RuoloInfo.IdGruppo;
                ricRequest.IdCorrGlobali      = NavigationHandler.RuoloInfo.Id;
                ricRequest.IdRicercaSalvata   = _idRicSalvata;
                ricRequest.TypeRicercaSalvata = _tipoRicSalvata;
                ricRequest.Text               = _testo;
                ricRequest.TypeRicerca        = _tipoRicerca;
                ricRequest.EnableProfilazione = ConfigurationHandler.RicercaEnableProfilazione;
                ricRequest.EnableUfficioRef   = ConfigurationHandler.RicercaEnableUfficioRef;
                ricRequest.RequestedPage      = _currentPage;
                ricRequest.ParentFolderId     = IdParent;
                ricRequest.FascId             = IdFasc;
                ricRequest.PageSize           = ConfigurationHandler.NumResultsForPage;
                RicercaResponse response = WSStub.ricerca(ricRequest);
                adlModel             = new AdlModel(response.TotalRecordCount, ConfigurationHandler.NumResultsForPage);
                adlModel.Risultati   = response.Risultati;
                adlModel.IdParent    = IdParent;
                adlModel.NomeParent  = NomeParent;
                adlModel.Testo       = _testo;
                adlModel.TypeRicerca = _tipoRicerca;
                if (response.TotalRecordCount == 0)
                {
                    adlModel.CurrentPage = 0;
                }
                else
                {
                    adlModel.CurrentPage = _currentPage;
                }
                adlModel.NumElements = response.TotalRecordCount;
            }
            GetRicSalvateRequest request = new GetRicSalvateRequest();

            request.IdGruppo = NavigationHandler.RuoloInfo.IdGruppo;
            request.UserInfo = NavigationHandler.CurrentUser;
            if (NavigationHandler.DeleganteInfo != null) //Abbiamo una delega in esercizio
            {
                request.UserInfo.DelegatoInfo = NavigationHandler.LoggedInfo;
            }

            adlModel.RicercaInAdl        = "ADL";
            model.TabModel               = adlModel;
            NavigationHandler.AdlMemento = Memento;
            logger.Info("end");
        }
コード例 #2
0
        protected override void ExecuteParticular(MainModel model)
        {
            logger.Info("begin");
            model.TabShow = Tab.RICERCA;
            RicercaModel ricModel = new RicercaModel(0, ConfigurationHandler.NumResultsForPage);


            if (_doRicerca)
            {
                RicercaRequest ricRequest = new RicercaRequest();
                //Normalizzo per Ricerche
                if (_tipoRicerca == RicercaType.RIC_DOCUMENTO_ADL)
                {
                    _tipoRicerca = RicercaType.RIC_DOCUMENTO;
                }
                if (_tipoRicerca == RicercaType.RIC_FASCICOLO_ADL)
                {
                    _tipoRicerca = RicercaType.RIC_FASCICOLO;
                }

                ricRequest.UserInfo = NavigationHandler.CurrentUser;
                if (NavigationHandler.DeleganteInfo != null) //Abbiamo una delega in esercizio
                {
                    ricRequest.UserInfo.DelegatoInfo = NavigationHandler.LoggedInfo;
                }

                ricRequest.IdGruppo           = NavigationHandler.RuoloInfo.IdGruppo;
                ricRequest.IdCorrGlobali      = NavigationHandler.RuoloInfo.Id;
                ricRequest.IdRicercaSalvata   = _idRicSalvata;
                ricRequest.TypeRicercaSalvata = _tipoRicSalvata;
                if (string.IsNullOrEmpty(_idRicSalvata))
                {
                    ricRequest.Text = _testo;
                }
                else
                {
                    ricRequest.Text = string.Empty;
                }
                ricRequest.TypeRicerca        = _tipoRicerca;
                ricRequest.EnableProfilazione = ConfigurationHandler.RicercaEnableProfilazione;
                ricRequest.EnableUfficioRef   = ConfigurationHandler.RicercaEnableUfficioRef;
                ricRequest.RequestedPage      = _currentPage;
                ricRequest.ParentFolderId     = IdParent;
                ricRequest.FascId             = IdFasc;
                ricRequest.PageSize           = ConfigurationHandler.NumResultsForPage;
                RicercaResponse response = WSStub.ricerca(ricRequest);
                ricModel                    = new RicercaModel(response.TotalRecordCount, ConfigurationHandler.NumResultsForPage);
                ricModel.Risultati          = response.Risultati;
                ricModel.IdParent           = IdParent;
                ricModel.NomeParent         = NomeParent;
                ricModel.IdRicercaSalvata   = _idRicSalvata;
                ricModel.TypeRicercaSalvata = _tipoRicSalvata;
                if (string.IsNullOrEmpty(_idRicSalvata))
                {
                    ricModel.Testo = _testo;
                }
                else
                {
                    ricModel.Testo = string.Empty;
                }
                ricModel.TypeRicerca = _tipoRicerca;
                if (response.TotalRecordCount == 0)
                {
                    ricModel.CurrentPage = 0;
                }
                else
                {
                    ricModel.CurrentPage = _currentPage;
                }
                ricModel.NumElements = response.TotalRecordCount;
            }
            GetRicSalvateRequest request = new GetRicSalvateRequest();

            request.IdGruppo = NavigationHandler.RuoloInfo.IdGruppo;
            request.UserInfo = NavigationHandler.CurrentUser;
            if (NavigationHandler.DeleganteInfo != null) //Abbiamo una delega in esercizio
            {
                request.UserInfo.DelegatoInfo = NavigationHandler.LoggedInfo;
            }

            GetRicSalvateResponse resp = WSStub.getRicercheSalvate(request);

            ricModel.Ricerche = resp.Risultati;
            model.TabModel    = ricModel;
            NavigationHandler.RicercaMemento = Memento;
            logger.Info("end");
        }
コード例 #3
0
 public GetRicSalvateResponse getRicercheSalvate(GetRicSalvateRequest request)
 {
     SetUserId(request.UserInfo);
     return(MobileManager.getRicercheSalvate(request));
 }