Example #1
0
        protected void SearchCorrespondent(string addressCode, string idControl)
        {
            try {
                RubricaCallType         calltype = this.GetCallType(idControl);
                DocsPaWR.Corrispondente corr     = UIManager.AddressBookManager.getCorrispondenteRubrica(addressCode, calltype);
                if (corr == null)
                {
                    this.TxtCodeRecipient.Text        = string.Empty;
                    this.TxtDescriptionRecipient.Text = string.Empty;
                    this.IdRecipient.Value            = string.Empty;

                    string msg = "ErrorTransmissionCorrespondentNotFound";
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');} else {parent.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');}", true);
                }
                else
                {
                    this.TxtCodeRecipient.Text        = corr.codiceRubrica;
                    this.TxtDescriptionRecipient.Text = corr.descrizione;
                    this.IdRecipient.Value            = corr.systemId;
                }

                this.UpPnlRecipient.Update();
            }
            catch (System.Exception ex)
            {
                UIManager.AdministrationManager.DiagnosticError(ex);
                return;
            }
        }
Example #2
0
        /// <summary>
        /// Caricamento dati corrispondente selezionato dalla rubrica
        /// </summary>
        private void FillDatiCorrispondenteDaRubrica()
        {
            DocsPaWR.Corrispondente selectedCorr = this.SelectedCorr;
            if (selectedCorr != null)
            {
                this.txtCorrCode.Text        = selectedCorr.codiceRubrica;
                this.txtCorrDescription.Text = selectedCorr.descrizione;

                switch (selectedCorr.tipoCorrispondente)
                {
                case "P":
                    this.rblCorrType.SelectedValue = "P";
                    break;

                case "R":
                    this.rblCorrType.SelectedValue = "R";
                    break;

                case "U":
                    this.rblCorrType.SelectedValue = "U";
                    break;

                default:
                    this.rblCorrType.SelectedValue = "U";
                    break;
                }
                selectedCorr = null;
                this.PerformSelectionChanged();
            }
            else
            {
                this.txtCorrCode.Text        = string.Empty;
                this.txtCorrDescription.Text = string.Empty;
            }
        }
Example #3
0
        protected void SearchCorrespondent(string addressCode, string idControl)
        {
            DocsPaWR.Corrispondente corr = UIManager.AddressBookManager.getCorrispondenteRubrica(addressCode, this.CallType);
            if (corr == null)
            {
                switch (idControl)
                {
                case "txtCodiceUserInAuth":
                    this.txtCodiceUserInAuth.Text      = string.Empty;
                    this.txtDescrizioneUserInAuth.Text = string.Empty;
                    this.idUserInAuth.Value            = string.Empty;
                    this.upUtenteDetails.Update();
                    break;
                }

                string msg = "ErrorTransmissionCorrespondentNotFound";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');} else {parent.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');}", true);
            }
            else
            {
                switch (idControl)
                {
                case "txtCodiceUserInAuth":
                    this.txtCodiceUserInAuth.Text      = corr.codiceRubrica;
                    this.txtDescrizioneUserInAuth.Text = corr.descrizione;
                    this.idUserInAuth.Value            = corr.systemId;
                    this.upUtenteDetails.Update();
                    // this.rblOwnerType.SelectedIndex = -1;
                    // this.rblOwnerType.Items.FindByValue(corr.tipoCorrispondente).Selected = true;
                    // this.upPnlCreatore.Update();
                    break;
                }
            }
        }
Example #4
0
        private void DrawTable()
        {
            cbl_Corr = new CheckBoxList();
            tbl_Corr.Controls.Clear();
            rb_Corr          = new RadioButtonList();
            rb_Corr.ID       = "rb_Corr";
            rb_Corr.CssClass = "menu_1_grigio";

            for (int i = 0; i < listaCorr.Length; i++)
            {
                DocsPaWR.Corrispondente myCorr = (DocsPAWA.DocsPaWR.Corrispondente)listaCorr[i];
                //Cell CheckBox
                tr          = new TableRow();
                tc          = new TableCell();
                tc.CssClass = "testo_grigio";
                if (target != null && target != "" && target != "mitt" && target != "mittInt")
                {
                    CheckBox cb_Corr = new CheckBox();
                    cb_Corr.CssClass = "menu_1_grigio";
                    cb_Corr.Text     = getdecrizioneCorr(myCorr);
                    //cb_Corr=myCorr.codiceRubrica;
                    tc.Controls.Add(cb_Corr);
                }
                else
                {
                    rb_Corr.Items.Add(getdecrizioneCorr(myCorr));
                    tc.Controls.Add(rb_Corr);
                }

                tr.Cells.Add(tc);

                tbl_Corr.Rows.Add(tr);
                //Cell
            }
        }
