Ejemplo n.º 1
0
        /// Al clic viene salvata la lista dei formato documenti ammessi
        /// </summary>
        protected void BtnSaveDocumentFormat_Click(object sender, EventArgs e)
        {
            string idProject = string.Empty;

            if (Request.Form["rbl_pref"] != null && !string.IsNullOrEmpty(Request.Form["rbl_pref"].ToString()))
            {
                idProject = Request.Form["rbl_pref"].ToString();
                Fascicolo selezionato = null;
                foreach (Fascicolo tempFasc in FascicoliSelezionati)
                {
                    if (tempFasc.systemID.Equals(idProject))
                    {
                        selezionato             = tempFasc;
                        FascicoliSelezionati    = null;
                        FascicoliSelezionati    = new Fascicolo[1];
                        FascicoliSelezionati[0] = selezionato;
                        break;
                    }
                }
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "chiudi", "close_and_save('" + selezionato.systemID + "');", true);
            }
            else
            {
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "no_project", "alert(Selezionare un fascicolo);", true);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// inserisce un documento in un fascicolo
        /// </summary>
        /// <param name="idProfile"></param>
        /// <param name="idFolder"></param>
        /// <param name="infoutente"></param>
        /// <returns></returns>
        public static bool addDocumentoInFolder(string idProfile, string idFolder, InfoUtente infoutente)
        {
            bool result = false;

            try
            {
                //True: se il documento è già classificato nella folder indicata, false altrimenti
                bool isInFolder = docsPaWS.IsDocumentoClassificatoInFolder(idProfile, idFolder);

                if (!isInFolder)
                {
                    Folder fol = UIManager.ProjectManager.getFolder(idFolder, infoutente);
                    //se il doc non è già classificato nella folder indicata allora lo inserisco
                    Fascicolo fasc = UIManager.ProjectManager.getFascicoloById(fol.idFascicolo);
                    string    msg  = string.Empty;
                    result = docsPaWS.FascicolazioneAddDocFolder(infoutente, idProfile, fol, fasc.descrizione, out msg);
                    fol    = null;
                    fasc   = null;
                }
            }
            catch (System.Exception ex)
            {
                UIManager.AdministrationManager.DiagnosticError(ex);
            }
            return(result);
        }
Ejemplo n.º 3
0
        protected void InitializePage()
        {
            Fascicolo fascicolo = null;

            HttpContext.Current.Session.Remove("PageSizeStructure");
            //Back
            if (this.Request.QueryString["back"] != null && this.Request.QueryString["back"].Equals("1"))
            {
                List <Navigation.NavigationObject> navigationList = Navigation.NavigationUtils.GetNavigationList();
                Navigation.NavigationObject        obj            = navigationList.Last();
                if (!obj.CodePage.Equals(Navigation.NavigationUtils.NamePage.PROJECT_STRUCTURE.ToString()))
                {
                    obj = new Navigation.NavigationObject();
                    obj = navigationList.ElementAt(navigationList.Count - 2);
                }

                fascicolo = UIManager.ProjectManager.getFascicoloById(obj.idProject);
            }
            else
            {
                fascicolo = UIManager.ProjectManager.getProjectInSession();
            }

            fascicolo.folderSelezionato = ProjectManager.getFolder(this, fascicolo);
            fascicolo.template          = fascicolo.template = ProfilerProjectManager.getTemplateFascDettagli(fascicolo.systemID);
            UIManager.ProjectManager.setProjectInSession(fascicolo);

            this.InitializeLabel();
            this.InitInitiallyOpenTree();
            this.InitializeAddressBooks();
        }
Ejemplo n.º 4
0
        private void CaricaDatiRicerca(string idFascicolo, string idFolderSel)
        {
            ClearTreeView();
            fascicoloSelezionato = FascicoliManager.getFascicoloById(this, idFascicolo);
            FascicoliManager.setFascicoloSelezionato(this, fascicoloSelezionato);
            Folder folder = FascicoliManager.getFolder(this, fascicoloSelezionato.systemID, "");

            Microsoft.Web.UI.WebControls.TreeNode rootFolder = new Microsoft.Web.UI.WebControls.TreeNode();
            //Creo la root folder dell'albero
            rootFolder.Text = fascicoloSelezionato.codice;
            rootFolder.ID   = fascicoloSelezionato.systemID;

            if (folder.childs.Length > 0)
            {
                LoadTreeview(rootFolder, folder, idFolderSel);
            }

            Folders.Nodes.Add(rootFolder);

            Microsoft.Web.UI.WebControls.TreeNode nodoSel = getSelectedNodeFolder();
            if (nodoSel != null)
            {
                Folders.SelectedNodeIndex = nodoSel.GetNodeIndex();
            }
        }
