private void Page_Load(object sender, System.EventArgs e) { try { // Put user code to initialize the page here folder = FascicoliManager.getFolderSelezionato(this); if (!IsPostBack) { this.txt_nomeFolder.Text = folder.descrizione; } } catch (System.Exception ex) { ErrorManager.redirect(this, ex); } }
/// <summary> /// /// </summary> /// <param name="result"></param> /// <returns></returns> private bool CreateNewFolder(out DocsPaWR.ResultCreazioneFolder result) { bool retValue = false; result = DocsPAWA.DocsPaWR.ResultCreazioneFolder.GENERIC_ERROR; try { DocsPaWR.Folder folderSelected = FascicoliManager.getFolderSelezionato(this); Microsoft.Web.UI.WebControls.TreeNode nodeSelected = getSelectedNodeFolder(); if (folderSelected != null) { DocsPaWR.Folder newFolder = new DocsPAWA.DocsPaWR.Folder(); newFolder.idFascicolo = fascicolo.systemID; newFolder.idParent = folderSelected.systemID; newFolder.descrizione = Session["descNewFolder"].ToString(); if (FascicoliManager.newFolder(this, ref newFolder, infoUt, userRuolo, out result)) { DocsPaWR.Folder folder = FascicoliManager.getFolder(this, fascicolo); caricaFoldersFascicolo(folder); selectNodeFolder(nodeSelected); } retValue = (result == DocsPAWA.DocsPaWR.ResultCreazioneFolder.OK); } } catch (System.Web.Services.Protocols.SoapException es) { ErrorManager.redirect(this, es); } return(retValue); }
private void caricaFoldersFascicolo(DocsPAWA.DocsPaWR.Folder folder) { FascicoliManager.removeHashFolder(this); Folders.Nodes.Clear(); HashFolder.Clear(); indexH = 0; Microsoft.Web.UI.WebControls.TreeNode rootFolder = new Microsoft.Web.UI.WebControls.TreeNode(); if (folder != null) { //Creo la root folder dell'albero //Modifica per sostituire la dicitura "Root Folder" con il codice del fascicolo rootFolder.Text = fascicolo.codice; // folder.descrizione; //rootFolder.NavigateUrl="fascDettagliFasc.aspx?idFolder="+indexH.ToString(); //rootFolder.Target="iFrame_cn"; rootFolder.ID = indexH.ToString(); //aggiungo la root folder alla collezione dei nodi dell'albero Folders.Nodes.Add(rootFolder); //aggiungo la root folder alla tabella di hash associata HashFolder.Add(indexH, folder); indexH = indexH + 1; } //Costruzione Albero Folder del fascicolo. if (folder.childs.Length > 0) { for (int k = 0; k < folder.childs.Length; k++) { this.CreateTree(rootFolder, folder.childs[k]); } } FascicoliManager.setHashFolder(this, this.HashFolder); }
private void Page_Load(object sender, System.EventArgs e) { tipoOggetto = Request.QueryString["tipo"]; if (!IsPostBack) { Btn_ok.Attributes.Add("onClick", "javascript:window.close();"); if (tipoOggetto.Equals("D")) { schedaDocumento = (DocsPAWA.DocsPaWR.SchedaDocumento)DocumentManager.getDocumentoSelezionato(this); if (schedaDocumento == null) { this.lb_dettagli.Text = "Errore nel reperimento dei dati del documento"; this.lb_dettagli.Visible = true; return; } // Se l'id del ruolo creatore del documento risulta storicizzato, viene mostrato un pulsante che mostra // la storia delle modifiche del ruolo if (Utils.CheckIfCreatorRoleIsDisabled(schedaDocumento)) { this.ibRoleHistory.Visible = true; this.ibRoleHistory.OnClientClick = popup.RoleHistory.GetScriptToOpenWindow(schedaDocumento.creatoreDocumento.idCorrGlob_Ruolo, schedaDocumento.creatoreDocumento.idCorrGlob_Ruolo); } else { this.ibRoleHistory.Visible = false; } if (schedaDocumento.tipoProto.Equals("G")) { this.Label2.Text = "Storia del documento " + schedaDocumento.docNumber; } else if (schedaDocumento.protocollo != null && schedaDocumento.protocollo.segnatura != null && !schedaDocumento.protocollo.segnatura.Equals("")) { this.Label2.Text = "Storia del documento " + schedaDocumento.protocollo.segnatura; } else { this.Label2.Text = "Storia del documento " + schedaDocumento.docNumber; } ListaLogDocumento = DocumentManager.getStoriaLog(this, schedaDocumento.systemId, "DOCUMENTO"); if (ListaLogDocumento == null || (ListaLogDocumento != null && ListaLogDocumento.Length <= 0)) { DataGrid1.Visible = false; this.lb_dettagli.Text = "Non ci sono attività che riguardano il documento in esame";; this.lb_dettagli.Visible = true; } else { string data; string utente; string idPeopleOPeratore; string idGruppoOperatore; string idAmm; string modificaObj; string codAzione; string ruolo; string chaEsito; for (int i = 0; i < ListaLogDocumento.Length; i++) { data = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogDocumento[i]).dataAzione; data = data.Replace(".", ":"); utente = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogDocumento[i]).userIdOperatore; idPeopleOPeratore = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogDocumento[i]).idPeopleOPeratore; ruolo = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogDocumento[i]).idGruppoOperatore; idAmm = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogDocumento[i]).idAmm; modificaObj = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogDocumento[i]).descrOggetto; codAzione = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogDocumento[i]).codAzione; chaEsito = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogDocumento[i]).chaEsito; utente += " (" + ruolo + ")"; //if (ruolo.Equals("1")) // ruolo = "OK"; //else // ruolo = "KO"; if (chaEsito.Equals("1")) { this.dataSetStoriaObj1.element1.Addelement1Row(data, ruolo, utente, modificaObj); } } Session["Dg_Log"] = this.dataSetStoriaObj1.Tables[0]; this.DataGrid1.DataSource = this.dataSetStoriaObj1.Tables[0]; this.DataGrid1.DataBind(); } } else { Fasc = FascicoliManager.getFascicoloSelezionato(this); Folder = FascicoliManager.getFolder(this, Fasc); if (Fasc == null) { this.lb_dettagli.Text = "Errore nel reperimento dei dati del fascicolo"; this.lb_dettagli.Visible = true; return; } // Se l'id del ruolo creatore del documento risulta storicizzato, viene mostrato un pulsante che mostra // la storia delle modifiche del ruolo if (Utils.CheckIfCreatorRoleIsDisabled(Fasc)) { this.ibRoleHistory.Visible = true; this.ibRoleHistory.OnClientClick = popup.RoleHistory.GetScriptToOpenWindow(Fasc.creatoreFascicolo.idCorrGlob_Ruolo, Fasc.creatoreFascicolo.idCorrGlob_Ruolo); } else { this.ibRoleHistory.Visible = false; } this.Label2.Text = "Storia del fascicolo " + Fasc.codice; ListaLogFascicolo = FascicoliManager.getStoriaLog(this, Fasc.systemID, "FASCICOLO"); ListaLogFolder = FascicoliManager.getStoriaLog(this, Folder.systemID, "FOLDER"); if ((ListaLogFascicolo == null || (ListaLogFascicolo != null && ListaLogFascicolo.Length <= 0)) && (ListaLogFolder == null || (ListaLogFolder != null && ListaLogFolder.Length <= 0))) { DataGrid1.Visible = false; this.lb_dettagli.Text = "Non ci sono attività che riguardano il fascicolo in esame";; this.lb_dettagli.Visible = true; } else { string data; string utente; string idPeopleOPeratore; string idGruppoOperatore; string idAmm; string modificaObj; string codAzione; string ruolo; string chaEsito; for (int i = 0; i < ListaLogFascicolo.Length; i++) { data = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogFascicolo[i]).dataAzione; data = data.Replace(".", ":"); utente = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogFascicolo[i]).userIdOperatore; idPeopleOPeratore = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogFascicolo[i]).idPeopleOPeratore; ruolo = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogFascicolo[i]).idGruppoOperatore; idAmm = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogFascicolo[i]).idAmm; modificaObj = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogFascicolo[i]).descrOggetto; codAzione = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogFascicolo[i]).codAzione; chaEsito = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogFascicolo[i]).chaEsito; utente += " (" + ruolo + ")"; //if (ruolo.Equals("1")) // ruolo = "OK"; //else // ruolo = "KO"; if (chaEsito.Equals("1")) { this.dataSetStoriaObj1.element1.Addelement1Row(data, ruolo, utente, modificaObj); } } for (int i = 0; i < ListaLogFolder.Length; i++) { data = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogFolder[i]).dataAzione; data = data.Replace(".", ":"); utente = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogFolder[i]).userIdOperatore; idPeopleOPeratore = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogFolder[i]).idPeopleOPeratore; ruolo = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogFolder[i]).idGruppoOperatore; idAmm = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogFolder[i]).idAmm; modificaObj = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogFolder[i]).descrOggetto; codAzione = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogFolder[i]).codAzione; chaEsito = ((DocsPAWA.DocsPaWR.DocumentoLogDocumento)ListaLogFolder[i]).chaEsito; utente += " (" + ruolo + ")"; //if (ruolo.Equals("1")) // ruolo = "OK"; //else // ruolo = "KO"; if (chaEsito.Equals("1")) { this.dataSetStoriaObj1.element1.Addelement1Row(data, ruolo, utente, modificaObj); } } Session["Dg_Log"] = this.dataSetStoriaObj1.Tables[0]; this.DataGrid1.DataSource = this.dataSetStoriaObj1.Tables[0]; this.DataGrid1.DataBind(); } } } }