public static bool SalvaModificaStatoStartSignatureProcess(ProcessoFirma process, FileRequest fileReq, string note, OpzioniNotifica opzioniNotifiche,
                                                                   string idStato, DiagrammaStato diagramma, string dataScadenza, Page page,
                                                                   out DocsPaWR.ResultProcessoFirma resultAvvioProcesso)
        {
            bool result = false;

            resultAvvioProcesso = ResultProcessoFirma.OK;
            try
            {
                result = docsPaWS.SalvaModificaStatoStartSignatureProcess(process, fileReq, UserManager.GetInfoUser(),
                                                                          LibroFirmaManager.Modalita.AUTOMATICA, note, opzioniNotifiche,
                                                                          idStato, diagramma, dataScadenza,
                                                                          out resultAvvioProcesso);

                if (result)
                {
                    CompletaCambioStatoDocumento(page);
                }
            }
            catch (Exception e)
            {
                result = false;
            }
            return(result);
        }
Esempio n. 2
0
        public static void salvaModificaStato(string docNumber, string idStato, DiagrammaStato diagramma, string idUtente, InfoUtente user, string dataScadenza, Page page)
        {
            try
            {
                docsPaWS.salvaModificaStato(docNumber, idStato, diagramma, idUtente, user, dataScadenza);

                SchedaDocumento docSel = DocumentManager.getSelectedRecord();

                //Controllo che lo stato sia uno stato di conversione pdf lato server
                //In caso affermativo faccio partire la conversione
                if (utils.isEnableConversionePdfLatoServer() == "true" &&
                    docSel != null && docSel.documenti != null && !String.IsNullOrEmpty(docSel.documenti[0].fileName))
                {
                    DocsPaWR.Stato statoAttuale = DiagrammiManager.GetStateDocument(docNumber);
                    if (statoAttuale != null && statoAttuale.CONVERSIONE_PDF)
                    {
                        FileManager            fileManager   = new FileManager();
                        DocsPaWR.FileDocumento fileDocumento = fileManager.getFile(page);
                        if (fileDocumento != null && fileDocumento.content != null && fileDocumento.name != null && fileDocumento.name != "")
                        {
                            FileManager.EnqueueServerPdfConversion(UserManager.GetInfoUser(), fileDocumento.content, fileDocumento.name, DocumentManager.getSelectedRecord());
                        }
                    }
                }
            }
            catch (System.Exception ex)
            {
                UIManager.AdministrationManager.DiagnosticError(ex);
            }
        }
Esempio n. 3
0
 public static void salvaModificaStatoFasc(string idProject, string idStato, DiagrammaStato diagramma, string idUtente, InfoUtente user, string dataScadenza)
 {
     try
     {
         docsPaWS.salvaModificaStatoFasc(idProject, idStato, diagramma, idUtente, user, dataScadenza);
     }
     catch (System.Exception ex)
     {
         UIManager.AdministrationManager.DiagnosticError(ex);
     }
 }
Esempio n. 4
0
 public static void updateDiagramma(DiagrammaStato dg, Page page)
 {
     try
     {
         docsPaWS.updateDiagramma(dg);
     }
     catch (Exception ex)
     {
         ErrorManager.redirect(page, ex);
     }
 }
Esempio n. 5
0
 public static void salvaModificaStatoFasc(string idProject, string idStato, DiagrammaStato diagramma, string idUtente, InfoUtente user, string dataScadenza, Page page)
 {
     try
     {
         docsPaWS.salvaModificaStatoFasc(idProject, idStato, diagramma, idUtente, user, dataScadenza);
     }
     catch (Exception ex)
     {
         ErrorManager.redirect(page, ex);
     }
 }
Esempio n. 6
0
 public static void salvaDiagramma(DiagrammaStato dg, string idAmm, Page page)
 {
     try
     {
         docsPaWS.salvaDiagramma(dg, idAmm);
     }
     catch (Exception ex)
     {
         ErrorManager.redirect(page, ex);
     }
 }
Esempio n. 7
0
 public static DiagrammaStato getDgByIdTipoDoc(string systemIdTipoDoc, string idAmm)
 {
     try
     {
         DiagrammaStato dg = docsPaWS.getDgByIdTipoDoc(systemIdTipoDoc, idAmm);
         //verifico che il ruolo abbia visibilità sul diagramma
         if (dg != null && (!string.IsNullOrEmpty(dg.SYSTEM_ID.ToString())) &&
             (!DiagrammiManager.IsAssociatoRuoloDiagramma(dg.SYSTEM_ID.ToString(), RoleManager.GetRoleInSession().idGruppo)))
         {
             dg = null;
         }
         return(dg);
     }
     catch (System.Exception ex)
     {
         UIManager.AdministrationManager.DiagnosticError(ex);
         return(null);
     }
 }