Ejemplo n.º 5
0
        private void cerca(string desc)
        {
            string descrizione = desc.Trim();

            txt_descrizione.Text = descrizione;
            Fascicolo fascSelezionato = FascicoliManager.getFascicoloSelezionato(this);
            string    idFascicolo     = fascSelezionato.systemID;
            string    myHtml          = string.Empty;

            this.Page.Session.Add("azione", "ricerca");
            if (descrizione != string.Empty)
            {
                Folder[] risultatiFolder = FascicoliManager.getFolderByDescrizione(this, idFascicolo, descrizione);
                if (risultatiFolder != null)
                {
                    for (int i = 0; i < risultatiFolder.Length; i++)
                    {
                        myHtml += "<TR bgColor=#FAFAFA>";
                        myHtml += "<TD class=testo_grigio_scuro><a href='RicercaSottofascicoli.aspx?idFolder=" + ((Folder)risultatiFolder[i]).systemID + "&idfascicolo=" + ((Folder)risultatiFolder[i]).idFascicolo + " ' class='testo_grigio_scuro'>" + fascSelezionato.codice + "</a></TD>";
                        myHtml += "<TD class=testo_grigio>" + ((Folder)risultatiFolder[i]).descrizione + "</TD>";
                        myHtml += "</TR>";
                    }
                    lbl_td.Text     = myHtml;
                    pnl_ric.Visible = true;
                    Folders.Height  = new Unit("180");
                }
                else
                {
                    lbl_msg.Text = "Nessun risultato trovato!";
                }
            }
        }
Ejemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try {
                //Se ACL rimossa, allora visualizzo un messaggio di warning all'utente per poi reindirizzarlo alla HOME.
                Fascicolo Prj = UIManager.ProjectManager.getProjectInSession();

                if ((Prj.systemID != null && !string.IsNullOrEmpty(Prj.systemID)) && ProjectManager.CheckRevocationAcl())
                {
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "function RedirectHome(){$(location).attr('href','" + this.ResolveUrl("~/Index.aspx") + "');} if (parent.fra_main) {parent.fra_main.ajaxDialogModal('RevocationAcl', 'warning', '','',null,null,'RedirectHome()')} else {parent.parent.ajaxDialogModal('RevocationAcl', 'warning', '','',null,null,'RedirectHome()');}", true);
                    return;
                }

                if (!IsPostBack)
                {
                    this.InitializeLanguage();
                    this.InitializePage();
                }
                this.ReApplyScript();
            }
            catch (System.Exception ex)
            {
                UIManager.AdministrationManager.DiagnosticError(ex);
                return;
            }
        }
Ejemplo n.º 7
0
        protected void LnkViewDocument_Click(object sender, EventArgs e)
        {
            Session["IsInvokingFromProjectStructure"] = null;
            SchedaDocumento schedaDocumento = UIManager.DocumentManager.getSelectedRecord();
            Fascicolo       fascicolo       = UIManager.ProjectManager.getProjectInSession();
            //Session["isZoom"] = null;
            List <Navigation.NavigationObject> navigationList = Navigation.NavigationUtils.GetNavigationList();

            Navigation.NavigationObject obj    = navigationList.Last();
            Navigation.NavigationObject newObj = Navigation.NavigationUtils.CloneObject(obj);

            newObj.NamePage         = Navigation.NavigationUtils.GetNamePage(Navigation.NavigationUtils.NamePage.PROJECT_STRUCTURE.ToString(), string.Empty);
            newObj.Link             = Navigation.NavigationUtils.GetLink(Navigation.NavigationUtils.NamePage.PROJECT_STRUCTURE.ToString(), true, this.Page);
            newObj.CodePage         = Navigation.NavigationUtils.NamePage.PROJECT_STRUCTURE.ToString();
            newObj.Page             = "STRUCTURE.ASPX";
            newObj.IdObject         = schedaDocumento.systemId;
            newObj.OriginalObjectId = schedaDocumento.systemId;
            newObj.folder           = fascicolo.folderSelezionato;
            newObj.idProject        = fascicolo.systemID;
            //int indexElement = ((rowIndex + 1) / 2) + this.PageSize * (this.SelectedPage - 1);
            //newObj.DxPositionElement = indexElement.ToString();

            if (obj.NamePage.Equals(Navigation.NavigationUtils.GetNamePage(Navigation.NavigationUtils.NamePage.PROJECT_STRUCTURE.ToString(), string.Empty)) && !string.IsNullOrEmpty(obj.IdObject) && obj.IdObject.Equals(newObj.idProject))
            {
                navigationList.Remove(obj);
            }
            navigationList.Add(newObj);
            Navigation.NavigationUtils.SetNavigationList(navigationList);

            Response.Redirect("../Document/document.aspx");
        }
