예제 #1
0
        private void DataGrid1_ItemCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
        {
            if (e.CommandName == "ShowInfo")
            {
                DocsPaWR.InfoDocumento newinfoDoc = null;
                if (e.Item.ItemIndex >= 0)
                {
                    string str_indexSel = ((Label)this.DataGrid1.Items[e.Item.ItemIndex].Cells[7].Controls[1]).Text;
                    int    indexSel     = Int32.Parse(str_indexSel);

                    this.infoDoc = RicercaDocumentiControllatiSessionMng.GetListaInfoDocumenti(this);

                    if (indexSel > -1)
                    {
                        newinfoDoc = (DocsPAWA.DocsPaWR.InfoDocumento) this.infoDoc[indexSel];
                    }

                    if (newinfoDoc != null)
                    {
                        DocumentManager.setRisultatoRicerca(this, newinfoDoc);
                        FascicoliManager.removeFascicoloSelezionato(this);
                        FascicoliManager.removeFolderSelezionato(this);
                        RicercaDocumentiControllatiSessionMng.ClearSessionData(this);
                        Response.Write("<script>window.open('../documento/gestionedoc.aspx?tab=protocollo','principale');</script>");
                        Response.Write("<script>window.close();</script>");
                    }
                }
            }
        }
예제 #2
0
        /// <summary>
        /// Elimina un documento dal fascicolo
        /// </summary>
        /// <param name="key">Chiave del record da elimnare</param>
        private void deleteDocument(int key)
        {
            Hashtable hashDoc = FascicoliManager.getHashDocProtENonProt(this);

            if (hashDoc != null)
            {
                DocsPaWR.InfoDocumento infoDoc = (DocsPAWA.DocsPaWR.InfoDocumento)hashDoc[key];
                if (infoDoc != null)
                {
                    string          msg              = string.Empty;
                    DocsPaWR.Folder fold             = FascicoliManager.getFolderSelezionato(this);
                    string          valoreChiaveFasc = utils.InitConfigurationKeys.GetValue(UserManager.getInfoUtente().idAmministrazione, "FE_FASC_RAPIDA_REQUIRED");
                    if (string.IsNullOrEmpty(valoreChiaveFasc))
                    {
                        valoreChiaveFasc = "false";
                    }
                    DocsPAWA.DocsPaWR.ValidationResultInfo result = FascicoliManager.deleteDocFromFolder(this, fold, infoDoc.idProfile, valoreChiaveFasc, out msg);
                    if (result != null && result.BrokenRules.Length > 0)
                    {
                        DocsPAWA.DocsPaWR.BrokenRule br = (DocsPAWA.DocsPaWR.BrokenRule)result.BrokenRules[0];
                        ClientScript.RegisterStartupScript(this.GetType(), "sottonumeroSuccessivo", "alert('" + br.Description + "');", true);
                        return;
                    }
                    if (msg != string.Empty)
                    {
                        Response.Write("<script>alert('" + msg + "')</script>");
                        return;
                    }
                }
            }

            // rimuove la sessione della chiave che specifica il record da eliminare
            Page.Session.Remove("key");
        }
예제 #3
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            // CaricoFrame
            this.superiore.NavigateTo  = "testata320.aspx";
            this.principale.NavigateTo = "sceltaRuolo.aspx";
            this.inferiore.NavigateTo  = "bottom.aspx";


            // Put user code to initialize the page here
            string tipoOggetto = Request.QueryString["tipoOggetto"];
            string idOggetto   = Request.QueryString["idObj"];



            if (tipoOggetto != null && idOggetto != null)
            {
                DocsPaWR.InfoDocumento infoDoc = DocumentManager.getRisultatoRicerca(this);

                if (infoDoc != null)
                {
                    string nomeTab;
                    if (infoDoc.numProt != null && infoDoc.numProt.Length > 0)
                    {
                        nomeTab = "protocollo";
                    }
                    else
                    {
                        nomeTab = "profilo";
                    }

                    this.principale.NavigateTo = "documento/gestionedoc.aspx?tab" + nomeTab;
                }
            }
        }
예제 #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="infoDocumento"></param>
        /// <returns></returns>
        protected string GetTipo(DocsPaWR.InfoDocumento infoDocumento)
        {
            DocsPAWA.DocsPaWR.EtichettaInfo[]         etichette;
            DocsPAWA.DocsPaWR.DocsPaWebService        wws     = new DocsPAWA.DocsPaWR.DocsPaWebService();
            DocsPAWA.AdminTool.Manager.SessionManager session = new DocsPAWA.AdminTool.Manager.SessionManager();
            DocsPAWA.DocsPaWR.InfoUtente infoUtente           = session.getUserAmmSession();
            String idAmm = null;

            if (UserManager.getInfoUtente() != null && !string.IsNullOrEmpty(UserManager.getInfoUtente().idAmministrazione))
            {
                idAmm = UserManager.getInfoUtente().idAmministrazione;
            }
            etichette = wws.getEtichetteDocumenti(infoUtente, idAmm);
            string grigio   = etichette[3].Descrizione; //Valore G
            string allegato = etichette[4].Descrizione; //Valore ALL

            if (infoDocumento.allegato)
            {
                // return "ALL";
                return(allegato);
            }
            else
            {
                // return "NP";
                return(grigio);
            }
        }
예제 #5
0
 //Recupera la lista di documenti appartenenti ad una data serie
 private void caricaDataTablesSerie(int numPage, out int nRec, out int numTotPage)
 {
     nRec       = 0;
     numTotPage = 0;
     try
     {
         dataTableProt = new ArrayList();
         DocsPaWR.InfoDocumento[]    ListaDoc = null;
         DocsPAWA.DocsPaWR.Templates template = (DocsPAWA.DocsPaWR.Templates)Session["template"];
         string valOggetto = Session["valOggetto"].ToString();
         string anno       = Session["anno"].ToString();
         string rf_AOO     = Session["aoo_rf"].ToString();
         //Restituisce la lista di tutti i documenti per la serie selezionata
         ListaDoc = DocumentManager.getDocInSerie(UserManager.getInfoUtente(this).idGruppo, UserManager.getInfoUtente(this).idPeople, this, template, numPage, out numTotPage, out nRec, valOggetto, anno, rf_AOO);
         this.TotalRecordCount       = ListaDoc.Length;
         this.TotalRecordCount       = nRec;
         this.dgDoc.VirtualItemCount = this.TotalRecordCount;
         if (ListaDoc != null)
         {
             if (ListaDoc.Length > 0)
             {
                 for (int i = 0; i < ListaDoc.Length; i++)
                 {
                     DocsPaWR.InfoDocumento infoDoc = ListaDoc[i];
                     CostruisciDataTable(infoDoc);
                 }
             }
         }
     }
     catch (Exception es)
     {
         ErrorManager.redirect(this, es);
     }
 }
예제 #6
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DataGrid1_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            string errorMessage = string.Empty;

            DocsPaWR.InfoDocumento infoDocumento = this.GetDocumentoSelezionato();

            int retValue = DocumentManager.verificaACL("D", infoDocumento.idProfile, UserManager.getInfoUtente(), out errorMessage);

            if (retValue == 0 || retValue == 1)
            {
                string script = ("<script>alert('" + errorMessage + "');</script>");
                Response.Write(script);
            }
            else
            {
                DocumentManager.setRisultatoRicerca(this, infoDocumento);
                DocumentManager.removeListaNonDocProt(this);
                //rimuovo l'eventuale fascicolo selezionato per la ricerca, altrimenti
                //si vede nel campo fasc rapida di profilo/protocollo
                FascicoliManager.removeFascicoloSelezionatoFascRapida();
                // Impostazione documento selezionato
                this.SetSelectedDocument();

                Response.Write(string.Format("<script language='javascript'>top.principale.document.location = '../documento/gestionedoc.aspx?tab=profilo&allegato={0}';</script>", infoDocumento.allegato.ToString().ToLower()));
            }
        }