Example #5
0
        /// <summary>
        /// Caricamento dati corrispondente selezionato dalla rubrica
        /// </summary>
        private void FillDatiCorrispondenteDaRubrica()
        {
            DocsPaWR.Corrispondente selectedCorr = UserManager.getCreatoreSelezionato(this.Page);
            if (selectedCorr != null)
            {
                switch (selectedCorr.tipoCorrispondente)
                {
                case "P":
                    DocsPaWR.Utente ut = (DocsPaWR.Utente)selectedCorr;
                    this.txtSystemIdUtenteCreatore.Value   = ut.idPeople;
                    this.txtCodiceUtenteCreatore.Text      = ut.codiceRubrica;
                    this.txtDescrizioneUtenteCreatore.Text = ut.descrizione;
                    break;

                default:
                    this.txtSystemIdUtenteCreatore.Value   = selectedCorr.systemId;
                    this.txtCodiceUtenteCreatore.Text      = selectedCorr.codiceRubrica;
                    this.txtDescrizioneUtenteCreatore.Text = selectedCorr.descrizione;
                    break;
                }
                selectedCorr = null;
            }
            else
            {
                this.txtSystemIdUtenteCreatore.Value   = string.Empty;
                this.txtCodiceUtenteCreatore.Text      = string.Empty;
                this.txtDescrizioneUtenteCreatore.Text = string.Empty;
            }
        }
Example #6
0
        private void txt_codiceCorr_TextChanged(object sender, System.EventArgs e)
        {
            //Session.Remove("selCorrDaRubrica");

            DocsPaWR.Corrispondente corr = null;
            if (txt_codiceCorr.Text != "")
            {
                //corr = UserManager.getCorrispondente(this,txt_codiceCorr.Text,true);
                corr = UserManager.getCorrispondenteRubrica(this, txt_codiceCorr.Text, DocsPAWA.DocsPaWR.RubricaCallType.CALLTYPE_LISTE_DISTRIBUZIONE);
            }
            if (corr == null)
            {
                if (txt_codiceCorr.Text != "")
                {
                    RegisterStartupScript("Errore Corrispondente", "<script>alert('Codice corrispondente errato !')</script>");
                }

                txt_descrizione.Text = "";

                if (txt_codiceCorr.Visible)
                {
                    SetFocus(txt_codiceCorr);
                }
            }
            else
            {
                txt_descrizione.Text = corr.descrizione;
                if (txt_codiceCorr.Visible)
                {
                    SetFocus(txt_codiceCorr);
                }
            }
        }
Example #7
0
        protected void SearchCorrespondent(string addressCode, string idControl)
        {
            DocsPaWR.Corrispondente corr = UIManager.AddressBookManager.getCorrispondenteRubrica(addressCode, this.CallType);
            if (corr != null && corr.tipoCorrispondente == "P")
            {
                this.txtCodiceProprietario.Text      = corr.codiceRubrica;
                this.txtDescrizioneProprietario.Text = corr.descrizione;
                this.idProprietario.Value            = corr.systemId;
                this.idPeople.Value = ((Utente)corr).idPeople;
                this.PopulateDdlUserRoles();
                this.upPnlProprietario.Update();
            }
            else
            {
                this.txtCodiceProprietario.Text      = string.Empty;
                this.txtDescrizioneProprietario.Text = string.Empty;
                this.idProprietario.Value            = string.Empty;
                this.idPeople.Value          = string.Empty;
                this.plcRoleDelegate.Visible = false;
                this.upPnlProprietario.Update();

                string msg = "ErrorTransmissionCorrespondentNotFound";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');} else {parent.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');}", true);
            }
        }
Example #8
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_PreRender(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                //this.RemoveCurrentFilters();
                DocsPaWR.Corrispondente selectedCorr = UserManager.getCreatoreSelezionato(this.Page);
                if (selectedCorr != null)
                {
                    if (!optListCreatorChanged)
                    {
                        if (selectedCorr.tipoCorrispondente.Equals("P"))
                        {
                            DocsPaWR.Utente ut = (DocsPaWR.Utente)selectedCorr;
                            this.txtSystemIdUtenteCreatore.Value = ut.idPeople;
                        }
                        else
                        {
                            this.txtSystemIdUtenteCreatore.Value = selectedCorr.systemId;
                        }
                        this.txtCodiceUtenteCreatore.Text      = selectedCorr.codiceRubrica;
                        this.txtDescrizioneUtenteCreatore.Text = selectedCorr.descrizione;
                        this.optListTipiCreatore.SelectedValue = selectedCorr.tipoCorrispondente;
                    }

                    this.PersistCurrentFilters();
                }
            }
        }