Ejemplo n.º 8
0
        /// Al clic viene salvata la lista dei formato documenti ammessi
        /// </summary>
        protected void BtnSaveDocumentFormat_Click(object sender, EventArgs e)
        {
            string idProject = string.Empty;

            if (Request.Form["rbl_pref"] != null && !string.IsNullOrEmpty(Request.Form["rbl_pref"].ToString()))
            {
                idProject = Request.Form["rbl_pref"].ToString();
                Fascicolo selezionato = null;

                WSConservazioneLocale.Fascicolo[] projectList = HttpContext.Current.Session["fascicoli"] as Fascicolo[];
                foreach (Fascicolo tempFasc in projectList)
                {
                    if (tempFasc.systemID.Equals(idProject))
                    {
                        selezionato    = tempFasc;
                        projectList    = null;
                        projectList    = new Fascicolo[1];
                        projectList[0] = selezionato;
                        break;
                    }
                }
                //Gabriele Melini 07/11/2013
                //devo rimettere i fascicoli in sessione dopo la scelta, sennò prende sempre il primo
                HttpContext.Current.Session["fascicoli"] = projectList as WSConservazioneLocale.Fascicolo[];
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "chiudi", "close_and_save('" + selezionato.systemID + "');", true);
            }
            else
            {
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "no_project", "alert('Selezionare un fascicolo');", true);
            }
        }
Ejemplo n.º 9
0
        public static FascInfo buildInstance(Fascicolo input)
        {
            FascInfo res = new FascInfo();

            res.IdFasc       = input.systemID;
            res.AccessRights = input.accessRights;
            int AccInt = 0;

            Int32.TryParse(res.AccessRights, out AccInt);
            if (AccInt > 45)
            {
                res.CanTransmit = true;
            }

            if (input.noteFascicolo != null && input.noteFascicolo.Length > 0)
            {
                Array.Sort(input.noteFascicolo, new InfoNoteComparer());
                res.Note = input.noteFascicolo[input.noteFascicolo.Length - 1].Testo;
            }
            res.Descrizione = input.descrizione;
            if (!string.IsNullOrEmpty(input.apertura))
            {
                res.DataApertura = toDate(input.apertura);
            }
            if (!string.IsNullOrEmpty(input.chiusura))
            {
                res.DataChiusura = toDate(input.chiusura);
            }
            res.Codice = input.codice;
            return(res);
        }