예제 #7
0
        private string moveToDoListInPage(ObjScrollElementsList objScrollElementsList, Page page, ScrollManager.ScrollDirection scrollDirection)
        {
            string script = string.Empty;

            DocsPAWA.DocsPaWR.Trasmissione[] dettTrasm = null;

            if (SiteNavigation.CallContextStack.CallerContext != null)
            {
                //Verifico in che direzione muovermi
                if (scrollDirection == ScrollManager.ScrollDirection.NEXT)
                {
                    objScrollElementsList.selectedElement++;

                    //Recupero il dettaglio della trasissione
                    dettTrasm = TrasmManager.trasmGetDettaglioTrasmissione(UserManager.getUtente(page), UserManager.getRuolo(page), (DocsPAWA.DocsPaWR.infoToDoList)objScrollElementsList.objList[objScrollElementsList.selectedElement]);
                    if (dettTrasm != null)
                    {
                        SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["idTrasm"] = dettTrasm[0].systemId;
                    }
                }
                if (scrollDirection == ScrollManager.ScrollDirection.PREV)
                {
                    objScrollElementsList.selectedElement--;

                    //Recupero il dettaglio della trasissione
                    dettTrasm = TrasmManager.trasmGetDettaglioTrasmissione(UserManager.getUtente(page), UserManager.getRuolo(page), (DocsPAWA.DocsPaWR.infoToDoList)objScrollElementsList.objList[objScrollElementsList.selectedElement]);
                    if (dettTrasm != null)
                    {
                        SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["idTrasm"] = dettTrasm[0].systemId;
                    }
                }
            }

            if (objScrollElementsList.objList != null)
            {
                //Recupero l'infoDocumento o l'infoFascicolo dal dettaglio della trasmissione
                if (dettTrasm != null && dettTrasm[0].infoDocumento != null && !string.IsNullOrEmpty(dettTrasm[0].infoDocumento.idProfile))
                {
                    DocsPaWR.InfoDocumento doc = dettTrasm[0].infoDocumento;

                    if (doc != null)
                    {
                        script = ScrollManager.refreshPage(doc, page);
                    }
                }

                if (dettTrasm != null && dettTrasm[0].infoFascicolo != null && !string.IsNullOrEmpty(dettTrasm[0].infoFascicolo.idFascicolo))
                {
                    DocsPaWR.InfoFascicolo fasc = dettTrasm[0].infoFascicolo;

                    if (fasc != null)
                    {
                        script = ScrollManager.refreshPage(fasc, page);
                    }
                }
            }

            return(script);
        }
예제 #8
0
        private string moveTrasmInPage(ObjScrollElementsList objScrollElementsList, Page page, ScrollManager.ScrollDirection scrollDirection)
        {
            string script = string.Empty;

            DocsPAWA.DocsPaWR.Trasmissione trasm = null;

            if (SiteNavigation.CallContextStack.CallerContext != null)
            {
                //Verifico in che direzione muovermi
                if (scrollDirection == ScrollManager.ScrollDirection.NEXT)
                {
                    objScrollElementsList.selectedElement++;

                    //Recupero la trasmissione
                    trasm = (DocsPAWA.DocsPaWR.Trasmissione)objScrollElementsList.objList[objScrollElementsList.selectedElement];
                    if (trasm != null)
                    {
                        SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["docIndex"] = objScrollElementsList.selectedElement.ToString();
                    }
                }
                if (scrollDirection == ScrollManager.ScrollDirection.PREV)
                {
                    objScrollElementsList.selectedElement--;

                    //Recupero la trasmissione
                    trasm = (DocsPAWA.DocsPaWR.Trasmissione)objScrollElementsList.objList[objScrollElementsList.selectedElement];
                    if (trasm != null)
                    {
                        SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["docIndex"] = objScrollElementsList.selectedElement.ToString();
                    }
                }
            }

            if (objScrollElementsList.objList != null)
            {
                //Recupero l'infoDocumento o l'infoFascicolo dal dettaglio della trasmissione
                if (trasm != null && trasm.infoDocumento != null && !string.IsNullOrEmpty(trasm.infoDocumento.idProfile))
                {
                    DocsPaWR.InfoDocumento doc = trasm.infoDocumento;

                    if (doc != null)
                    {
                        script = ScrollManager.refreshPage(doc, page);
                    }
                }

                if (trasm != null && trasm.infoFascicolo != null && !string.IsNullOrEmpty(trasm.infoFascicolo.idFascicolo))
                {
                    DocsPaWR.InfoFascicolo fasc = trasm.infoFascicolo;

                    if (fasc != null)
                    {
                        script = ScrollManager.refreshPage(fasc, page);
                    }
                }
            }

            return(script);
        }
예제 #9
0
 /// <summary>
 /// Reperimento path icona dettaglio
 /// </summary>
 /// <param name="infoDocumento"></param>
 /// <returns></returns>
 protected string GetPathIconaDettaglio(DocsPaWR.InfoDocumento infoDocumento)
 {
     if (!string.IsNullOrEmpty(infoDocumento.acquisitaImmagine) &&
         infoDocumento.acquisitaImmagine.Equals("1"))
     {
         return("../images/proto/dett_lente_doc.gif");
     }
     else
     {
         return(String.Empty);
     }
 }
예제 #10
0
        /// <summary>
        /// utilizzato da ActiveX di stampa. Estrae il codice fascicolo a cui il documento è associato
        /// </summary>
        /// <returns>codice Fascicolo</returns>
        private string getCodiceFascicolo()
        {
            string codFascicolo = "";

            if (documento != null)
            {
                //RECUPERARE VALORE PER infoDocumento
                DocsPaWR.InfoDocumento infoDocumento = DocumentManager.getInfoDocumento(DocumentManager.getSelectedRecord());
                codFascicolo = DocumentManager.getFascicoloDoc(this, infoDocumento);
            }
            return(codFascicolo);
        }
예제 #11
0
        /// <summary>
        /// utilizzato da ActiveX di stampa. Estrae il codice classifica a cui la scheda documento è associata.
        /// </summary>
        /// <returns>codice classifica</returns>
        private string getClassificaPrimaria()
        {
            string codClassifica = "";

            if (documento != null)
            {
                //RECUPERARE VALORE PER infoDocumento
                DocsPaWR.InfoDocumento infoDocumento = DocumentManager.getInfoDocumento(documento);
                codClassifica = DocumentManager.GetClassificaDoc(this, infoDocumento.idProfile);
            }
            return(codClassifica);
        }
예제 #12
0
        protected void RowSelected_RowCommand(object sender, GridViewRowEventArgs e)
        {
            try {
                if (e.Row.RowType == DataControlRowType.DataRow)
                {
                    string idProfile_trasm = ((Label)e.Row.FindControl("LblIdSel")).Text;
                    string language        = UIManager.UserManager.GetUserLanguage();

                    if (!string.IsNullOrEmpty(idProfile_trasm))
                    {
                        DocsPaWR.SchedaDocumento schedaDoc = DocumentManager.getDocumentDetails(this, idProfile_trasm, "");
                        DocsPaWR.InfoDocumento   doc       = DocumentManager.getInfoDocumento(schedaDoc);

                        if (doc.tipoProto.ToUpper().Equals("R"))
                        {
                            //Tipologia documento non visualizzabile
                            ((Label)e.Row.FindControl("Comunication")).Text = Utils.Languages.GetLabelFromCode("HistoryPreservedDocNotView", language);
                        }
                        else
                        {
                            // Verifica se l'utente ha i diritti per accedere al documento
                            //int retValue = DocumentManager.verificaACL("D", idProfile_trasm, UserManager.getInfoUtente(), out errorMessage);
                            //if (retValue == 0 || retValue == 1)
                            //{
                            //    string script = ("<script>alert('" + errorMessage + "');</script>");
                            //    Response.Write(script);
                            //}
                            //else
                            //{

                            //Rendo il record cliccabile
                            e.Row.Attributes["onclick"] = "$('#grid_rowindex').val('" + ((Label)e.Row.FindControl("LblIdSel")).Text + "'); __doPostBack('UpGridCorr', ''); return false;";
                            e.Row.Attributes.Add("onmouseover", "this.style.cursor='pointer'");
                            //}
                        }
                    }
                    else
                    {
                        //Non esiste alcuna trasmissione associata al documento
                        ((Label)e.Row.FindControl("Comunication")).Text = Utils.Languages.GetLabelFromCode("HistoryPreservedDocNotTrasm", language);
                    }
                }
            }
            catch (System.Exception ex)
            {
                UIManager.AdministrationManager.DiagnosticError(ex);
                return;
            }
        }
예제 #13
0
        private void buildParametriPagina()
        {
            //creo i dati che dovrà gestire la pagina
            try
            {
                //caricamento dei dati di sessione
                DocsPaWR.InfoUtente    infoUser = UserManager.getInfoUtente(this);
                DocsPaWR.InfoDocumento infoDoc  = DocumentManager.getInfoDocumento(DocumentManager.getDocumentoSelezionato(this));

                //caricamento dei dati dell'albero
                albero = DocumentManager.getCatenaDoc(infoUser.idGruppo, infoUser.idPeople, infoDoc.idProfile, this);
            }
            catch (System.Exception es)
            {
                ErrorManager.redirect(this, es);
            }
        }
예제 #14
0
        private string moveDocInPage(ObjScrollElementsList objScrollElementsList, Page page, ScrollManager.ScrollDirection scrollDirection)
        {
            string script = string.Empty;

            if (SiteNavigation.CallContextStack.CallerContext != null)
            {
                //Verifico in che direzione muovermi
                if (scrollDirection == ScrollManager.ScrollDirection.NEXT)
                {
                    objScrollElementsList.selectedElement++;
                    SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["docIndex"] = objScrollElementsList.selectedElement.ToString();
                }
                if (scrollDirection == ScrollManager.ScrollDirection.PREV)
                {
                    objScrollElementsList.selectedElement--;
                    SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["docIndex"] = objScrollElementsList.selectedElement.ToString();
                }
            }

            if (objScrollElementsList.objList != null)
            {
                InfoDocumento newDoc = null;
                string        tipo   = objScrollElementsList.objList[objScrollElementsList.selectedElement].GetType().Name;

                if (tipo.Equals("SearchObject"))
                {
                    DocsPaWR.SearchObject doc = (DocsPaWR.SearchObject)objScrollElementsList.objList[objScrollElementsList.selectedElement];
                    newDoc = DocumentManager.GetInfoDocumento(doc.SearchObjectID, doc.SearchObjectID, page);
                    if (doc != null)
                    {
                        script = ScrollManager.refreshPage(newDoc, page);
                    }
                }
                else
                {
                    DocsPaWR.InfoDocumento doc = (DocsPaWR.InfoDocumento)objScrollElementsList.objList[objScrollElementsList.selectedElement];
                    newDoc = DocumentManager.GetInfoDocumento(doc.idProfile, doc.idProfile, page);
                    if (doc != null)
                    {
                        script = ScrollManager.refreshPage(newDoc, page);
                    }
                }
            }

            return(script);
        }
