Ejemplo n.º 1
0
        private void btn_casellaIstituzionale_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            DocsPaWR.Registro registro = GestManager.getRegistroSel(this);
            if (registro != null)
            {
                if (registro.Sospeso)
                {
                    RegisterClientScriptBlock("alertRegistroSospeso", "alert('Il registro selezionato è sospeso!');");
                    return;
                }
                string pageBackGroundService = "chkCasellaIst.aspx";
                string request = pageBackGroundService;
                //string wndArgument="height=100,width=100,left=0,top=0";
                string scriptName = "startService";
                string scriptBody = "<script language=jscript>";
                scriptBody += "function startService(){";
                scriptBody += "alert('Inizio della verifica casella istituzionale\\n\\nATTENZIONE!\\nQuesta operazione potrebbe richiedere anche alcuni minuti.');";
                //width=420,height=150,toolbar=no,directories=no,menubar=no,resizable=yes,scrollbars=no');";
                scriptBody += "wnd=window.open('" + request + "','','width=420,height=150,toolbar=no,directories=no,menubar=no,resizable=yes,scrollbars=no');";
                //scriptBody+="wnd=window.showModelessDialog('"+request+"','"+wndArgument+"');";
                scriptBody += "wnd.focus();";
                //scriptBody+="alert('istitutional mailbox checking is started');";
                scriptBody += "}";
                scriptBody += "</script>";
                Page.RegisterClientScriptBlock(scriptName, scriptBody);

                string callingScriptName = "call" + scriptName;
                string callingScriptBody = "";
                callingScriptBody += "<script language=jscript>";
                callingScriptBody += "startService();";
                callingScriptBody += "</script>";
                Page.RegisterStartupScript(callingScriptName, callingScriptBody);
            }
        }
Ejemplo n.º 2
0
        private void btn_ok_Click(object sender, System.EventArgs e)
        {
            if (registro != null)
            {
                if (tipoGest.Equals("M"))
                {
                    registro.descrizione = this.txtDescrizione.Text;
                    registro.email       = this.txtEmail.Text;
                    if (!this.txtProssimoProtocollo.Text.Equals(""))
                    {
                        registro.ultimoNumeroProtocollo = this.txtProssimoProtocollo.Text;
                    }

                    GestManager.modificaRegistro(this, registro);
                }
                else
                {
                    registro.descrizione        = this.txtDescrizione.Text;
                    registro.dataApertura       = this.txtDataApertura.Text;
                    registro.dataChiusura       = this.txtDataChiusura.Text;
                    registro.codAmministrazione = UserManager.getInfoUtente(this).idAmministrazione;                    //ConfigurationManager.AppSettings["ID_AMMINISTRAZIONE"];
                    //richiama il metodo che crea il nuovo registro
                }

                //richiama la funzione javascript che aggiorna il form chiamante
                string funct = " window.open('../gestione/registro/regElenco.aspx','iFrame_elenco'); window.open('../gestione/registro/regDettagli.aspx','iFrame_dettagli'); ";
                funct = funct + " window.close(); ";
                Response.Write("<script> " + funct + "</script>");
            }
        }
Ejemplo n.º 3
0
 private void btn_stampaRegistro_Click(object sender, System.Web.UI.ImageClickEventArgs e)
 {
     try
     {
         DocsPaWR.InfoUtente           infoUt   = UserManager.getInfoUtente(this);
         DocsPaWR.InfoDocumento        infoDoc  = new DocsPAWA.DocsPaWR.InfoDocumento();
         DocsPaWR.Registro             registro = GestManager.getRegistroSel(this);
         DocsPaWR.Ruolo                ruolo    = UserManager.getRuolo(this);
         DocsPaWR.StampaRegistroResult StpRegRS = GestManager.StampaRegistro(this, infoUt, ruolo, registro);
         if (StpRegRS != null && StpRegRS.errore != null && StpRegRS.errore != "")
         {
             string errore = StpRegRS.errore;
             errore = errore.Replace("'", "\\'");
             string l_script = "<script language=javascript>alert('" + errore + "');</script>";
             if (!this.IsStartupScriptRegistered("startup"))
             {
                 this.RegisterStartupScript("startup", l_script);
             }
         }
         else
         {
             infoDoc.docNumber = StpRegRS.docNumber;
             DocsPaWR.SchedaDocumento schedaDoc = new DocsPAWA.DocsPaWR.SchedaDocumento();
             schedaDoc = DocumentManager.getDettaglioDocumento(this, infoDoc.idProfile, infoDoc.docNumber);
             FileManager.setSelectedFileReg(this, schedaDoc.documenti[0], "../../popup");
             string sval = @"../../popup/ModalVisualStampaReg.aspx?id=" + this.Session.SessionID;
             RegisterStartupScript("ApriModale", "<script>OpenMyDialog('" + sval + "');</script>");
         }
         Response.Write("<script>parent.iFrame_dettagli.location='regDettagli.aspx';</script>");
     }
     catch (Exception ex)
     {
         ErrorManager.redirectToErrorPage(this, ex);
     }
 }