Ejemplo n.º 10
0
        public void BindGrid()
        {
            if (Request.QueryString["tipoObj"].Equals("D"))
            {
                SchedaDocumento doc = UIManager.DocumentManager.getSelectedRecord();
                if (doc == null)
                {
                    //return;
                }

                this.HistoryList = DocumentManager.GetVisibilityHistory(doc.systemId, Request.QueryString["tipoObj"], UserManager.GetInfoUser());
            }

            if (Request.QueryString["tipoObj"].Equals("F"))
            {
                Fascicolo fascicolo = UIManager.ProjectManager.getProjectInSession();

                if (fascicolo == null)
                {
                    //return;
                }

                this.HistoryList = DocumentManager.GetVisibilityHistory(fascicolo.systemID, Request.QueryString["tipoObj"], UserManager.GetInfoUser());
            }

            if (this.HistoryList == null || this.HistoryList.Length == 0)
            {
                this.LblHistory.Visible  = true;
                this.GridHistory.Visible = false;
                //return;
            }
            else
            {
                this.GridHistory.Visible = true;
                //Bind list to grid
                List <StoriaDirittoDocumento> list = new List <StoriaDirittoDocumento>();
                list.AddRange(this.HistoryList);
                this.GridHistory.Visible    = true;
                this.GridHistory.DataSource = list;
                this.GridHistory.DataBind();

                //Dt_elem = new ArrayList();
                //for (int i = 0; i < ListHistory.Length; i++)
                //    Dt_elem.Add(new Cols(ListHistory[i].utente, ListHistory[i].ruolo, ListHistory[i].data.Substring(0, 10), ListHistory[i].codOperazione, ListHistory[i].descrizione));

                //if (ListHistory.Length > 0)
                //{
                //    //DocumentManager.setDataGridAllegati(this,Dt_elem);
                //    this.DGStoria.DataSource = Dt_elem;
                //    this.DGStoria.DataBind();
                //    this.LblDettagli.Visible = false;
                //}
                //else
                //{
                //    this.LblDettagli.Visible = true;
                //}
                //this.DGStoria.Visible = true;
            }
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Creazione nuovo fascicolo
        /// </summary>
        /// <param name="classifica"></param>
        /// <param name="fascicolo"></param>
        /// <param name="ruolo"></param>
        /// <param name="enableUfficioReferente"></param>
        /// <returns></returns>
        public bool CreateProject(Classificazione classifica, Fascicolo fascicolo, Ruolo ruolo, bool enableUfficioReferente, out ResultCreazioneFascicolo result)
        {
            logger.Info("BEGIN");
            bool retValue = this.ProjectManagerETDOCS.CreateProject(classifica, fascicolo, ruolo, enableUfficioReferente, out result);

            logger.Info("END");
            return(retValue);
        }
Ejemplo n.º 12
0
        private void InitInitiallyOpenTree()
        {
            Fascicolo Fasc = ProjectManager.getProjectInSession();

            DocsPaWR.Folder folder = ProjectManager.getFolder(this, Fasc);
            this.jstree_initially_open.Text = "\"root_" + folder.systemID + "\"";
            this.treenode_sel.Value         = "root_" + folder.systemID;
        }
Ejemplo n.º 13
0
        /// <summary>
        /// Creazione di un nuovo fascicolo in DocsPa
        /// </summary>
        /// <remarks>
        ///
        /// PreCondizioni:
        ///     Il fascicolo è stato inserito correttamente in DocsPa
        ///     ed è stato generato un'identificativo univoco
        ///
        /// PostCondizioni:
        ///     Creato un oggetto in Documentum corrispondente all'oggetto
        ///     fascicolo di DocsPa. L'oggetto avrà i metadati del fascicolo
        ///     per la sola consultazione in documentum.
        ///
        /// </remarks>
        /// <param name="classifica"></param>
        /// <param name="fascicolo"></param>
        /// <param name="ruolo"></param>
        /// <param name="enableUfficioReferente"></param>
        /// <returns></returns>
        public bool CreateProject(Classificazione classifica, Fascicolo fascicolo, Ruolo ruolo, bool enableUfficioReferente, out ResultCreazioneFascicolo result)
        {
            bool retValue = true;

            //... non fa nulla
            result = ResultCreazioneFascicolo.OK;
            return(retValue);
        }
Ejemplo n.º 14
0
        /// <summary>
        ///  Reperisce il codice del fascicolo
        /// </summary>
        private void GetFascDocumenti()
        {
            this._folder = UIManager.ProjectManager.getProjectInSession().folderSelezionato;
            Fascicolo fascicolo = null;

            fascicolo    = ProjectManager.getProjectInSession();
            this.codFasc = fascicolo.codice;
        }
Ejemplo n.º 15
0
        private void CaricaDati(string idFascicolo)
        {
            ClearTreeView();
            fascicoloSelezionato = FascicoliManager.getFascicoloById(this, idFascicolo);
            FascicoliManager.setFascicoloSelezionato(this, fascicoloSelezionato);
            Folder folder = FascicoliManager.getFolder(this, fascicoloSelezionato.systemID, "");

            LoadTreeviewLivelloZero(folder, fascicoloSelezionato);
        }
Ejemplo n.º 16
0
        private void InitializePage()
        {
            Fascicolo fasc = UIManager.ProjectManager.getProjectInSession();
            List <AssPhaseStatoDiagramma> phasesState = UIManager.DiagrammiManager.GetFaseDiagrammaByIdFase(this.StateDiagram.SYSTEM_ID.ToString(), this.SelectedPhaseId.ToString());

            DocsPaWR.Stato stato = DiagrammiManager.getStatoFasc(fasc.systemID);

            this.lblCurrentState.Text  = stato.DESCRIZIONE;
            this.lblSelectedPhase.Text = (phasesState[0].PHASE as DocsPaWR.Phases).DESCRIZIONE;

            List <string> idStatiSuccessiviSelezionabili = new List <string>();

            for (int i = 0; i < this.StateDiagram.PASSI.Length; i++)
            {
                DocsPaWR.Passo step = (DocsPaWR.Passo) this.StateDiagram.PASSI[i];
                if (step.STATO_PADRE.SYSTEM_ID == stato.SYSTEM_ID)
                {
                    for (int j = 0; j < step.SUCCESSIVI.Length; j++)
                    {
                        DocsPaWR.Stato st = (DocsPaWR.Stato)step.SUCCESSIVI[j];
                        if (DiagrammiManager.IsRuoloAssociatoStatoDia(this.StateDiagram.SYSTEM_ID.ToString(), UIManager.RoleManager.GetRoleInSession().idGruppo, st.SYSTEM_ID.ToString()))
                        {
                            if (!st.STATO_SISTEMA)
                            {
                                idStatiSuccessiviSelezionabili.Add(st.SYSTEM_ID.ToString());
                            }
                        }
                    }
                }
            }

            foreach (AssPhaseStatoDiagramma a in phasesState)
            {
                HtmlGenericControl divLinkStato = new HtmlGenericControl("DIV");

                if (!idStatiSuccessiviSelezionabili.Contains(a.STATO.SYSTEM_ID.ToString()))
                {
                    Label lbl = new Label();
                    lbl.Text = a.STATO.DESCRIZIONE;
                    lbl.ID   = a.STATO.SYSTEM_ID.ToString();
                    lbl.Attributes.Add("class", "disabled");
                    divLinkStato.Controls.Add(lbl);
                }
                else
                {
                    LinkButton lnk = new LinkButton();
                    lnk.Attributes.Add("href", "#");
                    lnk.Text     = a.STATO.DESCRIZIONE;
                    lnk.CssClass = "clickable";
                    lnk.ID       = a.STATO.SYSTEM_ID.ToString();
                    lnk.Attributes.Add("onclick", "$('#HiddenSelectedState').val('" + a.STATO.SYSTEM_ID + "'); disallowOp('ContentPlaceHolderContent');__doPostBack('UpPnlHiddenField');return false;");
                    divLinkStato.Controls.Add(lnk);
                }
                pnlCorrespondentStates.Controls.Add(divLinkStato);
            }
        }
Ejemplo n.º 17
0
        /// <summary>
        /// Funzione per la verifica dei diritti di visibilità da parte di un
        /// utente nei confronti di un oggetto
        /// </summary>
        /// <param name="systemId">System id dell'oggetto di cui verificare i diritti</param>
        /// <param name="objType">Tipo di oggetto di cui verificare i diritti</param>
        /// <param name="userHome">L'utente di cui verificare i diritti</param>
        /// <returns>True se l'utente possiede i diritti di visibilità per l'oggetto specificato</returns>
        private bool CheckRights(string systemId, string objType, Utente userHome)
        {
            // L'eventuale messaggio di errore resituito dalla verifica della visibilità
            string errorMessage = String.Empty;

            // Il fascicolo da mostrare
            Fascicolo project = null;

            if (Session["userRuolo"] != null)
            {
                return(true);
            }

            // Variabile utilizzata per indicare che un ruolo valido per
            // visalizzare il documento è stato trovato
            bool trovato = false;

            foreach (Ruolo ruolo in userHome.ruoli)
            {
                // ...viene immesso il ruolo corrente in sessione...
                Session["userRuolo"] = ruolo;

                // ...se con il ruolo attuale l'utente ha i diritti
                // necessari alla visualizzazione...
                // (nel caso di fascicolo è prima necessario ricavarne l'id)
                if (objType == "F")
                {
                    project = FascicoliManager.getFascicoloDaCodice(this, this.objectId);
                }

                if (project != null)
                {
                    systemId = project.systemID;
                }

                if (DocumentManager.verificaACL(
                        objType,
                        systemId,
                        UserManager.getInfoUtente(),
                        out errorMessage) == 2)
                {
                    trovato = true;
                    break;
                }
            }

            // Se non è stato trovato un ruolo adatto
            if (!trovato)
            {
                // viene segnalato all'utente che non ha i diritti
                // necessari
                this.blMessage.Items.Add(errorMessage);
            }

            return(trovato);
        }
Ejemplo n.º 18
0
        private void PopulatesFieldsProject()
        {
            string    codice       = string.Empty;
            string    descrizione  = string.Empty;
            bool      isRootFolder = false;
            Fascicolo project      = UIManager.ProjectManager.getProjectInSession();
            Folder    folder       = project.folderSelezionato;

            if (project.codice == folder.descrizione)
            {
                this.TxtCodeProject.Text        = project.codice;
                this.TxtDescriptionProject.Text = project.descrizione;
            }
            else
            {
                this.CalcolaFascicolazioneRapida(folder, ref codice, ref descrizione, ref isRootFolder, project.codice);
                this.TxtCodeProject.Text = project.codice + "//" + codice.Substring(0, codice.Length - 2);

                DocsPaWR.Folder[]  listaFolder = null;
                DocsPaWR.Fascicolo fasc        = null;
                string             separatore  = "//";
                int posSep = this.TxtCodeProject.Text.IndexOf("//");
                if (this.TxtCodeProject.Text != string.Empty && posSep > -1)
                {
                    string codiceFascicolo = TxtCodeProject.Text.Substring(0, posSep);
                    string descrFolder     = TxtCodeProject.Text.Substring(posSep + separatore.Length);

                    listaFolder = ProjectManager.getListaFolderDaCodiceFascicolo(this, codiceFascicolo, descrFolder, null);
                    if (listaFolder != null && listaFolder.Length > 0)
                    {
                        //calcolo fascicolazionerapida
                        InfoUtente infoUtente = UserManager.GetInfoUser();
                        fasc = ProjectManager.getFascicoloById(listaFolder[0].idFascicolo, infoUtente);

                        if (fasc != null)
                        {
                            //folder selezionato è l'ultimo
                            fasc.folderSelezionato = listaFolder[listaFolder.Length - 1];
                        }
                        codice      = fasc.codice + separatore;
                        descrizione = fasc.descrizione + separatore;
                        for (int i = 0; i < listaFolder.Length; i++)
                        {
                            codice      += listaFolder[i].descrizione + "/";
                            descrizione += listaFolder[i].descrizione + "/";
                        }
                        codice      = codice.Substring(0, codice.Length - 1);
                        descrizione = descrizione.Substring(0, descrizione.Length - 1);
                    }
                }

                this.TxtCodeProject.Text        = codice;
                this.TxtDescriptionProject.Text = descrizione;
            }
        }
Ejemplo n.º 19
0
        private bool CheckIfRootFolder(DocsPaWR.Folder folder)
        {
            Fascicolo Fasc = ProjectManager.getProjectInSession();

            DocsPaWR.Folder rootFolder = ProjectManager.getFolder(this, Fasc);
            if (folder.systemID == rootFolder.systemID)
            {
                return(true);
            }
            return(false);
        }
Ejemplo n.º 20
0
        /// <summary>
        /// Creazione nuovo fascicolo
        /// </summary>
        /// <param name="classifica"></param>
        /// <param name="fascicolo"></param>
        /// <param name="ruolo"></param>
        /// <param name="enableUfficioReferente"></param>
        /// <param name="result"></param>
        /// <param name="ruoliSuperiori">
        /// Ruoli superiori cui è stata impostata la visibilità del fascicolo
        /// </param>
        /// <returns></returns>
        public bool CreateProject(Classificazione classifica, Fascicolo fascicolo, Ruolo ruolo, bool enableUfficioReferente, out ResultCreazioneFascicolo result, out DocsPaVO.utente.Ruolo[] ruoliSuperiori)
        {
            bool retValue = this.ProjectManagerETDOCS.CreateProject(classifica, fascicolo, ruolo, enableUfficioReferente, out result, out ruoliSuperiori);

            if (retValue)
            {
                retValue = this.ProjectManagerOCS.CreateProject(classifica, fascicolo, ruolo, enableUfficioReferente, out result);
            }

            return(retValue);
        }
Ejemplo n.º 21
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            Fascicolo fasc = FascicoliManager.getFascicoloSelezionato();

            if (fasc.template != null)
            {
                template             = fasc.template;
                lbl_NomeModello.Text = template.DESCRIZIONE;
                inserisciComponenti("SI");
            }
        }