예제 #15
0
        protected void gv_dettItemsCons_SelectedIndexChanged(object sender, EventArgs e)
        {
            string errorMessage    = string.Empty;
            int    documentIndex   = this.gv_dettItemsCons.SelectedIndex;
            string idProfile_trasm = ((Label)this.gv_dettItemsCons.Rows[documentIndex].FindControl("lbl_idProfileTrasm")).Text;

            // Impostazione documento correntemente selezionato nel contesto
            this.SetCurrentDocumentIndexOnContext(documentIndex);
            if (!string.IsNullOrEmpty(idProfile_trasm))
            {
                DocsPaWR.SchedaDocumento schedaDoc = DocumentManager.getDettaglioDocumento(this, idProfile_trasm, "");
                DocsPaWR.InfoDocumento   doc       = DocumentManager.getInfoDocumento(schedaDoc);

                if (doc.tipoProto.ToUpper().Equals("R"))
                {
                    Response.Write("<script>alert('Tipologia documento non visualizzabile')</script>");
                }
                else
                {
                    // Verifica se l'utente ha i diritti per accedere al documento
                    int retValue = DocumentManager.verificaACL("D", idProfile_trasm, UserManager.getInfoUtente(), out errorMessage);
                    if (retValue == 0 || retValue == 1)
                    {
                        string script = ("<script>alert('" + errorMessage + "');</script>");
                        Response.Write(script);
                    }
                    else
                    {
                        DocumentManager.setRisultatoRicerca(this, doc);

                        DocumentManager.removeListaDocProt(this);

                        Response.Write("<script>window.open('../documento/gestionedoc.aspx?tab=protocollo','principale'); window.close();</script>");
                    }
                }
            }
            else
            {
                Response.Write("<script>alert('Non esiste alcuna trasmissione associata al documento');</script>");
            }
        }
예제 #16
0
 //Recupera la lista di documenti classificati in un dato fascicolo generale
 private void caricaDataTablesFascicoli(DocsPAWA.DocsPaWR.Fascicolo fascicolo, int numPage, out int nRec, out int numTotPage)
 {
     nRec       = 0;
     numTotPage = 0;
     try
     {
         dataTableProt      = new ArrayList();
         hashListaDocumenti = new Hashtable();
         DocsPaWR.InfoDocumento[] listaDoc = null;
         string anno = "";
         if (Session["anno"] != null)
         {
             anno = Session["anno"].ToString();
         }
         listaDoc = FascicoliManager.getListaDocumentiDaArchiviare(this, fascicolo, numPage, out numTotPage, out nRec, anno);
         this.TotalRecordCount       = nRec;
         this.dgDoc.VirtualItemCount = this.TotalRecordCount;
         if (listaDoc != null)
         {
             if (listaDoc.Length > 0)
             {
                 for (int i = 0; i < listaDoc.Length; i++)
                 {
                     hashListaDocumenti.Add(i, listaDoc[i]);
                     DocsPaWR.InfoDocumento infoDoc = listaDoc[i];
                     CostruisciDataTable(infoDoc);
                 }
             }
         }
         FascicoliManager.setHashDocProtENonProt(this, hashListaDocumenti);
         //impostazione datatable in sessione
         FascicoliManager.setDataTableDocDaArchiv(this, dataTableProt);
     }
     catch (Exception es)
     {
         ErrorManager.redirect(this, es);
     }
 }
예제 #17
0
        private string moveToDoListNotInPage(ObjScrollElementsList objScrollElementsList, Page page, ScrollManager.ScrollDirection scrollDirection)
        {
            string script = string.Empty;

            DocsPAWA.DocsPaWR.Trasmissione[] dettTrasm = null;

            //Recupero i filtri di ricerca ed effettuo la nuova ricerca
            if (SiteNavigation.CallContextStack.CallerContext != null)
            {
                //Verifico in che direzione muovermi
                if (scrollDirection == ScrollManager.ScrollDirection.NEXT)
                {
                    objScrollElementsList.selectedElement = 0;
                    objScrollElementsList.selectedPage++;

                    //Effettuo una nuova ricerca
                    DocsPAWA.DocsPaWR.infoToDoList[] listInfoToDoList = null;
                    int totalTrasmNonViste = 0;
                    if (objScrollElementsList.searchContext == ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_DOC_TO_DO_LIST)
                    {
                        listInfoToDoList =
                            TrasmManager.getMyNewTodolist(getListaRegistri(UserManager.getRuolo().registri),
                                                          DocumentManager.getFiltroRicTrasm(page),
                                                          objScrollElementsList.selectedPage + 1,
                                                          objScrollElementsList.pageSize,
                                                          out objScrollElementsList.totalNumberOfElements,
                                                          out totalTrasmNonViste);
                    }
                    //listInfoToDoList = TrasmManager.getMyTodolist("D", getListaRegistri(UserManager.getRuolo().registri), DocumentManager.getFiltroRicTrasm(page), objScrollElementsList.selectedPage + 1, objScrollElementsList.pageSize, out objScrollElementsList.totalNumberOfElements);))
                    if (objScrollElementsList.searchContext == ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_FASC_TO_DO_LIST)
                    {
                        TrasmManager.getMyNewTodolist(getListaRegistri(UserManager.getRuolo().registri),
                                                      DocumentManager.getFiltroRicTrasm(page),
                                                      objScrollElementsList.selectedPage + 1,
                                                      objScrollElementsList.pageSize,
                                                      out objScrollElementsList.totalNumberOfElements,
                                                      out totalTrasmNonViste);
                    }
                    //listInfoToDoList = TrasmManager.getMyTodolist("F", getListaRegistri(UserManager.getRuolo().registri), DocumentManager.getFiltroRicTrasm(page), objScrollElementsList.selectedPage + 1, objScrollElementsList.pageSize, out objScrollElementsList.totalNumberOfElements);

                    //Il risultato della ricerca potrebbe essere vuoto in quanto le trasmissioni che si stanno scorrendo vengono contestualmente rimosse dalla toDoList
                    if (listInfoToDoList != null && listInfoToDoList.Length != 0)
                    {
                        objScrollElementsList.objList = new ArrayList(listInfoToDoList);

                        //Recupero il dettaglio della trasmissione
                        dettTrasm = TrasmManager.trasmGetDettaglioTrasmissione(UserManager.getUtente(page), UserManager.getRuolo(page), (DocsPAWA.DocsPaWR.infoToDoList)objScrollElementsList.objList[objScrollElementsList.selectedElement]);
                        if (dettTrasm != null)
                        {
                            SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["idTrasm"] = dettTrasm[0].systemId;
                            SiteNavigation.CallContextStack.CallerContext.PageNumber = objScrollElementsList.selectedPage + 1;
                        }
                    }
                    else
                    {
                        if (SiteNavigation.CallContextStack.CallerContext != null)
                        {
                            SiteNavigation.CallContextStack.CallerContext.objScrollElementsList = null;
                        }
                        objScrollElementsList.objList = null;
                    }
                }

                if (scrollDirection == ScrollManager.ScrollDirection.PREV)
                {
                    objScrollElementsList.selectedElement = objScrollElementsList.pageSize - 1;
                    objScrollElementsList.selectedPage--;
                    int totalTrasmNonViste = 0;
                    //Effettuo una nuova ricerca
                    DocsPAWA.DocsPaWR.infoToDoList[] listInfoToDoList = null;
                    if (objScrollElementsList.searchContext == ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_DOC_TO_DO_LIST)
                    {
                        listInfoToDoList =
                            TrasmManager.getMyNewTodolist(getListaRegistri(UserManager.getRuolo().registri),
                                                          DocumentManager.getFiltroRicTrasm(page),
                                                          objScrollElementsList.selectedPage + 1,
                                                          objScrollElementsList.pageSize,
                                                          out objScrollElementsList.totalNumberOfElements,
                                                          out totalTrasmNonViste);
                    }
                    //listInfoToDoList = TrasmManager.getMyTodolist("D", getListaRegistri(UserManager.getRuolo().registri), DocumentManager.getFiltroRicTrasm(page), objScrollElementsList.selectedPage + 1, objScrollElementsList.pageSize, out objScrollElementsList.totalNumberOfElements);
                    if (objScrollElementsList.searchContext == ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_FASC_TO_DO_LIST)
                    {
                        listInfoToDoList =
                            TrasmManager.getMyNewTodolist(getListaRegistri(UserManager.getRuolo().registri),
                                                          DocumentManager.getFiltroRicTrasm(page),
                                                          objScrollElementsList.selectedPage + 1,
                                                          objScrollElementsList.pageSize,
                                                          out objScrollElementsList.totalNumberOfElements,
                                                          out totalTrasmNonViste);
                    }
                    //listInfoToDoList = TrasmManager.getMyTodolist("F", getListaRegistri(UserManager.getRuolo().registri), DocumentManager.getFiltroRicTrasm(page), objScrollElementsList.selectedPage + 1, objScrollElementsList.pageSize, out objScrollElementsList.totalNumberOfElements);

                    //Il risultato della ricerca potrebbe essere vuoto in quanto le trasmissioni che si stanno scorrendo vengono contestualmente rimosse dalla toDoList
                    if (listInfoToDoList != null && listInfoToDoList.Length != 0)
                    {
                        objScrollElementsList.objList = new ArrayList(listInfoToDoList);

                        //Recupero il dettaglio della trasmissione
                        dettTrasm = TrasmManager.trasmGetDettaglioTrasmissione(UserManager.getUtente(page), UserManager.getRuolo(page), (DocsPAWA.DocsPaWR.infoToDoList)objScrollElementsList.objList[objScrollElementsList.selectedElement]);
                        if (dettTrasm != null)
                        {
                            SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["idTrasm"] = dettTrasm[0].systemId;
                            SiteNavigation.CallContextStack.CallerContext.PageNumber = objScrollElementsList.selectedPage + 1;
                        }
                    }
                    else
                    {
                        if (SiteNavigation.CallContextStack.CallerContext != null)
                        {
                            SiteNavigation.CallContextStack.CallerContext.objScrollElementsList = null;
                        }
                        objScrollElementsList.objList = null;
                    }
                }
            }

            if (objScrollElementsList.objList != null)
            {
                //Recupero l'infoDocumento o l'infoFascicolo dal dettaglio della trasmissione
                if (dettTrasm != null && dettTrasm[0].infoDocumento != null && !string.IsNullOrEmpty(dettTrasm[0].infoDocumento.idProfile))
                {
                    DocsPaWR.InfoDocumento doc = dettTrasm[0].infoDocumento;

                    if (doc != null)
                    {
                        script = ScrollManager.refreshPage(doc, page);
                    }
                }

                if (dettTrasm != null && dettTrasm[0].infoFascicolo != null && !string.IsNullOrEmpty(dettTrasm[0].infoFascicolo.idFascicolo))
                {
                    DocsPaWR.InfoFascicolo fasc = dettTrasm[0].infoFascicolo;

                    if (fasc != null)
                    {
                        script = ScrollManager.refreshPage(fasc, page);
                    }
                }
            }

            return(script);
        }