Ejemplo n.º 4
0
        private void btn_cambiaStatoReg_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            DocsPAWA.DocsPaWR.Registro registro = null;
            if (this.DataGrid2.Items.Count > 0)
            {
                string idReg = ((Label)this.DataGrid2.SelectedItem.Cells[5].Controls[1]).Text;
                registro = GestManager.getRegistroById(this.Page, idReg);
            }
            if (registro == null)
            {
                RegisterStartupScript("alertRegistroMancante", "<script language=javascript>alert('Selezionare un registro!');</script>");
                return;
            }

            if (registro != null && registro.Sospeso)
            {
                RegisterStartupScript("alertRegistroSospeso", "<script language=javascript>alert('Attenzione! Lo stato del registro non può essere modificato perchè risulta essere sospeso!');</script>");
                //this.DataGrid2.SelectedIndex = -1;
                //RegisterStartupScript("refresh", "<script language=javascript>document.forms[0].submit();</script>");
                return;
            }

            GestManager.cambiaStatoRegistro(this);
            BindGridRF();
            //old: updateRegistroSelezionato(GestManager.getRegistroSel(this));
            updateElementoSelezionato(GestManager.getRegistroSel(this));
            this.RefreshDocumentsCallContext();
        }
Ejemplo n.º 5
0
 protected void RegistersBtnPrint_Click(object sender, EventArgs e)
 {
     DocsPaWR.InfoUtente    infoUser = UserManager.GetInfoUser();
     DocsPaWR.InfoDocumento infoDoc  = new InfoDocumento();
     DocsPaWR.Ruolo         role     = RoleManager.GetRoleInSession();
     try
     {
         DocsPaWR.StampaRegistroResult StpRegRS = GestManager.StampaRegistro(this, infoUser, role, SelectedRegister);
         if (StpRegRS != null && StpRegRS.errore != null && StpRegRS.errore != "")
         {
             string error = StpRegRS.errore;
             error = error.Replace("'", "\\'");
             ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('WarningRegisterPrint', 'warning', '','" + error + "');} else {parent.ajaxDialogModa('ErrorRegisterPrint', 'error', '','" + error + "');}", true);
             return;
         }
         else
         {
             infoDoc.docNumber = StpRegRS.docNumber;
             DocsPaWR.SchedaDocumento schedaDoc = new SchedaDocumento();
             schedaDoc            = DocumentManager.getDocumentDetails(this, infoDoc.idProfile, infoDoc.docNumber);
             FileDocPrintRegister = FileManager.getInstance(schedaDoc.systemId).GetFile(this.Page, schedaDoc.documenti[0], false);
             ScriptManager.RegisterStartupScript(this, this.GetType(), "viewPrintRegister", "ajaxModalPopupViewPrintRegister();", true);
             return;
         }
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('ErrorRegisterPrint', 'error', '');} else {parent.ajaxDialogModa('ErrorRegisterPrint', 'error', '');}", true);
     }
 }
Ejemplo n.º 6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         registro = ws.AmmGetRegistro(GestManager.getRegistroSel().systemId);
         Session.Add("regToModify", registro);
     }
 }
Ejemplo n.º 7
0
        private void startServiteCheckIstitutionalMailbox()
        {
            DocsPaWR.Registro registro = GestManager.getRegistroSel(this);
            registro.email = GestManager.getCasellaSel();// imposto l'indirizzo della casella da interrogare
            DocsPaWR.MailAccountCheckResponse checkResponse;

            bool retValue = GestManager.startIstitutionalMailboxCheck(this, registro, out checkResponse);

            Interoperabilita.MailCheckResponseSessionManager.CurrentMailCheckResponse = checkResponse;

            this.RegisterClientScriptBlock("ShowMailCheckResultWindow", "<script>ShowMailCheckResultWindow();</script>");
        }
