Example #1
0
        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);
            }
        }
Example #2
0
        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);
            }
        }