예제 #18
0
        private string moveDocNotInPage(ObjScrollElementsList objScrollElementsList, Page page, ScrollManager.ScrollDirection scrollDirection)
        {
            string script = string.Empty;

            //Recupero le informazioni per effettuare una nuova ricerca
            DocsPAWA.DocsPaWR.SearchObject[] listaDoc = null;
            DocsPaWR.InfoDocumento           doc      = null;

            //Recupero i filtri di ricerca ed effettuo la nuova ricerca
            if (SiteNavigation.CallContextStack.CallerContext != null)
            {
                //Verifico in che direzione muovermi
                if (scrollDirection == ScrollManager.ScrollDirection.NEXT)
                {
                    objScrollElementsList.selectedElement = 0;
                    objScrollElementsList.selectedPage++;
                    SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["docIndex"] = "0";
                    SiteNavigation.CallContextStack.CallerContext.PageNumber = objScrollElementsList.selectedPage + 1;

                    //Effettuo la nuova ricerca
                    listaDoc = searchDoc(objScrollElementsList, page);
                    if (listaDoc != null)
                    {
                        objScrollElementsList.objList = new ArrayList(listaDoc);
                        string tipo = objScrollElementsList.objList[0].GetType().Name;

                        if (tipo.Equals("SearchObject"))
                        {
                            DocsPaWR.SearchObject Newdoc = (DocsPaWR.SearchObject)objScrollElementsList.objList[0];
                            doc = DocumentManager.GetInfoDocumento(Newdoc.SearchObjectID, Newdoc.SearchObjectID, page);
                        }
                        else
                        {
                            doc = (DocsPaWR.InfoDocumento)objScrollElementsList.objList[0];
                        }
                    }
                }

                if (scrollDirection == ScrollManager.ScrollDirection.PREV)
                {
                    objScrollElementsList.selectedElement = objScrollElementsList.pageSize - 1;
                    objScrollElementsList.selectedPage--;
                    SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["docIndex"] = (objScrollElementsList.pageSize - 1).ToString();
                    SiteNavigation.CallContextStack.CallerContext.PageNumber = objScrollElementsList.selectedPage + 1;

                    //Effettuo la nuova ricerca
                    listaDoc = searchDoc(objScrollElementsList, page);
                    if (listaDoc != null)
                    {
                        objScrollElementsList.objList = new ArrayList(listaDoc);
                        string tipo = objScrollElementsList.objList[0].GetType().Name;

                        if (tipo.Equals("SearchObject"))
                        {
                            DocsPaWR.SearchObject Newdoc = (DocsPaWR.SearchObject)objScrollElementsList.objList[objScrollElementsList.pageSize - 1];
                            doc = DocumentManager.GetInfoDocumento(Newdoc.SearchObjectID, Newdoc.SearchObjectID, page);
                        }
                        else
                        {
                            doc = (DocsPaWR.InfoDocumento)objScrollElementsList.objList[objScrollElementsList.pageSize - 1];
                        }
                    }
                }
            }

            if (doc != null)
            {
                script = ScrollManager.refreshPage(doc, page);
            }

            return(script);
        }
예제 #19
0
 /// <summary>
 /// Reperimento degli allegati del documento
 /// </summary>
 /// <param name="schedaDocumento"></param>
 /// <returns></returns>
 public Allegato[] GetAllegatiDocumento(SchedaDocumento schedaDocumento)
 {
     DocsPaWR.InfoDocumento infoDocumento = DocumentManager.getInfoDocumento(schedaDocumento);
     return(this.GetAllegatiDocumento(infoDocumento));
 }