Example #9
0
        private void SetDescCorr(string codRubrica)
        {
            //DocsPaWR.Corrispondente corr = UserManager.getCorrispondenteByCodRubricaIE(this.Page, codRubrica, AddressbookTipoUtente.INTERNO);

            DocsPaWR.Corrispondente corr = null;

            ArrayList listaRuoli = ProfilazioneDocManager.getRuoliByAmm(IdAmministrazione.ToString(), codRubrica, "COD_RUOLO", this.Page);

            id_corr.Value = string.Empty;

            if (listaRuoli != null && listaRuoli.Count > 0)
            {
                if (listaRuoli.Count == 1)
                {
                    Ruolo r = (Ruolo)listaRuoli[0];

                    txtCodRuolo.Text  = r.codice;
                    txtDescRuolo.Text = r.descrizione;
                    id_corr.Value     = r.idGruppo;

                    this.UsersInRole = UserManager.GetUsersInRoleMinimalInfo(id_corr.Value);
                    this.PopolaDdlUtenti();
                    this.ddl_user.Enabled = true;
                }
                else
                {
                    foreach (Ruolo r in listaRuoli)
                    {
                        if (r.codice.ToUpper().Equals(codRubrica.ToUpper()))
                        {
                            txtCodRuolo.Text  = r.codice;
                            txtDescRuolo.Text = r.descrizione;
                            id_corr.Value     = r.idGruppo;

                            this.UsersInRole = UserManager.GetUsersInRoleMinimalInfo(id_corr.Value);
                            this.PopolaDdlUtenti();
                            this.ddl_user.Enabled = true;
                        }
                    }
                    if (string.IsNullOrEmpty(id_corr.Value))
                    {
                        txtCodRuolo.Text  = string.Empty;
                        txtDescRuolo.Text = string.Empty;
                        id_corr.Value     = string.Empty;
                        this.ddl_user.Items.Clear();
                        this.ddl_user.Enabled = false;
                        ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "no_found", "alert('Corrispondente non trovato');", true);
                    }
                }
            }
            else
            {
                txtCodRuolo.Text  = string.Empty;
                txtDescRuolo.Text = string.Empty;
                id_corr.Value     = string.Empty;
                this.ddl_user.Items.Clear();
                this.ddl_user.Enabled = false;
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "no_found", "alert('Corrispondente non trovato');", true);
            }
        }
Example #10
0
        private DocsPaWR.CopyVisibility getCopyVisibility()
        {
            DocsPaWR.CopyVisibility copyVisibility = new DocsPaWR.CopyVisibility();

            //Ruolo Origine
            copyVisibility.codRuoloOrigine        = this.Request.QueryString["codRuolo"].ToString();
            copyVisibility.descRuoloOrigine       = this.Request.QueryString["descRuolo"].ToString();
            copyVisibility.idGruppoRuoloOrigine   = this.Request.QueryString["idGruppo"].ToString();
            copyVisibility.idCorrGlobRuoloOrigine = this.Request.QueryString["idCorrGlobRuolo"].ToString();

            //Ruolo Destinazione
            DocsPaWR.ElementoRubrica corrSearch = getElementoRubrica();
            if (corrSearch != null)
            {
                DocsPaWR.Corrispondente corrDest = UserManager.getCorrispondenteBySystemID(this, corrSearch.systemId);
                copyVisibility.codRuoloDestinazione        = corrDest.codiceRubrica;
                copyVisibility.descRuoloDestinazione       = corrDest.descrizione;
                copyVisibility.idGruppoRuoloDestinazione   = ((DocsPaWR.Ruolo)corrDest).idGruppo;
                copyVisibility.idCorrGlobRuoloDestinazione = corrDest.systemId;
            }

            //Criteri di copia
            copyVisibility.idAmm                     = this.Request.QueryString["idAmm"].ToString();
            copyVisibility.docProtocollati           = cbx_docProtocollati.Checked;
            copyVisibility.docNonProtocollati        = cbx_docNonProtocollati.Checked;
            copyVisibility.fascicoliProcedimentali   = cbx_fascicoliProcedimentali.Checked;
            copyVisibility.visibilitaAttiva          = cbx_visibilitaAttiva.Checked;
            copyVisibility.precedenteCopiaVisibilita = cbx_precCopiaVisibilita.Checked;
            copyVisibility.estendiVisibilita         = rbl_estendiVisibilita.SelectedValue;

            return(copyVisibility);
        }