Ejemplo n.º 22
0
        protected void CreateNewDocumentBtnSave_Click(object sender, EventArgs e)
        {
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "function", "reallowOp();", true);
            try
            {
                if (string.IsNullOrEmpty(this.TxtObject.Text))
                {
                    string msgDesc = "WarningDocumentRequestObject";
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('" + msgDesc.Replace("'", @"\'") + "', 'warning', '');} else {parent.ajaxDialogModal('" + msgDesc.Replace("'", @"\'") + "', 'warning', '');}", true);
                    return;
                }

                //CREO IL DOCUMENTO
                SchedaDocumento newDoc = UIManager.DocumentManager.NewSchedaDocumento();
                newDoc.oggetto             = new Oggetto();
                newDoc.oggetto.descrizione = this.TxtObject.Text;
                newDoc = DocumentManager.creaDocumentoGrigio(this, newDoc);

                if (newDoc != null && !string.IsNullOrEmpty(newDoc.systemId))
                {
                    Fascicolo fascicolo = UIManager.ProjectManager.getProjectInSession();
                    // se la creazione del doc è andata a buon fine ..
                    //eseguo la fascicolazione RAPIDA
                    if (fascicolo != null && fascicolo.systemID != null)
                    {
                        string msg = string.Empty;
                        if (!DocumentManager.fascicolaRapida(this, newDoc.systemId, newDoc.docNumber, string.Empty, fascicolo, out msg))
                        {
                            if (string.IsNullOrEmpty(msg))
                            {
                                string language = UIManager.UserManager.GetUserLanguage();
                                msg = Utils.Languages.GetMessageFromCode("WarningDocumentNoClassificated", language);
                                ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('" + utils.FormatJs(msg) + "', 'warning', '', '" + utils.FormatJs(msg) + "');} else {parent.ajaxDialogModal('" + utils.FormatJs(msg) + "', 'warning', '', '" + utils.FormatJs(msg) + "');};", true);
                            }
                        }
                    }
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "closeMask", "if (parent.fra_main) {parent.fra_main.closeAjaxModal('CreateNewDocument', 'up');} else {parent.closeAjaxModal('CreateNewDocument', 'up');};", true);
                }
                else
                {
                    string msg = "ErrorReadElementsSignBook";
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'error', '');} else {parent.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'error', '');}", true);
                    return;
                }
            }
            catch (System.Exception ex)
            {
                UIManager.AdministrationManager.DiagnosticError(ex);
                return;
            }
        }