예제 #20
0
        /// <summary>
        /// Paging
        /// </summary>
        /// <param name="folder"></param>
        /// <param name="numPage"></param>
        /// <param name="nRec"></param>
        /// <param name="numTotPage"></param>
        private void caricaDataTablesPaging(DocsPAWA.DocsPaWR.Folder folder,
                                            int numPage,
                                            out int nRec,
                                            out int numTotPage)
        {
            logger.Debug("tabfasclistadoc.aspx_pg.caricaDataTablesPaging");

            nRec       = 0;
            numTotPage = 0;
            try
            {
                dataTableProt = new DataTable();
                //		dataTableNonProt=new DataTable();
                hashListaDocumenti = new Hashtable();

                DocsPaWR.FiltroRicerca[][] filtriRicercaDocumenti = GetFiltriRicercaDocumenti();

                DocsPaWR.InfoDocumento[] listaDoc = null;
                SearchResultInfo[]       idProfileList;
                if (filtriRicercaDocumenti == null)
                {
                    listaDoc = FascicoliManager.getListaDocumentiPaging(this, folder, numPage, out numTotPage, out nRec, false, out idProfileList);
                }
                else
                {
                    listaDoc = FascicoliManager.getListaDocumentiPaging(this, folder, filtriRicercaDocumenti, numPage, out numTotPage, out nRec, false, out idProfileList);
                }

                this.TotalRecordCount         = nRec;
                this.dt_Prot.VirtualItemCount = this.TotalRecordCount;

                if (listaDoc != null)
                {
                    if (listaDoc.Length > 0)
                    {
                        //descrizione documento (prot + data)
                        string descDoc = string.Empty;
                        this.dataSetRFascDoc1.element1.Rows.Clear();
                        for (int i = 0; i < listaDoc.Length; i++)
                        {
                            hashListaDocumenti.Add(i, listaDoc[i]);
                            DocsPaWR.InfoDocumento infoDoc = listaDoc[i];

                            //il campo mittDest è un array list di possibili
                            //mitt/dest lo scorro tutto e concat in una singola string
                            //con separatore ="[spazio]-[spazio]"
                            string MittDest = "";
                            if (infoDoc != null && infoDoc.mittDest != null)
                            {
                                if (infoDoc.mittDest.Length > 0)
                                {
                                    for (int g = 0; g < infoDoc.mittDest.Length; g++)
                                    {
                                        MittDest += infoDoc.mittDest[g] + " - ";
                                    }
                                    MittDest = MittDest.Substring(0, MittDest.Length - 3);
                                }
                            }



                            //data apertura formattata
                            string dataApertura = "";
                            int    numProt      = new Int32();
                            if (infoDoc.dataApertura != null && !infoDoc.dataApertura.Equals(""))
                            {
                                dataApertura = infoDoc.dataApertura.Substring(0, 10);
                            }
                            //setto il registro (prova)
                            //infoDoc.codRegistro = schedaDoc.registro.codice;
                            string tipoProto = string.Empty;


                            // MODIFICATO DA FABIO PER ETICHETTE LETTERE PROTOCOLLI
                            if (infoDoc.tipoProto.Equals("A") || infoDoc.tipoProto.Equals("P") || infoDoc.tipoProto.Equals("I"))
                            {
                                //aggiunge al datatable dei protocollati
                                if (infoDoc.numProt != null && !infoDoc.numProt.Equals(""))
                                {
                                    numProt = Int32.Parse(infoDoc.numProt);
                                    descDoc = numProt + "\n" + dataApertura;
                                    //Protocollo titolario
                                    if (!string.IsNullOrEmpty(infoDoc.protocolloTitolario))
                                    {
                                        descDoc += "<br>---------<br>" + infoDoc.protocolloTitolario.ToString();
                                    }

                                    string nuova_etichetta = getEtichetta(infoDoc.tipoProto);
                                    this.dataSetRFascDoc1.element1.Addelement1Row(descDoc, numProt, dataApertura, infoDoc.segnatura, infoDoc.codRegistro, nuova_etichetta, infoDoc.oggetto, i, MittDest, infoDoc.dataAnnullamento, infoDoc.dataArchiviazione, infoDoc.idProfile, infoDoc.docNumber, infoDoc.acquisitaImmagine, infoDoc.inConservazione, infoDoc.cha_firmato, infoDoc.inADL);
                                }
                                else
                                {
                                    // se documento grigio/pred.
                                    descDoc = infoDoc.docNumber + "\n" + dataApertura;
                                    if (infoDoc.tipoProto != null && infoDoc.tipoProto == "G")
                                    {
                                        tipoProto = "NP";
                                    }
                                    else
                                    {
                                        tipoProto = infoDoc.tipoProto;
                                    }
                                    //Protocollo titolario
                                    if (!string.IsNullOrEmpty(infoDoc.protocolloTitolario))
                                    {
                                        descDoc += "<br>---------<br>" + infoDoc.protocolloTitolario.ToString();
                                    }

                                    string nuova_etichetta = getEtichetta(infoDoc.tipoProto);
                                    this.dataSetRFascDoc1.element1.Addelement1Row(descDoc, new Int32(), dataApertura, "", infoDoc.codRegistro, nuova_etichetta, infoDoc.oggetto, i, MittDest, infoDoc.dataAnnullamento, infoDoc.dataArchiviazione, infoDoc.idProfile, infoDoc.docNumber, infoDoc.acquisitaImmagine, infoDoc.inConservazione, infoDoc.cha_firmato, infoDoc.inADL);
                                }
                            }
                            else
                            {
                                // se documento grigio
                                descDoc = infoDoc.docNumber + "\n" + dataApertura;

                                if (infoDoc.tipoProto != null && infoDoc.tipoProto == "G")
                                {
                                    tipoProto = "NP";
                                }
                                else
                                {
                                    tipoProto = infoDoc.tipoProto;
                                }
                                //Protocollo titolario
                                if (!string.IsNullOrEmpty(infoDoc.protocolloTitolario))
                                {
                                    descDoc += "<br>---------<br>" + infoDoc.protocolloTitolario.ToString();
                                }

                                //aggiunge al datatable dei non protocollati
                                string nuova_etichetta = getEtichetta(infoDoc.tipoProto);
                                this.dataSetRFascDoc1.element1.Addelement1Row(descDoc, Int32.Parse(infoDoc.idProfile), dataApertura, "", "", nuova_etichetta, infoDoc.oggetto, i, "", "", infoDoc.dataArchiviazione, infoDoc.idProfile, infoDoc.docNumber, infoDoc.acquisitaImmagine, infoDoc.inConservazione, infoDoc.cha_firmato, infoDoc.inADL);
                            }
                        }
                    }
                }

                FascicoliManager.setHashDocProtENonProt(this, hashListaDocumenti);

                dataTableProt = dataSetRFascDoc1.Tables[0];

                // impostazione datatable in sessione
                FascicoliManager.setDataTableDocProt(this, dataTableProt);

                //Header protocollo titolario
                DocsPAWA.DocsPaWR.DocsPaWebService wws = new DocsPAWA.DocsPaWR.DocsPaWebService();
                string protocolloTitolario             = wws.isEnableProtocolloTitolario();
                if (!string.IsNullOrEmpty(protocolloTitolario) && !IsPostBack)
                {
                    this.dt_Prot.Columns[0].HeaderText += "<br>---------<br>" + protocolloTitolario;
                }
            }
            catch (Exception es)
            {
                logger.Debug(es.Message + "  tabfasclistadoc.aspx_pg.caricaDataTablesPaging");
                ErrorManager.redirect(this, es);
            }
        }
예제 #21
0
        protected void ImgDelAnswer_Click(object sender, ImageClickEventArgs e)
        {
            try {
                this.getParametersFromSession();
                DocsPaWR.InfoDocumento infoDocSel;

                ImageButton ibtn1    = sender as ImageButton;
                int         rowIndex = Convert.ToInt32(ibtn1.Attributes["RowIndex"]);

                if (rowIndex >= 0)
                {
                    string str_indexSel = this.grdList.Rows[rowIndex].Cells[6].Text;
                    int    indexSel     = Int32.Parse(str_indexSel);
                    this.infoDoc = (DocsPaWR.InfoDocumento[])Session["listaDocInRisp.infoDoc"];

                    if (indexSel > -1)
                    {
                        infoDocSel = (DocsPaWR.InfoDocumento) this.infoDoc[indexSel];
                    }
                    else
                    {
                        infoDocSel = null;
                        return;
                    }

                    //Scollego i documenti
                    bool retValue = DocumentManager.scollegaDocumento(this, infoDocSel.idProfile);

                    if (retValue)
                    {
                        if (this.SelectedPage > 1 && this.grdList.Rows.Count == 1)
                        {
                            this.SelectedPage = this.SelectedPage - 1;
                        }

                        DocsPaWR.InfoDocumento[] newListInfoDocumenti = new DocsPaWR.InfoDocumento[this.infoDoc.Length - 1];

                        if (newListInfoDocumenti.Length == 0)
                        {
                            this.LoadData(true);
                        }
                        else
                        {
                            int index = 0;

                            foreach (DocsPaWR.InfoDocumento infoDocumento in this.infoDoc)
                            {
                                if (infoDocumento.idProfile != infoDocSel.idProfile)
                                {
                                    newListInfoDocumenti[index] = infoDocumento;
                                    index++;
                                }
                            }

                            this.infoDoc = newListInfoDocumenti;
                            Session["listaDocInRisp.infoDoc"] = this.infoDoc;

                            this.BindGrid(this.infoDoc);
                        }

                        this.grdList.SelectedIndex = -1;
                    }
                }
                else
                {
                    string language = UIManager.UserManager.GetUserLanguage();
                    string msg      = "ChainsAnswerNoDocumentSelected";
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');} else {parent.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');}", true);
                }
            }
            catch (System.Exception ex)
            {
                UIManager.AdministrationManager.DiagnosticError(ex);
                return;
            }
        }
예제 #22
0
        private string moveTrasmNotInPage(ObjScrollElementsList objScrollElementsList, Page page, ScrollManager.ScrollDirection scrollDirection)
        {
            string script = string.Empty;

            DocsPAWA.DocsPaWR.Trasmissione[] listaTram = null;
            DocsPAWA.DocsPaWR.Trasmissione   trasm     = null;

            //Recupero i filtri di ricerca ed effettuo la nuova ricerca
            if (SiteNavigation.CallContextStack.CallerContext != null)
            {
                //Verifico in che direzione muovermi
                if (scrollDirection == ScrollManager.ScrollDirection.NEXT)
                {
                    objScrollElementsList.selectedElement = 0;
                    objScrollElementsList.selectedPage++;
                    SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["docIndex"] = "0";
                    SiteNavigation.CallContextStack.CallerContext.PageNumber = objScrollElementsList.selectedPage + 1;

                    //Effettuo una nuova ricerca
                    listaTram = searchTrasm(objScrollElementsList, page);
                    if (listaTram != null)
                    {
                        objScrollElementsList.objList = new ArrayList(listaTram);
                        trasm = (DocsPaWR.Trasmissione)objScrollElementsList.objList[0];
                    }
                }

                if (scrollDirection == ScrollManager.ScrollDirection.PREV)
                {
                    objScrollElementsList.selectedElement = objScrollElementsList.pageSize - 1;
                    objScrollElementsList.selectedPage--;
                    SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["docIndex"] = (objScrollElementsList.pageSize - 1).ToString();
                    SiteNavigation.CallContextStack.CallerContext.PageNumber = objScrollElementsList.selectedPage + 1;

                    //Effettuo una nuova ricerca
                    listaTram = searchTrasm(objScrollElementsList, page);
                    if (listaTram != null)
                    {
                        objScrollElementsList.objList = new ArrayList(listaTram);
                        trasm = (DocsPaWR.Trasmissione)objScrollElementsList.objList[objScrollElementsList.pageSize - 1];
                    }
                }
            }

            if (objScrollElementsList.objList != null)
            {
                //Recupero l'infoDocumento o l'infoFascicolo dal dettaglio della trasmissione
                if (trasm != null && trasm.infoDocumento != null && !string.IsNullOrEmpty(trasm.infoDocumento.idProfile))
                {
                    DocsPaWR.InfoDocumento doc = trasm.infoDocumento;

                    if (doc != null)
                    {
                        script = ScrollManager.refreshPage(doc, page);
                    }
                }

                if (trasm != null && trasm.infoFascicolo != null && !string.IsNullOrEmpty(trasm.infoFascicolo.idFascicolo))
                {
                    DocsPaWR.InfoFascicolo fasc = trasm.infoFascicolo;

                    if (fasc != null)
                    {
                        script = ScrollManager.refreshPage(fasc, page);
                    }
                }
            }

            return(script);
        }