Example #11
0
 protected void setDescCorr(string codRubrica)
 {
     DocsPaWR.Corrispondente corr = UserManager.getCorrispondenteByCodRubricaIE(this.Page, codRubrica, AddressbookTipoUtente.INTERNO);
     if (corr == null)
     {
         txtCodRuolo.Text  = string.Empty;
         txtDescRuolo.Text = string.Empty;
         id_corr.Value     = string.Empty;
         ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "no_found", "alert('Corrispondente non trovato');", true);
     }
     else
     {
         if (corr != null && !corr.tipoCorrispondente.Equals("U"))
         {
             txtCodRuolo.Text  = string.Empty;
             txtDescRuolo.Text = string.Empty;
             id_corr.Value     = string.Empty;
             ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "no_found", "alert('Inserire soltanto UO');", true);
         }
         else
         {
             txtCodRuolo.Text  = corr.codiceRubrica;
             txtDescRuolo.Text = corr.descrizione;
             id_corr.Value     = corr.systemId;
         }
     }
 }
Example #12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                wnd = Request.QueryString["wnd"];

                if (!Page.IsPostBack)
                {
                    caricaRegistriDisponibili();
                    string dataUser            = null;
                    DocsPaWR.Corrispondente cr = (DocsPAWA.DocsPaWR.Corrispondente) this.Session["userData"];

                    if (ctx.Session["userRuolo"] != null)
                    {
                        dataUser = ((DocsPAWA.DocsPaWR.Ruolo)ctx.Session["userRuolo"]).systemId;
                    }

                    string idAmm = cr.idAmministrazione;
                    keyWord.ContextKey += "-" + dataUser + "-" + idAmm;
                }
                disabilitaAddParoleChiave();
            }
            catch (Exception ex)
            {
                ErrorManager.OpenErrorPage(this, ex, "Ricerca/Inserimento in oggettario");
            }
        }
Example #13
0
        /// <summary>
        /// Determina se il corrispondente è tra i destinatari principali del documento
        /// </summary>
        /// <param name="corrispondente"></param>
        /// <returns></returns>
        private bool IsDestinatarioPrincipale(DocsPaWR.Corrispondente corrispondente)
        {
            DocsPaWR.SchedaDocumento documento = DocumentManager.getSelectedRecord();

            DocsPaWR.ProtocolloUscita protocolloUscita = (DocsPaWR.ProtocolloUscita)documento.protocollo;

            return(protocolloUscita.destinatari.Count(e => e.systemId == corrispondente.systemId) > 0);
        }
Example #14
0
 private void ListCorrispondenti_SelectedIndexChanged(object sender, System.EventArgs e)
 {
     if (ListCorrispondenti.SelectedIndex > -1)
     {
         DocsPaWR.Corrispondente[] searchCorr = (DocsPAWA.DocsPaWR.Corrispondente[])Session["rubricaSempl.listaCorr"];
         DocsPaWR.Corrispondente   corr       = (DocsPAWA.DocsPaWR.Corrispondente)searchCorr[ListCorrispondenti.SelectedIndex];
         corr = UserManager.getCorrispondente(this, corr.codiceRubrica, true);
         UserManager.setParentCorr(this, corr);
     }
 }
Example #15
0
        protected void DocumentImgAddNewCorrispondent_Click(object sender, ImageClickEventArgs e)
        {
            Session.Remove("selCorrDaRubrica");

            DocsPaWR.Corrispondente corr = null;

            if (!string.IsNullOrEmpty(this.TxtCodeSender.Text) && !string.IsNullOrEmpty(this.TxtDescriptionSender.Text))
            {
                corr = AddressBookManager.getCorrispondenteRubrica(TxtCodeSender.Text, DocsPaWR.RubricaCallType.CALLTYPE_LISTE_DISTRIBUZIONE);

                if (corr != null && !string.IsNullOrEmpty(corr.systemId))
                {
                    if (!verificaDuplicazioneCorr(corr))
                    {
                        if (ViewState["dsCorr"] == null)
                        {
                            DataTable dt = new DataTable();
                            dt.Columns.Add("ID_DPA_CORR");
                            dt.Columns.Add("VAR_DESC_CORR");
                            dt.Columns.Add("VAR_COD_RUBRICA");
                            dt.Columns.Add("CHA_TIPO_IE");
                            dt.Columns.Add("CHA_DISABLED_TRASM");
                            dsCorrispondenti = new DataSet();
                            dsCorrispondenti.Tables.Add(dt);
                            ViewState.Add("dsCorr", dsCorrispondenti);
                        }

                        DataRow dr = ((DataSet)ViewState["dsCorr"]).Tables[0].NewRow();
                        dr[0] = corr.systemId;
                        dr[1] = corr.descrizione;
                        if (corr.disabledTrasm)
                        {
                            dr[4] = "1";
                        }
                        else
                        {
                            dr[4] = "0";
                        }
                        ((DataSet)ViewState["dsCorr"]).Tables[0].Rows.Add(dr);
                        gridViewResult.DataSource = ((DataSet)ViewState["dsCorr"]);
                        gridViewResult.DataBind();
                        TxtCodeSender.Text        = "";
                        TxtDescriptionSender.Text = "";
                        this.UpnlGrid.Update();
                    }
                    else
                    {
                        this.TxtCodeSender.Text        = "";
                        this.TxtDescriptionSender.Text = "";
                        this.UpnlGrid.Update();
                    }
                }
            }
        }