Esempio n. 8
0
 public static DiagrammaStato getDgByIdTipoDoc(string systemIdTipoDoc, string idAmm, Page page)
 {
     try
     {
         DiagrammaStato dg = docsPaWS.getDgByIdTipoDoc(systemIdTipoDoc, idAmm);
         //verifico che il ruolo abbia visibilità sul diagramma
         if (dg != null && (!string.IsNullOrEmpty(dg.SYSTEM_ID.ToString())) &&
             (!DiagrammiManager.IsAssociatoRuoloDiagramma(dg.SYSTEM_ID.ToString(), UserManager.getRuolo().idGruppo)))
         {
             dg = null;
         }
         return(dg);
     }
     catch (Exception ex)
     {
         ErrorManager.redirect(page, ex);
         return(null);
     }
 }
Esempio n. 9
0
 protected void ChangeTypeDocument(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(ddl_type_documents.SelectedValue))
     {
         TemplateLite template = this.Template[ddl_type_documents.SelectedValue];
         if (!string.IsNullOrEmpty(template.idDiagram))
         {
             DiagrammaStato diagramma = WsInstance.getDiagrammaById(template.idDiagram);
             if (diagramma != null && diagramma.STATI.Length > 0)
             {
                 ddl_state_document.Items.Clear();
                 ddl_state_document.Items.Add("");
                 ddl_state_document.Enabled = true;
                 for (int i = 0; i < diagramma.STATI.Length; i++)
                 {
                     ddl_state_document.Items.Add(diagramma.STATI[i].DESCRIZIONE);
                     ddl_state_document.Items[i + 1].Value = (diagramma.STATI[i].SYSTEM_ID).ToString();
                 }
             }
             else
             {
                 ddl_state_document.Items.Clear();
                 ddl_state_document.Enabled = false;
             }
         }
         else
         {
             ddl_state_document.Items.Clear();
             ddl_state_document.Enabled = false;
         }
         this.btnCampiProfilati.OnClientClick = String.Format("OpenCampiProfilati('" + ddl_type_documents.SelectedValue + "');");
         this.btnCampiProfilati.Enabled       = true;
         this.TemplateProf = null;
     }
     else
     {
         ddl_state_document.Items.Clear();
         ddl_state_document.Enabled     = false;
         this.btnCampiProfilati.Enabled = false;
     }
     this.upStateTypeDocument.Update();
 }
Esempio n. 10
0
        public static void salvaModificaStato(string docNumber, string idStato, DiagrammaStato diagramma, string idUtente, InfoUtente user, string dataScadenza, Page page)
        {
            try
            {
                docsPaWS.salvaModificaStato(docNumber, idStato, diagramma, idUtente, user, dataScadenza);

                SchedaDocumento docSel = DocumentManager.getDocumentoSelezionato();
                if (docSel == null)
                {
                    docSel = DocumentManager.getDocumentoInLavorazione();
                }

                //Controllo che lo stato sia uno stato di conversione pdf lato server
                //In caso affermativo faccio partire la conversione
                if (DocsPAWA.Utils.isEnableConversionePdfLatoServer() == "true" &&
                    docSel != null && docSel.documenti != null && !String.IsNullOrEmpty(docSel.documenti[0].fileName))
                {
                    DocsPAWA.DocsPaWR.Stato statoAttuale = DiagrammiManager.getStatoDoc(docNumber, page);
                    if (statoAttuale.CONVERSIONE_PDF)
                    {
                        //if (schedaDocumento != null)
                        //{
                        FileManager            fileManager   = new FileManager();
                        DocsPaWR.FileDocumento fileDocumento = fileManager.getFile(page);
                        if (fileDocumento != null && fileDocumento.content != null && fileDocumento.name != null && fileDocumento.name != "")
                        {
                            FileManager.EnqueueServerPdfConversion(page, UserManager.getInfoUtente(page), fileDocumento.content, fileDocumento.name, DocumentManager.getDocumentoInLavorazione(page));
                        }
                        //}
                    }
                }
            }
            catch (Exception ex)
            {
                ErrorManager.redirect(page, ex);
            }
        }
Esempio n. 11
0
 protected void updateStateDiagram()
 {
     if (!string.IsNullOrEmpty(ddl_type_documents.SelectedValue))
     {
         TemplateLite template = this.Template[ddl_type_documents.SelectedValue];
         if (!string.IsNullOrEmpty(template.idDiagram))
         {
             DiagrammaStato diagramma = WsInstance.getDiagrammaById(template.idDiagram);
             if (diagramma != null && diagramma.STATI.Length > 0)
             {
                 ddl_state_document.Items.Clear();
                 ddl_state_document.Items.Add("");
                 ddl_state_document.Enabled = true;
                 for (int i = 0; i < diagramma.STATI.Length; i++)
                 {
                     ddl_state_document.Items.Add(diagramma.STATI[i].DESCRIZIONE);
                     ddl_state_document.Items[i + 1].Value = (diagramma.STATI[i].SYSTEM_ID).ToString();
                 }
             }
             else
             {
                 ddl_state_document.Items.Clear();
                 ddl_state_document.Enabled = false;
             }
         }
         else
         {
             ddl_state_document.Items.Clear();
             ddl_state_document.Enabled = false;
         }
     }
     else
     {
         ddl_state_document.Items.Clear();
         ddl_state_document.Enabled = false;
     }
 }