예제 #23
0
        private string CreaContributo(DocsPaWR.Task task)
        {
            string          msg             = string.Empty;
            Templates       templateToMerge = null;
            SchedaDocumento document        = UIManager.DocumentManager.NewSchedaDocumento();

            document.oggetto   = new Oggetto();
            document.tipoProto = "G";
            if (!string.IsNullOrEmpty(task.ID_TIPO_ATTO))
            {
                //Devo aggiungere controlli di visibilità della tipologia
                document.template            = UIManager.DocumentManager.getTemplateById(task.ID_TIPO_ATTO, UserManager.GetInfoUser());
                document.oggetto.descrizione = document.template.DESCRIZIONE + " - ";
                templateToMerge = !string.IsNullOrEmpty(task.ID_PROFILE) ? ProfilerDocManager.getTemplateDettagli(task.ID_PROFILE) : UIManager.ProfilerProjectManager.getTemplateFascDettagli(task.ID_PROJECT);
                if (templateToMerge != null)
                {
                    document.template = MappingTemplates(templateToMerge, document.template);
                }
            }

            if (!string.IsNullOrEmpty(task.ID_PROJECT))
            {
                Fascicolo fascicolo = UIManager.ProjectManager.getFascicoloById(task.ID_PROJECT);
                UIManager.ProjectManager.setProjectInSession(fascicolo);
                if (fascicolo == null || ProjectManager.CheckRevocationAcl())
                {
                    ProjectManager.setProjectInSession(null);
                    msg = "RevocationAclIndex";
                    return(msg);
                }
                document.oggetto.descrizione += fascicolo.descrizione;
                HttpContext.Current.Session["DocumentAnswerFromProject"] = true;
            }
            else
            {
                SchedaDocumento schedaDocDiPartenza = DocumentManager.getDocumentDetails(this, task.ID_PROFILE, task.ID_PROFILE);
                document.oggetto.descrizione += schedaDocDiPartenza.oggetto.descrizione;
                DocsPaWR.InfoDocumento infoDoc = DocumentManager.getInfoDocumento(schedaDocDiPartenza);
                document.rispostaDocumento = infoDoc;
                switch (schedaDocDiPartenza.tipoProto)
                {
                case "A":
                    document.tipoProto  = "P";
                    document.protocollo = new DocsPaWR.ProtocolloUscita();
                    document.registro   = schedaDocDiPartenza.registro;
                    ((DocsPaWR.ProtocolloUscita)document.protocollo).destinatari    = new DocsPaWR.Corrispondente[1];
                    ((DocsPaWR.ProtocolloUscita)document.protocollo).destinatari[0] = new DocsPaWR.Corrispondente();
                    ((DocsPaWR.ProtocolloUscita)document.protocollo).destinatari[0] = ((DocsPaWR.ProtocolloEntrata)schedaDocDiPartenza.protocollo).mittente;
                    if (EnableSenderDefault())
                    {
                        DocsPaWR.Corrispondente corr = RoleManager.GetRoleInSession().uo;
                        ((DocsPaWR.ProtocolloUscita)document.protocollo).mittente = corr;
                    }
                    break;

                case "P":
                    document.tipoProto  = "A";
                    document.protocollo = new DocsPaWR.ProtocolloEntrata();
                    document.registro   = schedaDocDiPartenza.registro;
                    if (EnableSenderDefault())
                    {
                        if (((DocsPaWR.ProtocolloUscita)schedaDocDiPartenza.protocollo).destinatari.Count() > 1)
                        {
                            //this.SchedaDocContributo = document;
                            UIManager.DocumentManager.setSelectedRecord(schedaDocDiPartenza);
                            msg = "AnswerChooseRecipient";
                            return(msg);
                        }
                        else
                        {
                            ((DocsPaWR.ProtocolloEntrata)document.protocollo).mittente = ((DocsPaWR.ProtocolloUscita)schedaDocDiPartenza.protocollo).destinatari[0];
                        }
                    }
                    break;

                case "I":
                    document.tipoProto  = "I";
                    document.protocollo = new DocsPaWR.ProtocolloInterno();
                    document.registro   = schedaDocDiPartenza.registro;
                    if (EnableSenderDefault())
                    {
                        ((DocsPaWR.ProtocolloInterno)document.protocollo).mittente = ((DocsPaWR.ProtocolloInterno)schedaDocDiPartenza.protocollo).mittente;
                    }
                    ((DocsPaWR.ProtocolloInterno)document.protocollo).destinatari = ((DocsPaWR.ProtocolloInterno)schedaDocDiPartenza.protocollo).destinatari;
                    break;
                }
            }
            UIManager.DocumentManager.setSelectedRecord(document);
            return(msg);
        }
예제 #24
0
        protected string drawDescrIntOp(DocsPAWA.DocsPaWR.Corrispondente corr)
        {
            string CoddAOO        = "";
            string CodAmm         = "";
            string dataProt       = "";
            string dataSpedizione = "";
            string Segn           = "";
            string rtn            = "";
            string rtncell        = "";
            //string TipoSpedizione="";
            string tblInit = "<table class='contenitore' align=center width=360px cellpadding='3' cellspacing='1'>";
            // modifica sab string Row1="<TR><TD align='center' class='testo_grigio' colspan='2'><b>Ricevuta di ritorno</b></TD></TR>";
            string Row1 = "<TR><TD align='center' class='testo_grigio' colspan='2'><b>Spedizioni</b></TD></TR>";

            string DestDescr = "";
            string tblFin    = "</table>";

            try
            {
                if (schedaDocumento == null)
                {
                    schedaDocumento = DocumentManager.getDocumentoInLavorazione(this);
                }
                DocsPaWR.InfoDocumento            infoDoc = DocumentManager.getInfoDocumento(schedaDocumento);
                DocsPaWR.ProtocolloDestinatario[] dest    = null;
                if (corr.systemId != null)
                {
                    dest = DocumentManager.getDestinatariInteropAggConferma(this, infoDoc.idProfile, corr);
                }
                if (dest != null)
                {
                    if (dest.Length > 0)
                    {
                        for (int i = 0; i < dest.Length; i++)
                        {
                            CodAmm         = dest[i].codiceAmm;
                            CoddAOO        = dest[i].codiceAOO;
                            dataProt       = dest[i].dataProtocolloDestinatario;
                            Segn           = dest[i].protocolloDestinatario;
                            DestDescr      = dest[i].descrizioneCorr;
                            dataSpedizione = dest[i].dta_spedizione;

                            //TipoSpedizione = dest[i].documentType;

                            // commentato per nuova gestione notifiche - sab
                            //rtncell+=this.addRow("Destinatario",DestDescr);
                            //rtncell+=this.addRow("Cod. Amm",CodAmm);
                            //rtncell+=this.addRow("Cod. AOO",CoddAOO);
                            //rtncell+=this.addRow("Data Protocollo",dataProt);
                            //rtncell+=this.addRow("Num. Protocollo",Segn);
                            // fine - commentato per nuova gestione notificheDocumento

                            //rtncell+=this.addRow("Tipo Spedizione",TipoSpedizione);
                            rtncell += this.addRow("Data Spedizione", dataSpedizione);
                        }
                        if ((dataSpedizione == null) || (dataSpedizione != null && dataSpedizione.Equals(String.Empty)))
                        {
                            lbl_DescIntOp.Visible = false;
                            return("");
                        }
                        else
                        {
                            lbl_DescIntOp.Visible = true;
                            return(rtn = tblInit + Row1 + rtncell + tblFin);
                        }
                    }
                    else
                    {
                        lbl_DescIntOp.Visible = false;
                        return("");
                    }
                }

                else
                {
                    return("");
                }
            }
            catch (Exception ex)
            {
                ErrorManager.redirectToErrorPage(this, ex);
                return("");
            }
        }
