/// <summary> /// /// </summary> /// <param name="infoUtente"></param> /// <param name="codiceFascicolo"></param> /// <returns></returns> public static DocsPaVO.fascicolazione.Fascicolo GetFascicolo(DocsPaVO.utente.InfoUtente infoUtente, string codiceFascicolo) { // Reperimento registro per la ricerca fascicolo // DocsPaVO.utente.Registro registro = DocsPaServices.DocsPaServiceHelper.GetRegistroRuoloPreferito(infoUtente); DocsPaVO.fascicolazione.Fascicolo fascicolo = BusinessLogic.Fascicoli.FascicoloManager.getFascicoloDaCodice(infoUtente, codiceFascicolo, null, false, true); if (fascicolo == null) { throw new ApplicationException(string.Format("Fascicolo con codice {0} non trovato", codiceFascicolo)); } if (string.IsNullOrEmpty(fascicolo.codiceGerarchia) && !string.IsNullOrEmpty(fascicolo.idClassificazione)) { // Reperimento del codice del nodo titolario (codice gerarchia) di appartenenza del fascicolo, // nel caso non sia stato specificato come descrizione ma solo come ID DocsPaVO.amministrazione.OrgTitolario titolario = BusinessLogic.Amministrazione.TitolarioManager.getTitolarioById(fascicolo.idClassificazione); if (titolario != null) { fascicolo.codiceGerarchia = titolario.Codice; } } return(fascicolo); }
private string GetTitolario(string idTitolario) { string result = string.Empty; DocsPaVO.amministrazione.OrgTitolario titolario = BusinessLogic.Amministrazione.TitolarioManager.getTitolarioById(idTitolario); if (titolario != null && !string.IsNullOrEmpty(titolario.Descrizione)) { result = titolario.Descrizione; } return(result); }
public static Services.ClassificationScheme.GetClassificationSchemeById.GetClassificationSchemeByIdResponse GetClassificationSchemeById(Services.ClassificationScheme.GetClassificationSchemeById.GetClassificationSchemeByIdRequest request) { Services.ClassificationScheme.GetClassificationSchemeById.GetClassificationSchemeByIdResponse response = new Services.ClassificationScheme.GetClassificationSchemeById.GetClassificationSchemeByIdResponse(); try { DocsPaVO.utente.Utente utente = null; DocsPaVO.utente.InfoUtente infoUtente = null; //Inizio controllo autenticazione utente infoUtente = Utils.CheckAuthentication(request, "GetClassificationSchemeById"); utente = BusinessLogic.Utenti.UserManager.getUtenteById(infoUtente.idPeople); if (utente == null) { //Utente non trovato throw new PisException("USER_NO_EXIST"); } //Fine controllo autenticazione utente if (request != null && string.IsNullOrEmpty(request.IdClassificationScheme)) { throw new PisException("ID_CLASSIFICATIONSCHEME_REQUIRED"); } Domain.ClassificationScheme classificationSchemeResponse = new Domain.ClassificationScheme(); DocsPaVO.amministrazione.OrgTitolario titolario = null; try { titolario = BusinessLogic.Amministrazione.TitolarioManager.getTitolarioById(request.IdClassificationScheme); } catch { //Titolari non trovati throw new PisException("CLASSIFICATION_NOT_FOUND"); } if (titolario != null) { if (titolario.Stato == DocsPaVO.amministrazione.OrgStatiTitolarioEnum.Attivo) { classificationSchemeResponse.Active = true; } else { classificationSchemeResponse.Active = false; } classificationSchemeResponse.Description = titolario.Descrizione; classificationSchemeResponse.Id = titolario.ID; } else { //Titolari non trovati throw new PisException("CLASSIFICATION_NOT_FOUND"); } response.ClassificationScheme = classificationSchemeResponse; response.Success = true; } catch (PisException pisEx) { logger.ErrorFormat("PISException: {0}, {1}", pisEx.ErrorCode, pisEx.Description); response.Error = new Services.ResponseError { Code = pisEx.ErrorCode, Description = pisEx.Description }; response.Success = false; } catch (Exception ex) { logger.ErrorFormat("Eccezione Generica: APPLICATION_ERROR, {0}", ex.Message); response.Error = new Services.ResponseError { Code = "APPLICATION_ERROR", Description = ex.Message }; response.Success = false; } return(response); }
/// <summary> /// Cancellazione struttura di classificazione /// </summary> /// <param name="titolario"></param> /// <returns></returns> public bool DeleteTitolario(DocsPaVO.amministrazione.OrgTitolario titolario) { return(this.InstanceETDOCS.DeleteTitolario(titolario)); }