public LibroFirmaMemento(int currentPage, int numElements, string testo, RicercaType tipoRic) { Path = new List <IdName>(); CurrentPage = currentPage; NumElements = numElements; Testo = testo; TipoRicerca = tipoRic; }
public LibroFirmaTestoExecuteCommand(string testo, RicercaType tipoRic) : base() { this._testo = testo; this._tipoRicerca = tipoRic; this._currentPage = 1; this._doRicerca = true; }
public ActionResult RicercaTesto(string testo, RicercaType tipoRic) { logger.Info("begin"); ActionResult res = CommandExecute(new AdlTestoExecuteCommand(testo, tipoRic)); logger.Info("end"); return(res); }
public RicTestoExecuteCommand(string testo, RicercaType tipoRic) : base() { this._idRicSalvata = null; this._testo = testo; this._tipoRicerca = tipoRic; this._currentPage = 1; this._doRicerca = true; }
public RicercaMemento(List <IdName> path, int currentPage, string idRicSalvata, RicercaSalvataType tipoRicSalvata, string testo, RicercaType tipoRic, bool doRicerca) { Path = path; CurrentPage = currentPage; IdRicSalvata = idRicSalvata; TipoRicSalvata = tipoRicSalvata; Testo = testo; TipoRicerca = tipoRic; DoRicerca = doRicerca; }
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"); }
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; } }
public RicercaCommand() { RicercaMemento memento = NavigationHandler.RicercaMemento; if (memento != null) { this._currentPage = memento.CurrentPage; this._idRicSalvata = memento.IdRicSalvata; this._path = memento.Path; this._tipoRicSalvata = memento.TipoRicSalvata; this._testo = memento.Testo; this._tipoRicerca = memento.TipoRicerca; this._doRicerca = memento.DoRicerca; } }
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"); }
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"); }