Ejemplo n.º 8
0
        protected void RegisterModifyBtnSavePw_Click(object sender, EventArgs e)
        {
            OrgRegistro register = GestManager.GetRegisterAmm(SelectedRegister.systemId);

            CasellaRegistro[] caselle             = GestManager.GetMailRegistro(register.IDRegistro);
            CasellaRegistro   casellaDaAggiornare = new CasellaRegistro();

            if (caselle != null && caselle.Length > 0)
            {
                casellaDaAggiornare = (from c in caselle
                                       where c.EmailRegistro.ToUpper().Equals(SelectedRegister.email.ToUpper())
                                       select c).FirstOrDefault();
            }

            if (casellaDaAggiornare != null)
            {
                register.Mail = BuildMailRegistro(casellaDaAggiornare);
                if (checkField(register.Mail.Password))
                {
                    register.Mail.Password      = this.RegisterModifyNewPwTxt.Text;
                    register.Mail.PasswordSMTP  = this.RegisterModifyNewPwTxt.Text;
                    casellaDaAggiornare.PwdMail = this.RegisterModifyNewPwTxt.Text;
                    casellaDaAggiornare.PwdSMTP = this.RegisterModifyNewPwTxt.Text;
                    ValidationResultInfo result = GestManager.UpdateRegistro(register);
                    if (result.Value)
                    {
                        result = GestManager.UpdateMailRegistro(register.IDRegistro, new CasellaRegistro[] { casellaDaAggiornare });
                    }
                    if (result.Value)
                    {
                        ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "function", "<script>reallowOp();</script>", false);
                        Response.Write("<html><body><script type=\"text/javascript\">parent.closeAjaxModal('RegisterModify','up');</script></body></html>");
                        Response.End();
                    }
                    else
                    {
                        ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "parent.ajaxDialogModal('ErrorRegisterModify', 'error', '');", true);
                        return;
                    }
                }
                else
                {
                    return;
                }
            }
            else
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "parent.ajaxDialogModal('ErrorRegisterModify', 'error', '');", true);
                return;
            }
        }
Ejemplo n.º 9
0
        protected void setDettagli(DocsPAWA.DocsPaWR.Registro rf)
        {
            this.lbl_registro.Text    = rf.codRegistro;
            this.lbl_descrizione.Text = rf.descrizione;
            DocsPaWR.Registro aooColl = UserManager.getRegistroBySistemId(this, rf.idAOOCollegata);
            //codice Aoo Collegata
            this.lbl_AooColl.Text = aooColl.codRegistro;
            //descrizione Aoo Collegata
            this.lbl_DescAooColl.Text = aooColl.descrizione;
            this.panel_Det.Visible    = true;
            #region multi casella

            System.Collections.Generic.List <DocsPAWA.DocsPaWR.CasellaRegistro> listCaselle = DocsPAWA.utils.MultiCasellaManager.GetComboRegisterConsult(GestManager.getRegistroSel().systemId);
            foreach (DocsPAWA.DocsPaWR.CasellaRegistro c in listCaselle)
            {
                System.Text.StringBuilder formatMail = new System.Text.StringBuilder();
                if (c.Principale.Equals("1"))
                {
                    formatMail.Append("* ");
                }
                formatMail.Append(c.EmailRegistro);
                if (!string.IsNullOrEmpty(c.Note))
                {
                    formatMail.Append(" - ");
                    formatMail.Append(c.Note);
                }
                ddl_Caselle.Items.Add(new ListItem(formatMail.ToString(), c.EmailRegistro));
            }

            if (listCaselle.Count == 0)
            {
                ddl_Caselle.Enabled = false;
                ddl_Caselle.Width   = new Unit(200);
                return;
            }
            //imposto la casella principale come selezionata
            foreach (ListItem i in ddl_Caselle.Items)
            {
                if (i.Text.Split(new string[] { "*" }, 2, System.StringSplitOptions.None).Length > 1)
                {
                    ddl_Caselle.SelectedValue = i.Value;
                    break;
                }
            }

            //salvo in sessione l'indirizzo della casella correntemente selezionata
            GestManager.setCasellaSel(ddl_Caselle.SelectedValue);
            #endregion
        }