Ejemplo n.º 23
0
        private InfoFascicolo getInfoFascicoloDaFascicolo(Fascicolo fasc)
        {
            InfoFascicolo infoFasc = new InfoFascicolo();

            infoFasc.idFascicolo       = fasc.systemID;
            infoFasc.descrizione       = fasc.descrizione;
            infoFasc.idClassificazione = fasc.idClassificazione;
            infoFasc.codice            = fasc.codice;
            if (fasc.stato != null && fasc.stato.Equals("A"))
            {
                infoFasc.apertura = fasc.apertura;
            }
            return(infoFasc);
        }
Ejemplo n.º 24
0
        public static RicercaElement buildInstance(Fascicolo input)
        {
            RicercaElement res = new RicercaElement();

            res.Id      = input.systemID;
            res.Tipo    = ElementType.FASCICOLO;
            res.Oggetto = input.descrizione;
            if (input.noteFascicolo != null && input.noteFascicolo.Length > 0)
            {
                Array.Sort(input.noteFascicolo, new InfoNoteComparer());
                res.Note = input.noteFascicolo[input.noteFascicolo.Length - 1].Testo;
            }
            return(res);
        }
Ejemplo n.º 25
0
        protected void BtnConfirm_Click(object sender, EventArgs e)
        {
            Fascicolo project = ProjectManager.getFascicoloSelezionatoFascRapida(this);

            if (project.pubblico)
            {
                string msgConfirm = "WarningDocumentConfirmPublicFolder";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxConfirmModal", "ajaxConfirmModal('" + msgConfirm.Replace("'", @"\'") + "', 'HiddenPublicFolder', '');", true);
            }
            else
            {
                this.FascicolaDocumenti();
            }
        }