Example #16
0
        /// <summary>
        /// Reperimento di un corrispondente in base ad un codice rubrica fornito in ingresso
        /// </summary>
        private DocsPaWR.Corrispondente GetCorrispondenteDaCodice(String corrCode)
        {
            DocsPaWR.Corrispondente retValue = null;

            if (!String.IsNullOrEmpty(corrCode))
            {
                retValue = UserManager.getCorrispondente(this.Page, corrCode, true);
            }

            return(retValue);
        }
Example #17
0
        /// <summary>
        /// Reperimento di un corrispondente in base ad un codice rubrica fornito in ingresso
        /// </summary>
        /// <param name="page"></param>
        /// <param name="codCorrispondente"></param>
        /// <returns></returns>
        private DocsPaWR.Corrispondente GetCorrispondenteDaCodice(string codCorrispondente)
        {
            DocsPaWR.Corrispondente retValue = null;

            if (codCorrispondente != null)
            {
                retValue = UserManager.getCorrispondente(this.Page, codCorrispondente, true);
            }

            return(retValue);
        }
Example #18
0
 public static DocsPaWR.Canale getDatiCanPref(DocsPaWR.Corrispondente corr)
 {
     try
     {
         return(WsInstance.AddressBookGetDatiCanalePref_Experimental(corr));
     }
     catch (System.Exception ex)
     {
         UIManager.AdministrationManager.DiagnosticError(ex);
         return(null);
     }
 }
Example #19
0
 protected string GetStoricizzato(DocsPaWR.ElementoRubrica elem)
 {
     DocsPaWR.Corrispondente corr = UIManager.AddressBookManager.GetCorrespondentBySystemId(elem.systemId);
     if (corr != null && (!string.IsNullOrEmpty(corr.dta_fine)))
     {
         return("SI");
     }
     else
     {
         return("NO");
     }
 }
Example #20
0
 protected string GetStoricizzato(DocsPaWR.ElementoRubrica elem)
 {
     DocsPaWR.Corrispondente corr = UserManager.getCorrispondenteBySystemID(this.Page, elem.systemId);
     if (corr != null && (!string.IsNullOrEmpty(corr.dta_fine)))
     {
         return("SI");
     }
     else
     {
         return("NO");
     }
 }
Example #21
0
        //INSERITA DA FABIO PRENDE LE ETICHETTE DEI PROTOCOLLI
        private void getLettereProtocolli()
        {
            DocsPaWR.Corrispondente cr = (DocsPAWA.DocsPaWR.Corrispondente) this.Session["userData"];
            string idAmm = cr.idAmministrazione;

            DocsPAWA.DocsPaWR.EtichettaInfo[]  etichette;
            DocsPAWA.DocsPaWR.InfoUtente       infoUtente = new DocsPAWA.DocsPaWR.InfoUtente();
            DocsPAWA.DocsPaWR.DocsPaWebService wws        = new DocsPAWA.DocsPaWR.DocsPaWebService();
            etichette = wws.getEtichetteDocumenti(infoUtente, idAmm);
            this.chkProtocolliIngresso.Text = "Protocolli in " + etichette[0].Etichetta; //Valore A
            this.chkProtocolliPartenza.Text = "Protocolli in " + etichette[1].Etichetta; //Valore P
            this.chkProtocolliInterno.Text  = "Protocolli in " + etichette[2].Etichetta; //Valore I
            // this.chkDocumentiGrigi.Text = "Documenti " + etichette[3].Etichetta;//Valore I
        }