예제 #25
0
        private void CostruisciDataTable(DocsPaWR.InfoDocumento infoDoc)
        {
            string descDoc = string.Empty;

            //il campo mittDest è un array list di possibili
            //mitt/dest lo scorro tutto e concat in una singola string
            //con separatore ="[spazio]-[spazio]"
            string MittDest = "";

            if (infoDoc != null && infoDoc.mittDest != null)
            {
                if (infoDoc.mittDest.Length > 0)
                {
                    for (int g = 0; g < infoDoc.mittDest.Length; g++)
                    {
                        MittDest += infoDoc.mittDest[g] + " - ";
                    }
                    MittDest = MittDest.Substring(0, MittDest.Length - 3);
                }
            }
            //data apertura formattata
            string dataApertura = "";
            int    numProt      = new Int32();

            if (infoDoc.dataApertura != null && !infoDoc.dataApertura.Equals(""))
            {
                dataApertura = infoDoc.dataApertura.Substring(0, 10);
            }
            //setto il registro (prova)
            //infoDoc.codRegistro = schedaDoc.registro.codice;
            string tipoProto = string.Empty;

            if (infoDoc.tipoProto.Equals("A") || infoDoc.tipoProto.Equals("P") || infoDoc.tipoProto.Equals("I"))
            {
                //aggiunge al datatable dei protocollati
                if (infoDoc.numProt != null && !infoDoc.numProt.Equals(""))
                {
                    numProt = Int32.Parse(infoDoc.numProt);
                    descDoc = numProt + "\n" + dataApertura;
                    dataTableProt.Add(new Cols(descDoc, numProt, dataApertura, infoDoc.segnatura, infoDoc.codRegistro, infoDoc.tipoProto, infoDoc.oggetto, MittDest, infoDoc.dataAnnullamento, infoDoc.idProfile, infoDoc.docNumber, infoDoc.acquisitaImmagine, infoDoc.numSerie));
                }
                else
                {
                    // se documento grigio/pred.
                    descDoc = infoDoc.docNumber + "\n" + dataApertura;
                    if (infoDoc.tipoProto != null && infoDoc.tipoProto == "G")
                    {
                        tipoProto = "NP";
                    }
                    else
                    {
                        tipoProto = infoDoc.tipoProto;
                    }
                    dataTableProt.Add(new Cols(descDoc, new Int32(), dataApertura, "", infoDoc.codRegistro, tipoProto, infoDoc.oggetto, MittDest, infoDoc.dataAnnullamento, infoDoc.idProfile, infoDoc.docNumber, infoDoc.acquisitaImmagine, infoDoc.numSerie));
                }
            }
            else
            {
                // se documento grigio
                descDoc = infoDoc.docNumber + "\n" + dataApertura;

                if (infoDoc.tipoProto != null && infoDoc.tipoProto == "G")
                {
                    tipoProto = "NP";
                }
                else
                {
                    tipoProto = infoDoc.tipoProto;
                }
                dataTableProt.Add(new Cols(descDoc, Int32.Parse(infoDoc.idProfile), dataApertura, "", "", tipoProto, infoDoc.oggetto, "", "", infoDoc.idProfile, infoDoc.docNumber, infoDoc.acquisitaImmagine, infoDoc.numSerie));
            }
        }
예제 #26
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            // Pagina a cui redirigere il contenuto del frame principale
            string newURL = "GestioneRuolo.aspx";

            this.superiore.NavigateTo = "testata320.aspx";
            this.inferiore.NavigateTo = "bottom.aspx";

            string tipoOggetto = Request.QueryString["tipoOggetto"];
            string idOggetto   = Request.QueryString["idObj"];

            if (tipoOggetto != null && idOggetto != null)
            {
                DocsPaWR.InfoDocumento infoDoc = DocumentManager.getRisultatoRicerca(this);

                if (infoDoc != null)
                {
                    string nomeTab;
                    if (infoDoc.numProt != null && infoDoc.numProt.Length > 0)
                    {
                        nomeTab = "protocollo";
                    }
                    else
                    {
                        nomeTab = "profilo";
                    }

                    this.principale.NavigateTo = "documento/gestionedoc.aspx?tab" + nomeTab;
                }
            }

            #region Gestione VisualizzaOggetto

            // Tab a cui redirigere la richiesta, tipo di oggetto da visualizzare
            string tab, objType;

            tab     = Request["tab"];
            objType = Request["objType"];

            // Se sono stati reperiti i dati dalla query string...
            if (!String.IsNullOrEmpty(tab) &&
                !String.IsNullOrEmpty(objType))
            {
                // ...visualizzazione dell'oggetto specificato
                switch (objType)
                {
                case "D":
                    if (DocumentManager.getRisultatoRicerca(this) != null)
                    {
                        newURL = String.Format("{0}/documento/gestioneDoc.aspx?tab={1}",
                                               Utils.getHttpFullPath(),
                                               tab);
                    }
                    else
                    {
                        ClientScript.RegisterClientScriptBlock(
                            this.GetType(),
                            "Alert",
                            "alert('Non è stato possibile reperire le informazioni sul documento da visualizzare.');",
                            true);
                    }
                    break;

                case "F":
                    if (FascicoliManager.getFascicoloSelezionato(this) != null)
                    {
                        newURL = String.Format("{0}/fascicolo/gestioneFasc.aspx?tab=documenti",
                                               Utils.getHttpFullPath());
                    }
                    else
                    {
                        ClientScript.RegisterClientScriptBlock(
                            this.GetType(),
                            "Alert",
                            "alert('Non è stato possibile reperire le informazioni sul fascicolo da visualizzare.');",
                            true);
                    }
                    break;
                }
            }

            #endregion

            // Impostazione dell'url di redirezionamento per il frame principale
            this.principale.NavigateTo = newURL;

            //controllo che sia attivo il disservizio
            if (!IsPostBack)
            {
                string valoreChiave;
                valoreChiave = DocsPAWA.utils.InitConfigurationKeys.GetValue("0", "FE_GESTIONE_DISSERVIZIO");
                if (!string.IsNullOrEmpty(valoreChiave) && valoreChiave.Equals("1"))
                {
                    DocsPAWA.DocsPaWR.DocsPaWebService wws = new DocsPAWA.DocsPaWR.DocsPaWebService();
                    DocsPaWR.Utente utente = (DocsPAWA.DocsPaWR.Utente) this.Session["userData"];
                    DocsPAWA.DocsPaWR.Disservizio disservizio = wws.getInfoDisservizio();
                    //Se attivo faccio la redirect alla pagina di cortesia.
                    if (disservizio != null && !string.IsNullOrEmpty(disservizio.stato) && disservizio.stato.ToUpper().Equals("ATTIVO"))
                    {
                        Response.Redirect("disservizio.aspx");
                    }
                }
            }
        }
예제 #27
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="infoDocumento"></param>
 /// <returns></returns>
 protected string GetDescrizione(DocsPaWR.InfoDocumento infoDocumento)
 {
     return(string.Format("{0}<BR />{1}", infoDocumento.docNumber, infoDocumento.dataApertura));
 }
예제 #28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Convert.ToString(Session["PrintTransm"]) == "D")
            {
                if (!IsPostBack && !DocumentManager.CheckRevocationAcl())
                {
                    try
                    {
                        DocsPaWR.InfoDocumento            infoDoc      = DocumentManager.getInfoDocumento(DocumentManager.getSelectedRecord());
                        DocsPaWR.TrasmissioneOggettoTrasm oggettoTrasm = new DocsPaWR.TrasmissioneOggettoTrasm();
                        oggettoTrasm.infoDocumento = infoDoc;
                        DocsPaWR.FileDocumento fileRep = TrasmManager.getReportTrasm(this, oggettoTrasm);
                        if (fileRep == null)
                        {
                            return;
                        }

                        Response.ContentType = fileRep.contentType;
                        Response.AddHeader("content-disposition", "inline;filename=" + fileRep.name);
                        Response.AddHeader("content-lenght", fileRep.content.Length.ToString());
                        Response.BinaryWrite(fileRep.content);
                        Response.Flush();
                        //Response.Close();
                        //Response.End();
                    }
                    catch (System.Exception ex)
                    {
                        UIManager.AdministrationManager.DiagnosticError(ex);
                    }
                }
            }

            if (Convert.ToString(Session["PrintTransm"]) == "F")
            {
                if (!IsPostBack && !ProjectManager.CheckRevocationAcl())
                {
                    try
                    {
                        InfoFascicolo infoFasc = ProjectManager.getInfoFascicoloDaFascicolo(ProjectManager.getProjectInSession());
                        DocsPaWR.TrasmissioneOggettoTrasm oggettoTrasm = new DocsPaWR.TrasmissioneOggettoTrasm();

                        oggettoTrasm.infoFascicolo = infoFasc;

                        DocsPaWR.FileDocumento fileRep = TrasmManager.getReportTrasm(this, oggettoTrasm);
                        if (fileRep == null)
                        {
                            return;
                        }

                        Response.ContentType = fileRep.contentType;
                        Response.AddHeader("content-disposition", "inline;filename=" + fileRep.name);
                        Response.AddHeader("content-lenght", fileRep.content.Length.ToString());
                        Response.BinaryWrite(fileRep.content);
                        Response.Flush();
                        //Response.Close();
                        //Response.End();
                    }
                    catch (System.Exception ex)
                    {
                        UIManager.AdministrationManager.DiagnosticError(ex);
                    }
                }
            }
            if (Session["PrintTransm"] == null)
            {
                string id = Session.SessionID;
                DocsPaWR.FileDocumento theDoc = FileManager.getInstance(id).getReport(this);

                Response.ContentType = theDoc.contentType;
                Response.AddHeader("content-disposition", "inline;filename=" + theDoc.name);
                Response.AddHeader("content-lenght", theDoc.content.Length.ToString());
                Response.BinaryWrite(theDoc.content);
                //Response.Flush();
                //Response.Close();
                //Response.End();
            }
        }