Ejemplo n.º 26
0
        private void UnderlineTab(string pageCaller)
        {
            Fascicolo prj = UIManager.ProjectManager.getProjectInSession();

            string language             = UIManager.UserManager.GetUserLanguage();
            string attachment           = Utils.Languages.GetLabelFromCode("DocumentTabAttachment", language);
            string classificationScheme = Utils.Languages.GetLabelFromCode("DocumentTabClassification", language);
            string transmissions        = Utils.Languages.GetLabelFromCode("DocumentTabTransmission", language);
            string deletedVisibility    = Utils.Languages.GetLabelFromCode("DeletedVisibilityTooltip", language);

            DocsPaWR.Tab tab = null;

            if (prj != null && !string.IsNullOrEmpty(prj.systemID))
            {
                tab = UIManager.ProjectManager.GetProjectTab(prj.systemID, UIManager.UserManager.GetInfoUser());

                if (tab != null && !tab.TransmissionsNumber.Equals("0"))
                {
                    this.LinkTransmissions.ToolTip = tab.TransmissionsNumber + " " + transmissions;
                    this.LiTransmissions.Attributes.Remove("class");
                    if (pageCaller.Equals("TRANSMISSIONS"))
                    {
                        this.LiTransmissions.Attributes.Add("class", "prjIAmProfileUnderline");
                    }
                    else
                    {
                        this.LiTransmissions.Attributes.Add("class", "prjOtherUnderline");
                    }
                }
                else
                {
                    this.LinkTransmissions.ToolTip = "0" + " " + transmissions;
                }

                if (tab != null && tab.DeletedSecurity)
                {
                    this.LinkVisibility.ToolTip = deletedVisibility;
                    this.LiVisibility.Attributes.Remove("class");
                    if (pageCaller.Equals("VISIBILITY"))
                    {
                        this.LiVisibility.Attributes.Add("class", "docIAmProfileUnderline");
                    }
                    else
                    {
                        this.LiVisibility.Attributes.Add("class", "docOtherUnderline");
                    }
                }
            }
        }
Ejemplo n.º 27
0
        private void InitializePage()
        {
            Fascicolo fascicolo = UIManager.ProjectManager.getProjectInSession();

            this.litDescription.Text = Server.HtmlEncode(fascicolo.descrizione);

            if (!string.IsNullOrEmpty(Utils.InitConfigurationKeys.GetValue("0", DBKeys.FE_ENABLE_FILTER_EVENT.ToString())) && Utils.InitConfigurationKeys.GetValue("0", DBKeys.FE_ENABLE_FILTER_EVENT.ToString()).Equals("1"))
            {
                this.PnlFilterAuthorAction.Visible = true;
            }

            this.Session["logFascicolo"] = string.Empty;
            this.LoadAction();
            this.loadGrid(null);
            this.UpdPanelEvents.Update();
        }
Ejemplo n.º 28
0
        /// <summary>
        /// carica il datagrid dei log
        /// </summary>
        /// <param name="filter">se null restituisce tutti i log</param>
        private void loadGrid(FilterVisibility[] filter)
        {
            try
            {
                DocumentoLogDocumento[] logFascicolo = null;

                Fascicolo fascicolo = UIManager.ProjectManager.getProjectInSession();
                Folder    folder    = UIManager.ProjectManager.getFolder(this, fascicolo);

                logFascicolo = DocumentManager.getStoriaLog(fascicolo.systemID, folder.systemID, "FASCICOLO", filter);


                if (logFascicolo != null)
                {
                    logFascicolo = (from l in logFascicolo
                                    where l.chaEsito.Equals("1")
                                    select l).ToArray <DocumentoLogDocumento>();

                    foreach (DocumentoLogDocumento doclog in logFascicolo)
                    {
                        doclog.dataAzione      = doclog.dataAzione.Replace('.', ':');
                        doclog.userIdOperatore = doclog.descProduttore;
                    }
                    GridEvents.DataSource   = logFascicolo;
                    Session["logFascicolo"] = logFascicolo;

                    this.GridEvents.PageIndex     = 0;
                    this.GridEvents.SelectedIndex = 0;
                    this.GridEvents.DataBind();

                    GridEvents.PageIndex = 0;
                    this.UpdPanelEvents.Update();

                    string language = UIManager.UserManager.GetUserLanguage();
                    this.GridEvents.HeaderRow.Cells[0].Text = Utils.Languages.GetLabelFromCode("EventsLblData", language);
                    this.GridEvents.HeaderRow.Cells[1].Text = Utils.Languages.GetLabelFromCode("EventsLblUser", language);
                    this.GridEvents.HeaderRow.Cells[2].Text = Utils.Languages.GetLabelFromCode("EventsLblAction", language);
                }
            }

            catch (System.Exception ex)
            {
                UIManager.AdministrationManager.DiagnosticError(ex);
            }
        }