Example #22
0
 private bool verificaDuplicazioneCorr(DocsPaWR.Corrispondente corr)
 {
     if (ViewState["dsCorr"] != null && ((DataSet)ViewState["dsCorr"]).Tables[0] != null && ((DataSet)ViewState["dsCorr"]).Tables[0].Rows != null && ((DataSet)ViewState["dsCorr"]).Tables[0].Rows.Count != 0)
     {
         for (int i = 0; i < ((DataSet)ViewState["dsCorr"]).Tables[0].Rows.Count; i++)
         {
             if (corr != null && corr.systemId == ((DataSet)ViewState["dsCorr"]).Tables[0].Rows[i][0].ToString())
             {
                 return(true);
             }
         }
     }
     return(false);
 }
Example #23
0
 void dg_lista_corr_PreRender(object sender, EventArgs e)
 {
     foreach (DataGridItem item in dg_lista_corr.Items)
     {
         string idDestinatario        = item.Cells[0].Text;
         DocsPaWR.Corrispondente corr = UserManager.getCorrispondenteBySystemID(this.Page, idDestinatario);
         if (!string.IsNullOrEmpty(corr.dta_fine))
         {
             RadioButton optCorr = item.Cells[3].FindControl("optCorr") as RadioButton;
             optCorr.Visible       = false;
             item.Cells[1].ToolTip = "Elemento non selezionabile in quanto storicizzato";
         }
     }
 }
Example #24
0
        protected void GetIDBehavior()
        {
            if (Session["CountCorr"] != null)
            {
                string dataUser             = null;
                DocsPaWR.Corrispondente cr  = (SAAdminTool.DocsPaWR.Corrispondente) this.Session["userData"];
                System.Web.HttpContext  ctx = System.Web.HttpContext.Current;
                if (ctx.Session["userRuolo"] != null)
                {
                    dataUser = ((SAAdminTool.DocsPaWR.Ruolo)ctx.Session["userRuolo"]).systemId;
                }
                if (ctx.Session["userRegistro"] != null)
                {
                    dataUser = dataUser + "-" + ((Registro)ctx.Session["userRegistro"]).systemId;
                }

                string idAmm    = cr.idAmministrazione;
                string callType = "CALLTYPE_PROTO_IN";
                int    count    = 0;
                if (Session["CountCorr"] != null && !string.IsNullOrEmpty(Session["CountCorr"].ToString()))
                {
                    count = Convert.ToInt32(Session["CountCorr"].ToString());
                }
                int j = 0;
                if (Session["whichCorr"] != null && Convert.ToInt32(Session["whichCorr"].ToString()) == count - 1)
                {
                    Session.Remove("whichCorr");
                }
                if (Session["whichCorr"] == null)
                {
                    Session.Add("whichCorr", j);
                }
                else if (Convert.ToInt32(Session["whichCorr"]) < count)
                {
                    Session.Add("whichCorr", Convert.ToInt32(Session["whichCorr"]) + 1);
                }

                int currCorr = Convert.ToInt32(Session["whichCorr"]);
                mittente_veloce.ContextKey = dataUser + "-" + idAmm + "-" + callType;
                mittente_veloce.BehaviorID = "behavior_" + currCorr;
                string b = "behavior_" + currCorr;
                mittente_veloce.OnClientPopulated    = "acePopulated" + currCorr;
                mittente_veloce.OnClientItemSelected = "aceSelected" + currCorr;
                string nomeFunzionePopulated = "acePopulated" + currCorr;
                string nomeFunzioneSelected  = "aceSelected" + currCorr;
                string unique = this.UniqueID;
                mittente_veloce.Enabled = false;
                builderJS(b, nomeFunzionePopulated, nomeFunzioneSelected, unique);
            }
        }
Example #25
0
        private void caricaValoriFascicoloSelezionato(DocsPAWA.DocsPaWR.Fascicolo fasc)
        {
            this.txt_fascApertura.Text = fasc.apertura;
            this.txt_FascChiusura.Text = fasc.chiusura;
            this.txt_descrizione.Text  = fasc.descrizione;

            Note.INoteManager noteManager = Note.NoteManagerFactory.CreateInstance(DocsPAWA.DocsPaWR.OggettiAssociazioniNotaEnum.Fascicolo);
            this.txt_fascnote.Text = noteManager.GetUltimaNotaAsString();

            this.txt_fascStato.Text           = FascicoliManager.decodeStatoFasc(this, fasc.stato);
            this.txt_Fasctipo.Text            = FascicoliManager.decodeTipoFasc(this, fasc.tipo);
            this.txt_ClassFasc.Text           = getCodiceGerarchia(fasc);
            this.txt_fascdesc.Text            = fasc.codice;
            this.chkFascicoloCartaceo.Checked = fasc.cartaceo;
            if ((fasc.privato == null) || (fasc.privato == "0"))
            {
                this.chkFascicoloPrivato.Checked = false;
            }
            else
            {
                this.chkFascicoloPrivato.Checked = true;
            }


            //bool statoAperturaFascicolo = false;

            if (fasc.stato.Equals("C"))
            {
                ViewState["Chiuso"] = true;
            }
            else
            {
                ViewState["Chiuso"] = false;
                //statoAperturaFascicolo=true;
            }
//			this.btn_insDoc.Enabled=statoAperturaFascicolo;
            //per la visualizzazione della collocazione fisica
            if (!string.IsNullOrEmpty(fasc.idUoLF))
            {
                DocsPaWR.Corrispondente corrRef = UserManager.getCorrispondenteBySystemID(this, fasc.idUoLF);

                if (corrRef != null)
                {
                    this.txt_cod_lf.Text  = corrRef.codiceRubrica;
                    this.txt_desc_lf.Text = corrRef.descrizione;
                    this.txt_dta_lf.Text  = fasc.dtaLF;
                }
            }
        }