Ejemplo n.º 10
0
        private void PerformActionSelectElemento(string idReg)
        {
            DocsPaWR.Registro rf = UserManager.getRegistroBySistemId(this, idReg);
            GestManager.setRegistroSel(this, rf);
            updateElementoSelezionato(rf);

            //Andrea De Marco - controllo IF-ELSE per Import Pregressi
            if (rf.flag_pregresso == true)
            {
                this.btn_cambiaStatoReg.Enabled = false;
            }
            else
            {
                this.btn_cambiaStatoReg.Enabled = true;
            }

            //
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Analisi in tutti i contesti di chiamata
        /// per aggiornare il registro modificato in tutti i documenti
        /// </summary>
        private void RefreshDocumentsCallContext()
        {
            foreach (SiteNavigation.CallContext context in SiteNavigation.CallContextStack.GetContextList())
            {
                if (context.ContextName.Equals(SiteNavigation.NavigationKeys.DOCUMENTO))
                {
                    DocsPaWR.SchedaDocumento schedaDocumento = context.SessionState["gestioneDoc.schedaDocumento"] as DocsPAWA.DocsPaWR.SchedaDocumento;
                    if (schedaDocumento != null)
                    {
                        DocsPaWR.Registro changedRegistro = GestManager.getRegistroSel(this);

                        if (schedaDocumento.registro.codRegistro.Equals(changedRegistro.codRegistro))
                        {
                            schedaDocumento.registro = changedRegistro;
                        }
                    }
                }
            }
        }
Ejemplo n.º 12
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            try
            {
                Response.Expires = -1;
                Utils.startUp(this);
                if (!Page.IsPostBack)
                {
                    //registroSel = GestManager.getRegistroSel(this);
                    //if (registroSel != null)
                    //    setDettagli(registroSel);
                    if (Request.QueryString["idReg"] != null && Request.QueryString["idReg"] != string.Empty)
                    {
                        string systemId = Request.QueryString["idReg"].ToString();

                        if (systemId != null)
                        {
                            registroSel = UserManager.getRegistroBySistemId(this, systemId);

                            if (registroSel != null)
                            {
                                setDettagli(registroSel);
                            }
                        }
                    }

                    else
                    {
                        registroSel = GestManager.getRegistroSel(this);
                        if (registroSel != null)
                        {
                            setDettagli(registroSel);
                        }
                    }
                }
            }
            catch (System.Exception ex)
            {
                ErrorManager.redirect(this, ex);
            }
        }
Ejemplo n.º 13
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         Response.Expires = -1;
         Utils.startUp(this);
         if (!Page.IsPostBack)
         {
             elemento = GestManager.getRegistroSel(this);
             if (elemento != null)
             {
                 setDettagli(elemento);
             }
         }
     }
     catch (System.Exception ex)
     {
         ErrorManager.redirect(this, ex);
     }
 }
Ejemplo n.º 14
0
        protected void RegistersBtnChangesState_Click(object sender, EventArgs e)
        {
            try {
                Registro reg = null;
                if (SelectedRegister == null)
                {
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "parent.ajaxDialogModal('WarningSelectedRegister', 'warning', '');", true);
                    return;
                }

                if (SelectedRegister != null && SelectedRegister.Sospeso)
                {
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "parent.ajaxDialogModal('WarningRegisterSuspended', 'warning', '');", true);
                    return;
                }

                reg = GestManager.cambiaStatoRegistro(SelectedRegister);
                if (reg == null)
                {
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "parent.ajaxDialogModal('ErrorChangeStateRegister', 'error', '');", true);
                    return;
                }
                if (!reg.stato.Equals("C"))
                {
                    reg.ultimoNumeroProtocollo = string.Empty;
                }
                SelectedRegister = reg;
                UpdateListRegisters();
                UpdateSelectedRecord();
                GrdRegisters_Bind();
                ButtonsManager();
                UpdateStateMailbox(ALL_MAILBOX);
                this.panelRegisters.Update();
            }
            catch (System.Exception ex)
            {
                UIManager.AdministrationManager.DiagnosticError(ex);
                return;
            }
        }
Ejemplo n.º 15
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here

            this.btn_chiudi.Attributes.Add("onclick", "window.close()");
            tipoGest = Request.QueryString["tipo"];
            if (tipoGest != null)
            {
                if (tipoGest.Equals("M"))
                {
                    registro = GestManager.getRegistroSel(this);
                    if (registro != null)
                    {
                        setDettagli(registro);
                    }
                }
                else
                if (tipoGest.Equals("I"))
                {
                    registro = new DocsPAWA.DocsPaWR.Registro();
                }
            }
        }
