Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Utils.startUp(this);
            if (!IsPostBack)
            {
                GestioneGrafica();
                ClearSession();
                GetTypeDocument();
                GetRf();
                GetLettereProtocolli();
                PopulateTypeDocuments();
                GetAOO();
                GetTitolariUtilizzabili();
                this.TemplateProf = null;
                if (Request.QueryString["id"] != null && !string.IsNullOrEmpty(Request.QueryString["id"]))
                {
                    ViewDetailsPolicy();
                    this.titlePage.Text = "Dettaglio della Policy";
                }
            }
            UpdateFormatDocument();

            Corrispondente tempCorr = UserManager.getCorrispondenteSelezionatoRuoloSottoposto(this.Page);

            if (tempCorr != null)
            {
                txtCodRuolo.Text  = tempCorr.codiceRubrica;
                txtDescRuolo.Text = tempCorr.descrizione;
                id_corr.Value     = tempCorr.systemId;
                UserManager.removeCorrispondentiSelezionati(this.Page);
            }
        }
Exemple #2
0
        public static InfoDelega buildDelegaFromModello(DocsPaVO.utente.InfoUtente utente, string idModello, DateTime overrideDataInizio, DateTime overrideDataFine)
        {
            ModDeleghe    modDeleghe = new ModDeleghe();
            ModelloDelega md         = modDeleghe.getModelloDelegaById(idModello);
            InfoDelega    delega     = new InfoDelega();

            if (string.IsNullOrEmpty(md.IdRuoloDelegante))
            {
                delega.id_ruolo_delegante  = "0";
                delega.cod_ruolo_delegante = "TUTTI";
            }
            else
            {
                delega.id_ruolo_delegante  = md.IdRuoloDelegante;
                delega.cod_ruolo_delegante = md.DescrRuoloDelegante;
            }
            delega.id_utente_delegante = utente.idPeople;
            Corrispondente delegante = UserManager.getCorrispondenteByIdPeople(utente.idPeople, TipoUtente.INTERNO, utente);

            delega.cod_utente_delegante = delegante.codiceRubrica;
            delega.id_ruolo_delegato    = md.IdRuoloDelegato;

            Corrispondente delegato = BusinessLogic.Utenti.UserManager.getCorrispondenteBySystemID(md.IdUtenteDelegato);

            delega.cod_utente_delegato = delegato.codiceRubrica;
            md.IdUtenteDelegato        = ((DocsPaVO.utente.Utente)(delegato)).idPeople;

            ArrayList ruoliDelegato = BusinessLogic.Utenti.UserManager.getRuoliUtente(md.IdUtenteDelegato);

            ruoliDelegato.Sort(new RuoliComparer());
            delega.id_uo_delegato = ((Ruolo)ruoliDelegato[0]).uo.systemId;


            Ruolo ruoloDelegato = UserManager.getRuoloById(md.IdRuoloDelegato);

            delega.cod_ruolo_delegato  = ruoloDelegato.codice;
            delega.id_utente_delegato  = md.IdUtenteDelegato;
            delega.cod_utente_delegato = null;
            if (overrideDataInizio.CompareTo(DateTime.MinValue) > 0)
            {
                delega.dataDecorrenza = buildDateString(overrideDataInizio);
            }
            else
            {
                delega.dataDecorrenza = buildDateString(md.DataInizioDelega);
            }
            if (overrideDataFine.CompareTo(DateTime.MinValue) > 0)
            {
                delega.dataScadenza = buildDateString(overrideDataFine);
            }
            else
            {
                delega.dataScadenza = buildDateString(md.DataFineDelega);
            }
            return(delega);
        }
Exemple #3
0
 protected void TxtCode_OnTextChanged(object sender, EventArgs e)
 {
     ScriptManager.RegisterStartupScript(this, this.GetType(), "reallowOp", "reallowOp();", true);
     try
     {
         string codice = TxtCodeCorr.Text;
         this.TxtCodeCorr.Text        = string.Empty;
         this.TxtDescriptionCorr.Text = string.Empty;
         if (!string.IsNullOrEmpty(codice))
         {
             RubricaCallType   calltype  = RubricaCallType.CALLTYPE_PROTO_INT_MITT;
             ElementoRubrica[] listaCorr = null;
             Corrispondente    corr      = null;
             UIManager.RegistryManager.SetRegistryInSession(RoleManager.GetRoleInSession().registri[0]);
             listaCorr = UIManager.AddressBookManager.getElementiRubricaMultipli(codice, calltype, true);
             if (listaCorr != null && (listaCorr.Count() == 1))
             {
                 if (listaCorr.Count() == 1)
                 {
                     corr = UIManager.AddressBookManager.getCorrispondenteRubrica(codice, calltype);
                 }
                 if (corr == null)
                 {
                     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);
                 }
                 if (!corr.tipoCorrispondente.Equals("R"))
                 {
                     string msg = "WarningCorrespondentAsRole";
                     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.TxtCodeCorr.Text             = corr.codiceRubrica;
                     this.TxtDescriptionCorr.Text      = corr.descrizione;
                     this.idCorr.Value                 = ((DocsPaWR.Ruolo)corr).idGruppo;
                     this.BtnAssegnaVisibilita.Enabled = true;
                     this.UpPnlButtons.Update();
                 }
             }
             else
             {
                 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);
             }
         }
         this.UpdPnlCorr.Update();
     }
     catch (Exception ex)
     {
         string msg = "ErrorSignatureProcess";
         ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'error', '');} else {parent.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'error', '');}", true);
         return;
     }
 }