Example #26
0
        private void addCorrSelDaRubrica(DocsPAWA.DocsPaWR.ElementoRubrica[] selCorrDaRubrica)
        {
            for (int i = 0; i < selCorrDaRubrica.Length; i++)
            {
                DocsPaWR.ElementoRubrica el = (DocsPAWA.DocsPaWR.ElementoRubrica)selCorrDaRubrica[i];
                //DocsPaWR.Corrispondente corr	= UserManager.getCorrispondenteByCodRubricaIE(this,el.codice,el.interno ? DocsPAWA.DocsPaWR.AddressbookTipoUtente.INTERNO : DocsPAWA.DocsPaWR.AddressbookTipoUtente.ESTERNO);
                //DocsPaWR.Corrispondente corr = UserManager.getCorrispondenteRubrica(this, el.codice, DocsPAWA.DocsPaWR.RubricaCallType.CALLTYPE_LISTE_DISTRIBUZIONE);
                DocsPaWR.Corrispondente corr = UserManager.getCorrispondenteBySystemIDDisabled(this.Page, el.systemId);

                if (corr != null && !verificaDuplicazioneCorr(corr))
                {
                    if (ViewState["dsCorr"] == null)
                    {
                        DataTable dt = new DataTable();
                        dt.Columns.Add("ID_DPA_CORR");
                        dt.Columns.Add("VAR_DESC_CORR");
                        dt.Columns.Add("VAR_COD_RUBRICA");
                        dt.Columns.Add("CHA_TIPO_IE");
                        dt.Columns.Add("CHA_DISABLED_TRASM");
                        dsCorrispondenti = new DataSet();
                        dsCorrispondenti.Tables.Add(dt);
                        ViewState.Add("dsCorr", dsCorrispondenti);
                    }

                    DataRow dr = ((DataSet)ViewState["dsCorr"]).Tables[0].NewRow();
                    dr[0] = corr.systemId;
                    dr[1] = corr.descrizione;
                    dr[2] = corr.codiceRubrica;
                    dr[3] = corr.tipoIE;
                    if (corr.disabledTrasm)
                    {
                        dr[4] = "1";
                    }
                    else
                    {
                        dr[4] = "0";
                    }

                    ((DataSet)ViewState["dsCorr"]).Tables[0].Rows.Add(dr);
                    ((System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txt_confirmMod")).Value = "si";
                }
            }
            dg_2.DataSource = ((DataSet)ViewState["dsCorr"]);
            dg_2.DataBind();


            //txt_codiceCorr.Text = "";
            txt_descrizione.Text = "";
        }
Example #27
0
        /// <summary>
        /// Al cambio del testo viene risolto il codice immesso
        /// </summary>
        protected void txtCodiceUtenteCreatore_TextChanged(object sender, EventArgs e)
        {
            String corrCode = this.txtCorrCode.Text;

            DocsPaWR.Corrispondente corr = null;

            if (!String.IsNullOrEmpty(corrCode))
            {
                // Reperimento oggetto corrispondente dal codice immesso dall'utente
                corr = this.GetCorrispondenteDaCodice(corrCode);

                if (corr == null)
                {
                    this.Page.ClientScript.RegisterStartupScript(
                        this.GetType(),
                        "CodiceRubricaNonTrovato",
                        "alert('Codice rubrica non trovato');",
                        true);
                    this.SelectedCorr = null;
                }
                else
                {
                    this.SelectedCorr = corr;

                    if (corr.GetType().Equals(typeof(DocsPaWR.Utente)))
                    {
                        this.rblCorrType.SelectedValue = "P";
                    }
                    else if (corr.GetType().Equals(typeof(DocsPaWR.Ruolo)))
                    {
                        this.rblCorrType.SelectedValue = "R";
                    }
                    else if (corr.GetType().Equals(typeof(DocsPaWR.UnitaOrganizzativa)))
                    {
                        this.rblCorrType.SelectedValue = "U";
                    }
                }
                this.txtCorrCode.Focus();

                this.FillDatiCorrispondenteDaRubrica();
            }
            else
            {
                this.txtCorrCode.Text        = "";
                this.txtCorrDescription.Text = "";

                this.SelectedCorr = null;
            }
        }
Example #28
0
        protected void ddlRegRf_SelectedIndexChanged(object sender, EventArgs e)
        {
            string dataUser = null;

            DocsPaWR.Corrispondente cr = (DocsPAWA.DocsPaWR.Corrispondente) this.Session["userData"];

            if (ctx.Session["userRuolo"] != null)
            {
                dataUser = ((DocsPAWA.DocsPaWR.Ruolo)ctx.Session["userRuolo"]).systemId;
            }

            string idAmm = cr.idAmministrazione;

            this.keyWord.ContextKey = this.ddlRegRf.SelectedValue + "-" + dataUser + "-" + idAmm;
        }
Example #29
0
        // FINE MEV CS 1.5 F02_01 conversione automatica

        protected void setDescCorr(string codRubrica)
        {
            DocsPaWR.Corrispondente corr = UserManager.getCorrispondenteByCodRubricaIE(this.Page, codRubrica, AddressbookTipoUtente.INTERNO);
            if (corr == null)
            {
                txtCodRuolo.Text            = string.Empty;
                txtDescRuolo.Text           = string.Empty;
                id_corr.Value               = string.Empty;
                this.ddl_role_users.Enabled = false;
                this.ddl_role_users.Items.Clear();
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "no_found", "alert('Corrispondente non trovato');", true);
            }
            else
            {
                if (corr != null && !corr.tipoCorrispondente.Equals("R"))
                {
                    this.ddl_role_users.Enabled = false;
                    this.ddl_role_users.Items.Clear();
                    txtCodRuolo.Text  = string.Empty;
                    txtDescRuolo.Text = string.Empty;
                    id_corr.Value     = string.Empty;
                    ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "no_found", "alert('Inserire soltanto ruoli');", true);
                }
                else
                {
                    txtCodRuolo.Text  = corr.codiceRubrica;
                    txtDescRuolo.Text = corr.descrizione;
                    id_corr.Value     = corr.systemId;
                    Utente[] roleUsers = _wsInstance.getUserInRoleByIdCorrGlobali(corr.systemId);
                    if (roleUsers != null && roleUsers.Length > 0)
                    {
                        this.ddl_role_users.Enabled = true;
                        this.ddl_role_users.Items.Clear();
                        for (int i = 0; i < roleUsers.Length; i++)
                        {
                            ddl_role_users.Items.Add(roleUsers[i].descrizione);
                            ddl_role_users.Items[i].Value = (roleUsers[i].systemId).ToString();
                        }
                    }
                    else
                    {
                        this.ddl_role_users.Enabled = false;
                        this.ddl_role_users.Items.Clear();
                    }
                }
            }
        }