예제 #29
0
        private void ricercaOggetto()
        {
            string msg;

            if (idDoc != null)
            {
                //Ricerca del documento per DOCNUMBER
                //array contenitore degli array filtro di ricerca
                qV    = new DocsPAWA.DocsPaWR.FiltroRicerca[1][];
                qV[0] = new DocsPAWA.DocsPaWR.FiltroRicerca[1];

                fVList = new DocsPAWA.DocsPaWR.FiltroRicerca[0];

                // filtro DOCNUMBER
                fV1           = new DocsPAWA.DocsPaWR.FiltroRicerca();
                fV1.argomento = DocsPaWR.FiltriDocumento.DOCNUMBER.ToString();
                fV1.valore    = idDoc;
                fVList        = Utils.addToArrayFiltroRicerca(fVList, fV1);

                // filtro TIPODOC
                fV1           = new DocsPAWA.DocsPaWR.FiltroRicerca();
                fV1.argomento = DocsPaWR.FiltriDocumento.TIPO.ToString();
                fV1.valore    = tipoProto;
                fVList        = Utils.addToArrayFiltroRicerca(fVList, fV1);

                qV[0] = fVList;

                Safe     = new DocsPAWA.DocsPaWR.InfoUtente();
                Safe     = UserManager.getInfoUtente(this);
                ListaDoc = DocumentManager.getQueryInfoDocumento(Safe.idGruppo, Safe.idPeople, this, qV);
                if (ListaDoc != null && ListaDoc.Length > 0)
                {
                    DocumentManager.setRisultatoRicerca(this, (DocsPAWA.DocsPaWR.InfoDocumento)ListaDoc[0]);
                    Session["tabRicDoc.InfoDoc"] = (DocsPAWA.DocsPaWR.InfoDocumento)ListaDoc[0];
                    DocsPaWR.InfoDocumento inf = (DocsPAWA.DocsPaWR.InfoDocumento)ListaDoc[0];
                    #region commento
                    //					switch(inf.tipoProto.ToUpper())
                    //					{
                    //						case "A":
                    //							tab="protocollo";
                    //							break;
                    //						case "P":
                    //							tab="protocollo";
                    //							break;
                    //						case "G":
                    //							tab="profilo";
                    //							break;
                    //					}
                    //					//si passa alla pagina gestioneDoc.aspx
                    //					string newUrl=Utils.getHttpFullPath(this)+"/"+"documento/gestioneDoc.aspx?tab="+tab;
                    //					string	scriptString="<script language='javascript'>var wnd=window.open('"+newUrl+"','principale','fullscreen=no,toolbar=no,directories=no,statusbar=no,menubar=no,resizable=yes, scrollbars=auto');if(wnd!=self) {window.opener=null;window.close();}</script>";
                    //					if(!this.IsClientScriptBlockRegistered("clientScript"))
                    //						this.RegisterClientScriptBlock("clientScript", scriptString);
                    #endregion
                    string newUrl       = Utils.getHttpFullPath(this) + "/" + "index.aspx" + "?tipoOggetto=" + tipoProto + "&idObj=" + idDoc + "&from=portal";
                    string scriptString = "<script language='javascript'> var wnd=window.open('" + newUrl + "','Index','fullscreen=no,toolbar=no,directories=no,statusbar=no,menubar=no,resizable=yes, scrollbars=auto');wnd.moveTo(0,0);";
                    scriptString += " wnd.resizeTo(screen.availWidth,screen.availHeight);wnd.focus();if(wnd!=self) {window.opener = null; window.close();}</script>";
                    Response.Write(scriptString);
                }
                else
                {
                    //il doc non è visibile nè ai ruoli dell'utente nè all'utente stesso
                    msg = "Questo utente non ha visibilità sul documento richiesto";
                    Response.Write("<script>alert('" + msg + "');window.parent.close();</script>");
                }
            }
            else
            {
                msg = "Dati insufficienti per effettuare la ricerca";
                Response.Write("<script>alert('" + msg + "');window.parent.close();</script>");
            }
        }
예제 #30
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            //controlla se session Id è not null
            Utils.startUp(this);
            try
            {
                Response.Expires = 0;
                string tab       = Request.QueryString["tab"];
                string isNew     = Request.QueryString["isNew"];
                string daCestino = Request.QueryString["daCestino"];
                //se arrivo dalla popup rimozione documento il javascript su librerie
                // ApriFinestraRimuoviProfilo setta questo parametro a 'Y' che viene utilizzato nel metodo setContext

                if (isNew == null)
                {
                    isNew = "0";
                }

                if (tab.Equals("protocollo"))
                {
                    Session["Bookmark"] = "NuovoProt";
                }
                if (tab.Equals("profilo"))
                {
                    Session["Bookmark"] = "NuovoDoc";
                }


                // Impostazione contesto corrente
                this.SetContext(ref tab, isNew);

                //inserito per schianto nuovo protocollo dopo ricerca
                //DocumentManager.removeDocumentoSelezionato(this);
                DocsPaWR.InfoDocumento infoDoc = DocumentManager.getRisultatoRicerca(this);

                // Se il query string contiene from valorizzato come newRicDoc, viene creato un
                // nuovo info documento con id profile pari al valore assunto da idProfile del querystring
                // e tipoProto con il valore assunto da protoType del querystring e si redireziona la pagina
                // di sinistra alla pagina documento/gestionedoc.aspx?tab=protocollo
                if (!String.IsNullOrEmpty(Request["from"]) &&
                    Request["from"].Equals("newRicDoc"))
                {
                    DocumentManager.setRisultatoRicerca(this, new DocsPaWR.InfoDocumento()
                    {
                        idProfile = Request["idProfile"],
                        tipoProto = Request["protoType"]
                    });

                    // Salvataggio dell'id del documento selezionato. Questa informazione viene utilizzata
                    // quando si torna sulla pagina dei risultati attraverso il pulsante "Indietro"
                    SearchUtils.SetObjectId(Request["idProfile"]);

                    //                   ClientScript.RegisterStartupScript(this.GetType(), "PR", "top.principale.document.location ='" + Utils.getHttpFullPath() + "/documento/gestionedoc.aspx?tab=profilo';", true);
                    ClientScript.RegisterStartupScript(this.GetType(), "PR", "top.principale.document.location ='../documento/gestionedoc.aspx?tab=profilo';", true);

                    return;
                }



                if (infoDoc != null && (infoDoc.idProfile != null || infoDoc.docNumber != null))
                {
                    if (daCestino != null && daCestino.Equals("1"))
                    {
                        DocumentManager.setDocumentoSelezionato(this, DocumentManager.getDettaglioDocumentoDaCestino(this, infoDoc.idProfile, infoDoc.docNumber));
                    }
                    else
                    {
                        DocsPaWR.SchedaDocumento schedaDoc = DocumentManager.getDettaglioDocumento(this, infoDoc.idProfile, infoDoc.docNumber);
                        if (infoDoc.inArchivio != "0")
                        {
                            schedaDoc.inArchivio = infoDoc.inArchivio;
                        }
                        DocumentManager.setDocumentoSelezionato(this, schedaDoc);
                        //DocumentManager.setDocumentoSelezionato(this, DocumentManager.getDettaglioDocumento(this, infoDoc.idProfile, infoDoc.docNumber));
                    }
                    // Problemi lo pulisce il tasto del menu:
                    DocumentManager.removeRisultatoRicerca(this);
                    DocumentManager.removeFiltroRicDoc(this);
                    if ((infoDoc.tipoProto.Equals("G"))
                        //modifica del 15/05/2009
                        || (infoDoc.tipoProto.Equals("R")) ||
                        (infoDoc.tipoProto.Equals("C"))
                        //fine modifica del 15/05/2009
                        )
                    {
                        tab = "Profilo";
                    }
                    else
                    {
                        tab = "Protocollo";
                    }
                }
                this.iFrame_sx.NavigateTo = "tabGestioneDoc.aspx?tab=" + tab + "&isNew=" + isNew;


                if (!tab.Equals("trasmissioni"))
                {
                    this.iFrame_dx.NavigateTo = "tabDoc.aspx";
                }
                else
                {
                    this.iFrame_dx.NavigateTo = "tabTrasmissioniEff.aspx";
                }
            }
            catch (System.Exception ex)
            {
                ErrorManager.redirect(this, ex);
            }
        }