Exemple #4
0
        private ArrayList queryUtenti(Corrispondente corr)
        {
            QueryCorrispondente qco = new QueryCorrispondente();

            qco.codiceRubrica     = corr.codiceRubrica;
            qco.getChildren       = true;
            qco.idAmministrazione = _infoUtente.idAmministrazione;
            qco.fineValidita      = true;
            qco.tipoUtente        = TipoUtente.INTERNO;
            return(BusinessLogic.Utenti.addressBookManager.getListaCorrispondenti(qco));
        }
Exemple #5
0
 private static void buildBasicInfo(TrasmissioneSingola trasmissioneSingola, Corrispondente corr, RagioneTrasmissione ragione, string note, string tipoTrasm, int scadenza)
 {
     trasmissioneSingola.tipoTrasm             = tipoTrasm;
     trasmissioneSingola.corrispondenteInterno = corr;
     trasmissioneSingola.ragione     = ragione;
     trasmissioneSingola.noteSingole = note;
     if (scadenza > 0)
     {
         string          dataScadenza = "";
         System.DateTime data         = System.DateTime.Now.AddDays(scadenza);
         dataScadenza = data.Day + "/" + data.Month + "/" + data.Year;
         trasmissioneSingola.dataScadenza = dataScadenza;
     }
     trasmissioneSingola.trasmissioneUtente = new ArrayList();
 }
Exemple #6
0
        public void addTrasmSingole(Corrispondente corr, RagioneTrasmissione ragione, string note, string tipoTrasm, int scadenza)
        {
            if (_trasmissioniSingole.ContainsKey(corr.systemId))
            {
                if (_trasmissioniSingole[corr.systemId].daEliminare)
                {
                    _trasmissioniSingole[corr.systemId].daEliminare = false;
                }
                return;
            }
            TrasmissioneSingola _trasmissioneSingola = new TrasmissioneSingola();

            buildBasicInfo(_trasmissioneSingola, corr, ragione, note, tipoTrasm, scadenza);
            if (corr is Ruolo)
            {
                _trasmissioneSingola.tipoDest = TipoDestinatario.RUOLO;
                ArrayList listaUtenti = queryUtenti(corr);
                if (listaUtenti.Count == 0)
                {
                    return;
                }
                foreach (Utente temp in listaUtenti)
                {
                    addTrasmissioneUtente(temp, _trasmissioneSingola);
                }
                _trasmissioniSingole.Add(corr.systemId, _trasmissioneSingola);
            }
            if (corr is Utente)
            {
                _trasmissioneSingola.tipoDest = TipoDestinatario.UTENTE;
                addTrasmissioneUtente((Utente)corr, _trasmissioneSingola);
                _trasmissioniSingole.Add(corr.systemId, _trasmissioneSingola);
            }
            if (corr is UnitaOrganizzativa)
            {
                UnitaOrganizzativa             theUo = (UnitaOrganizzativa)corr;
                QueryCorrispondenteAutorizzato qca   = new QueryCorrispondenteAutorizzato();
                qca.ragione = _trasmissioneSingola.ragione;
                qca.ruolo   = _ruolo;
                ArrayList ruoli = BusinessLogic.Utenti.addressBookManager.getRuoliRiferimentoAutorizzati(qca, theUo);
                foreach (Ruolo r in ruoli)
                {
                    addTrasmSingole(r, ragione, note, tipoTrasm, scadenza);
                }
            }
        }
Exemple #7
0
        protected void btnAddressBookPostback_Click(object sender, EventArgs e)
        {
            ScriptManager.RegisterStartupScript(this, this.GetType(), "reallowOp", "reallowOp();", true);

            try
            {
                List <NttDataWA.Popup.AddressBook.CorrespondentDetail> atList = (List <NttDataWA.Popup.AddressBook.CorrespondentDetail>)HttpContext.Current.Session["AddressBook.At"];
                List <NttDataWA.Popup.AddressBook.CorrespondentDetail> ccList = (List <NttDataWA.Popup.AddressBook.CorrespondentDetail>)HttpContext.Current.Session["AddressBook.Cc"];
                string addressBookCallFrom = HttpContext.Current.Session["AddressBook.from"].ToString();

                if (atList != null && atList.Count > 0)
                {
                    Corrispondente corr = null;
                    //Profiler document
                    UserControls.CorrespondentCustom userCorr = (UserControls.CorrespondentCustom) this.PnlCorrespondent.FindControl(this.IdCustomObjectCustomCorrespondent);

                    string idAmm = UIManager.UserManager.GetInfoUser().idAmministrazione;
                    NttDataWA.Popup.AddressBook.CorrespondentDetail addressBookCorrespondent = (NttDataWA.Popup.AddressBook.CorrespondentDetail)atList[0];

                    if (!addressBookCorrespondent.isRubricaComune)
                    {
                        corr = UIManager.AddressBookManager.GetCorrespondentBySystemId(addressBookCorrespondent.SystemID);
                    }
                    else
                    {
                        corr = UIManager.AddressBookManager.getCorrispondenteByCodRubricaRubricaComune(addressBookCorrespondent.CodiceRubrica);
                    }

                    userCorr.TxtCodeCorrespondentCustom        = corr.codiceRubrica;
                    userCorr.TxtDescriptionCorrespondentCustom = corr.descrizione;
                    userCorr.IdCorrespondentCustom             = corr.systemId;
                }

                HttpContext.Current.Session["AddressBook.At"] = null;
                HttpContext.Current.Session["AddressBook.Cc"] = null;
                this.UpdMissingRolesGrid.Update();
            }
            catch (Exception ex)
            {
                UIManager.AdministrationManager.DiagnosticError(ex);
                return;
            }
        }