Example #30
0
        private bool filtra_ruoli_utenti_smistamento(SAAdminTool.DocsPaWR.ElementoRubrica er)
        {
            string pcode = null;

            DocsPaWR.Corrispondente rcorr = UserManager.GetCorrispondenteInterno(_page, er.codice, true);
            if (rcorr == null)
            {
                return(false);
            }

            if (er.tipo == "R")
            {
                pcode = ((SAAdminTool.DocsPaWR.Ruolo)rcorr).uo.codiceRubrica;
                if (IsInSmistamento(pcode))
                {
                    return(false);
                }
            }
            else
            {
                DocsPaWR.Ruolo[] ruoli = ((SAAdminTool.DocsPaWR.Utente)rcorr).ruoli;
                if (ruoli == null || ruoli.Length == 0)
                {
                    return(false);
                }

                foreach (Ruolo r in ruoli)
                {
                    DocsPaWR.ElementoRubrica err = new ElementoRubrica();
                    err.codice       = r.codiceRubrica;
                    err.interno      = true;
                    err.tipo         = "R";
                    err.descrizione  = "";
                    err.has_children = false;
                    bool filtra = filtra_ruoli_utenti_smistamento(err);
                    if (filtra)
                    {
                        return(true);
                    }
                }
                return(false);
            }
            bool result = filtra_smistamento(pcode);

            return(result);
        }