Ejemplo n.º 29
0
        private void SalvaStato()
        {
            Fascicolo fascicolo   = UIManager.ProjectManager.getProjectInSession();
            bool      statoFinale = this.controllaStatoFinale();

            DiagrammiManager.salvaModificaStatoFasc(fascicolo.systemID, this.SelectedState.SYSTEM_ID.ToString(), this.StateDiagram, UserManager.GetInfoUser().userId, UserManager.GetInfoUser(), string.Empty);

            if (statoFinale)
            {
                this.chiudiFascicolo(fascicolo, UserManager.GetInfoUser(), RoleManager.GetRoleInSession());
            }

            //if (this.PnlStateDiagram.Visible && !string.IsNullOrEmpty(this.DocumentStateDiagramDataValue.Text) && fascicolo.template.SYSTEM_ID != null)
            //{
            //    DiagrammiManager.salvaDataScadenzaFasc(fascicolo.systemID, this.DocumentStateDiagramDataValue.Text, fascicolo.template.SYSTEM_ID.ToString());
            //    fascicolo.dtaScadenza = this.DocumentStateDiagramDataValue.Text;
            //    UIManager.ProjectManager.setProjectInSession(fascicolo);
            //}

            //Verifico se effettuare una tramsissione automatica assegnata allo stato
            if (fascicolo.template != null && fascicolo.template.SYSTEM_ID != 0)
            {
                ArrayList modelli = new ArrayList(DiagrammiManager.isStatoTrasmAutoFasc(UserManager.GetInfoUser().idAmministrazione, this.SelectedState.SYSTEM_ID.ToString(), fascicolo.template.SYSTEM_ID.ToString()));
                for (int i = 0; i < modelli.Count; i++)
                {
                    DocsPaWR.ModelloTrasmissione mod = (DocsPaWR.ModelloTrasmissione)modelli[i];
                    if (mod.SINGLE == "1")
                    {
                        TrasmManager.effettuaTrasmissioneFascDaModello(mod, this.SelectedState.SYSTEM_ID.ToString(), fascicolo, this);
                    }
                    else
                    {
                        for (int k = 0; k < mod.MITTENTE.Length; k++)
                        {
                            if (mod.MITTENTE[k].ID_CORR_GLOBALI.ToString() == RoleManager.GetRoleInSession().systemId)
                            {
                                TrasmManager.effettuaTrasmissioneFascDaModello(mod, this.SelectedState.SYSTEM_ID.ToString(), fascicolo, this);
                                break;
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 30
0
        private void init()
        {
            _trasm = new Trasmissione();
            _trasm.noteGenerali = _modello.VAR_NOTE_GENERALI;
            if (_isDoc)
            {
                _trasm.infoDocumento = BusinessLogic.Documenti.DocManager.GetInfoDocumento(_infoUtente, _id, null);
                _trasm.tipoOggetto   = TipoOggetto.DOCUMENTO;
            }
            else
            {
                Fascicolo fasc = BusinessLogic.Fascicoli.FascicoloManager.getFascicoloById(_id, _infoUtente);
                _trasm.infoFascicolo = this.getInfoFascicoloDaFascicolo(fasc);
                _trasm.tipoOggetto   = TipoOggetto.FASCICOLO;
            }
            _trasm.utente = BusinessLogic.Utenti.UserManager.getUtente(_infoUtente.idPeople);
            //aggiunta delegato
            if (_infoUtente.delegato != null)
            {
                _trasm.delegato = _infoUtente.delegato.idPeople;
            }

            _trasm.ruolo     = _ruolo;
            _trasm.NO_NOTIFY = _modello.NO_NOTIFY;
            TrasmSingoleBuilder trasmSingoleBuilder = new TrasmSingoleBuilder(_infoUtente, _ruolo, _modello);

            for (int i = 0; i < _modello.RAGIONI_DESTINATARI.Count; i++)
            {
                RagioneDest ragDest     = (RagioneDest)_modello.RAGIONI_DESTINATARI[i];
                ArrayList   destinatari = new ArrayList(ragDest.DESTINATARI);
                for (int j = 0; j < destinatari.Count; j++)
                {
                    MittDest       mittDest = (MittDest)destinatari[j];
                    Corrispondente corr     = getCorrispondente(mittDest);
                    if (corr != null)
                    {
                        RagioneTrasmissione ragione = BusinessLogic.Trasmissioni.QueryTrasmManager.getRagioneById("" + mittDest.ID_RAGIONE);
                        trasmSingoleBuilder.addTrasmSingole(corr, ragione, mittDest.VAR_NOTE_SING, mittDest.CHA_TIPO_TRASM, mittDest.SCADENZA);
                    }
                }
            }
            _trasm.trasmissioniSingole = trasmSingoleBuilder.TrasmissioniSingole;
        }