Ejemplo n.º 16
0
        private void Page_PreRender(object sender, System.EventArgs e)
        {
            if (GestManager.getRegistroSel() == null)
            {
                this.PerformActionSelectFirstElemento();
            }


            //abilitazione delle funzioni in base al ruolo
            UserManager.disabilitaFunzNonAutorizzate(this);

            //PEC 3 gestione visibilità(FLAG CONSULTA)
            if (DocsPAWA.utils.MultiCasellaManager.RoleIsAuthorizedConsult(GestManager.getRegistroSel(), UserManager.getRuolo().systemId))
            {
                this.btn_casellaIstituzionale.Enabled = true;
            }
            else
            {
                this.btn_casellaIstituzionale.Enabled = false;
            }
            if (GestManager.getRegistroSel().chaRF != null && GestManager.getRegistroSel().chaRF.Equals("1") ||
                (!this.btn_casellaIstituzionale.Enabled))
            {
                if (Session["TipoRegistro"] != null)
                {
                    Session["TipoRegistro"] = "disable";
                }
                else
                {
                    Session.Add("TipoRegistro", "disable");
                }
            }
            else
            {
                Session.Remove("TipoRegistro");
            }
        }
Ejemplo n.º 17
0
        private void setDettagli(DocsPAWA.DocsPaWR.Registro registro)
        {
            this.lbl_registro.Text           = registro.codRegistro;
            this.lbl_descrizione.Text        = registro.descrizione;
            this.lbl_dataApertura.Text       = registro.dataApertura;
            this.lbl_dataChiusura.Text       = registro.dataChiusura;
            this.lbl_dataUltProto.Text       = registro.dataUltimoProtocollo;
            this.lbl_prossimoProtocollo.Text = registro.ultimoNumeroProtocollo;
            this.panel_Det.Visible           = true;
            //modificato da Marco il 20/02/04 su richiesta per salute
            if (registro.stato == "A")
            {
                this.lbl_dataUltProto.Visible       = false;
                this.lbl_prossimoProtocollo.Visible = false;
            }
            #region multi casella

            System.Collections.Generic.List <DocsPAWA.DocsPaWR.CasellaRegistro> listCaselle = DocsPAWA.utils.MultiCasellaManager.GetComboRegisterConsult(registro.systemId);
            foreach (DocsPAWA.DocsPaWR.CasellaRegistro c in listCaselle)
            {
                if (!string.IsNullOrEmpty(c.EmailRegistro) && !c.EmailRegistro.Equals("&nbsp;"))
                {
                    System.Text.StringBuilder formatMail = new System.Text.StringBuilder();
                    if (c.Principale.Equals("1"))
                    {
                        formatMail.Append("* ");
                    }
                    formatMail.Append(c.EmailRegistro);
                    if (!string.IsNullOrEmpty(c.Note))
                    {
                        formatMail.Append(" - ");
                        formatMail.Append(c.Note);
                    }
                    ddl_Caselle.Items.Add(new ListItem(formatMail.ToString(), c.EmailRegistro));
                }
            }

            if (listCaselle.Count == 0)
            {
                ddl_Caselle.Enabled = false;
                ddl_Caselle.Width   = new Unit(200);
                return;
            }
            //imposto la casella principale come selezionata
            foreach (ListItem i in ddl_Caselle.Items)
            {
                if (i.Text.Split(new string[] { "*" }, 2, System.StringSplitOptions.None).Length > 1)
                {
                    ddl_Caselle.SelectedValue = i.Value;
                    break;
                }
            }
            if (Session["TipoRegistro"] != null && Session["TipoRegistro"].Equals("disable"))
            {
                ddl_Caselle.Enabled = false;
            }
            else
            {
                //salvo in sessione l'indirizzo della casella correntemente selezionata
                GestManager.setCasellaSel(ddl_Caselle.SelectedValue);
            }
            #endregion
        }
Ejemplo n.º 18
0
 /// <summary>
 /// Aggiorna in sessione la casella di posta selezionata
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void ddl_Caselle_SelectedIndexChanged(object sender, EventArgs e)
 {
     GestManager.setCasellaSel(ddl_Caselle.SelectedValue);
 }