/// <summary> /// Creazione oggetto MittenteSmistamento /// </summary> private DocsPAWA.DocsPaWR.MittenteSmistamento CreateMittenteSmistamento() { ProtocollazioneIngresso.Login.LoginMng loginMng = new ProtocollazioneIngresso.Login.LoginMng(this.Page); DocsPAWA.DocsPaWR.InfoUtente infoUtente = loginMng.GetInfoUtente(); DocsPAWA.DocsPaWR.Utente utente = loginMng.GetUtente(); DocsPAWA.DocsPaWR.Ruolo ruolo = loginMng.GetRuolo(); loginMng = null; DocsPAWA.DocsPaWR.MittenteSmistamento retValue = new DocsPAWA.DocsPaWR.MittenteSmistamento(); retValue.IDPeople = infoUtente.idPeople; retValue.IDAmministrazione = infoUtente.idAmministrazione; string[] registriApp = new string[ruolo.registri.Length]; for (int i = 0; i < ruolo.registri.Length; i++) { registriApp[i] = ruolo.registri[i].systemId; } retValue.RegistriAppartenenza = registriApp; registriApp = null; retValue.EMail = utente.email; retValue.IDCorrGlobaleRuolo = ruolo.systemId; retValue.IDGroup = ruolo.idGruppo; retValue.LivelloRuolo = ruolo.uo.livello; return(retValue); }
private bool RifiutaDocumento(string notaRifiuto, string IDTrasmUtente, string idTrasmissione, string idPeople) { bool retValue = false; DocsPaWR.DocsPaWebService ws = new DocsPAWA.DocsPaWR.DocsPaWebService(); if (ws.RifiutaDocumento(notaRifiuto, IDTrasmUtente, idTrasmissione, idPeople, UserManager.getRuolo(), UserManager.getInfoUtente())) { // creazione oggetto TrasmissioneUtente per la gestione del ritorno al mitt della trasm. rifiutata this.FillMittenteSmistamento(); DocsPaWR.TrasmissioneUtente objTrasmUt = new DocsPAWA.DocsPaWR.TrasmissioneUtente(); objTrasmUt.systemId = IDTrasmUtente; DocsPaWR.Utente objUtente = new DocsPAWA.DocsPaWR.Utente(); objTrasmUt.utente = objUtente; objTrasmUt.utente.idPeople = this._mittenteSmistamento.IDPeople; objTrasmUt.utente.idAmministrazione = this._mittenteSmistamento.IDAmministrazione; DocsPaWR.Ruolo objRuolo = new DocsPAWA.DocsPaWR.Ruolo(); objRuolo.systemId = this._mittenteSmistamento.IDCorrGlobaleRuolo; objTrasmUt.utente.ruoli = new DocsPAWA.DocsPaWR.Ruolo[1]; objTrasmUt.utente.ruoli[0] = objRuolo; DocsPAWA.DocsPaWR.InfoUtente infoUtente = UserManager.getInfoUtente(); retValue = ws.RitornaAlMittTrasmUt(objTrasmUt, infoUtente); } return(retValue); }
private void Page_Load(object sender, System.EventArgs e) { lblError.Text = ""; lblError.Visible = false; dst = this.Request.QueryString["dst"]; userName = this.Request.QueryString["userName"]; show = this.Request.QueryString["show"]; string message; DocsPaWR.LoginResult loginResult; utente = ExecuteLogin(out message, out loginResult); UserManager.setUtente(this, utente); //si effettua la ricerca del doc ricercando il ruolo dell'utente che ha la //visibilità su di esso if (utente != null) { switch (show) { case "login": // redirect alla pagina di scelta ruolo string script = "<script>"; script += "var popup = window.open('index.aspx?FromPortal=true','Index',"; // script += "'fullscreen=no,toolbar=no,directories=no,statusbar=no,menubar=no,resizable=yes, scrollbars=auto');"; //ie7 script += "'location=0,resizable=yes');"; script += "popup.moveTo(0,0); popup.resizeTo(screen.availWidth,screen.availHeight);popup.focus();"; script += " if(popup!=self) {window.opener=null;self.close();}"; script += "</script>"; Page.RegisterStartupScript("Index", script); break; //redirect alla visualizzazione del documento selezionato case "view": /* Viene creata la condizione IN per ricercare i ruoli che hanno visibilità * sul documento tra tutti i ruoli a cui l'utente è associato*/ CreaInString(); setVisibilitaRuolo(); tipoProto = DocumentManager.getQueryTipoProto(this, idDoc); if (!tipoProto.Equals("R")) { ricercaOggetto(); } else { //per la stampa del registro non è gestito l'acesso dal portale string msg = "Per la visualizzazione della stampa di un registro\\n \\n utilizzare l\\'applicativo di protocollo"; Response.Write("<script>alert('" + msg + "');window.parent.close();</script>"); } break; } } else { lblError.Text = message; lblError.Visible = true; } }
protected void PopolaInfoUtente() { DocsPaWR.Utente ut = new DocsPAWA.DocsPaWR.Utente(); string[] amministrazione = ((string)Session["AMMDATASET"]).Split('@'); string codiceAmministrazione = amministrazione[0]; string idAmministrazione = IdAmministrazione.ToString(); ut.codiceAmm = codiceAmministrazione; ut.idAmministrazione = idAmministrazione; ut.tipoIE = "I"; UserManager.setUtente(this, ut); DocsPaWR.Ruolo rl = new DocsPAWA.DocsPaWR.Ruolo(); rl.codiceAmm = codiceAmministrazione; rl.idAmministrazione = idAmministrazione; rl.tipoIE = "I"; rl.systemId = idAmministrazione; rl.uo = new DocsPAWA.DocsPaWR.UnitaOrganizzativa(); rl.uo.codiceRubrica = codiceAmministrazione; UserManager.setRuolo(this, rl); this.InfoUtente = UserManager.getInfoUtente(this); this.InfoUtente.idPeople = "-1"; this.InfoUtente.idGruppo = "-1"; }
public TodoListManager(DocsPAWA.DocsPaWR.Ruolo ruoloUtente, DocsPAWA.DocsPaWR.Utente infoUtente, string tipoObjTrasm, bool noWF) { this._ruoloUtente = ruoloUtente; this._infoUtente = infoUtente; this._idAmm = infoUtente.idAmministrazione; this._tipoObjTrasm = tipoObjTrasm; this._noWF = noWF; }
/// <summary> /// Page Load /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Page_Load(object sender, System.EventArgs e) { try { //----- CONTROLLO DELL'UTENTE AMMINISTRATORE CONNESSO ----------- if (Session.IsNewSession) { Response.Redirect("../Exit.aspx?FROM=EXPIRED"); } AmmUtils.WebServiceLink ws = new AmmUtils.WebServiceLink(); if (!ws.CheckSession(Session.SessionID)) { Response.Redirect("../Exit.aspx?FROM=ABORT"); } // --------------------------------------------------------------- this.Response.Expires = -1; if (!IsPostBack) { try { this.from.Value = this.Request.QueryString["from"].ToString(); this.LoadDettagliRegistri(); } catch { this.GUI("ResetAll"); } } //Gestione atipicità string[] amministrazione = ((string)Session["AMMDATASET"]).Split('@'); string codiceAmministrazione = amministrazione[0]; string idAmm = this.Request.QueryString["idAmm"].ToString(); DocsPaWR.Utente ut = new DocsPAWA.DocsPaWR.Utente(); ut.codiceAmm = codiceAmministrazione; ut.idAmministrazione = idAmm; ut.tipoIE = "I"; Session.Add("userData", ut); if (Utils.GetAbilitazioneAtipicita()) { this.cb_atipicita.Visible = true; } else { this.cb_atipicita.Visible = false; } } catch { this.GUI("ResetAll"); } }
/// <summary> /// Tasto elimina /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btn_elimina_Click(object sender, EventArgs e) { string dataImpostata = string.Empty; DocsPAWA.DocsPaWR.Ruolo ruoloUtente = UserManager.getRuolo(this); DocsPAWA.DocsPaWR.Utente infoUtente = UserManager.getUtente(this); DocsPaWR.EsitoOperazione esito = new DocsPAWA.DocsPaWR.EsitoOperazione(); try { if (!this.calendar.txt_Data.Text.Equals(string.Empty)) { if (!Utils.isDate(this.calendar.txt_Data.Text)) { openAlertJS("inserire una data valida"); return; } else { dataImpostata = this.calendar.txt_Data.Text; } } else { if (this.hd_functionEnabled.Equals("Y")) { dataImpostata = this.hd_dataSistema.Value; } else { openAlertJS("inserire una data valida"); return; } } xdatePost = Convert.ToDateTime(dataImpostata, format); dataImpostata = xdatePost.ToShortDateString(); TodoList.TodoListManager manager = new TodoListManager(ruoloUtente, infoUtente, this.hd_tipoObjTrasm.Value, this.chk_noWF.Checked); DocsPAWA.DocsPaWR.FiltroRicerca[] filter = DocumentManager.getFiltroRicTrasm(this); esito = manager.svuotaTDL(dataImpostata, filter); if (esito.Codice > 0) { openAlertJS(esito.Descrizione); Session.Remove("data"); } else { ClientScript.RegisterStartupScript(this.GetType(), "endJS", "<script>window.returnValue = 'Y'; window.close();</script>"); } } catch { openAlertJS("si è verificato un errore nel sistema"); } }
public void FillDestinatariDefault(DocsPAWA.DocsPaWR.Ruolo ruolo, DocsPaWR.Utente utente, DocsPaWR.InfoUtente infoUtente) { this._ruolo = ruolo; this._utente = utente; this._infoUtente = infoUtente; this.FillMittenteSmistamento(); this.FillUO(); }
private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here if (!IsPostBack) { utente = UserManager.getUtente(this); ruolo = UserManager.getRuolo(this); caricaValoriRuoli(ruolo); caricaUtentiInRuolo(ruolo.codiceRubrica, utente.systemId); } }
private DocsPAWA.DocsPaWR.Utente ExecuteLogin(out string message, out DocsPAWA.DocsPaWR.LoginResult loginResult) { message = ""; DocsPaWR.UserLogin userLogin; DocsPaWR.Utente utente = UserManager.LoginBatch(this.Session.SessionID, userName, dst, out loginResult, out userLogin); oldLoginResult = loginResult; switch (loginResult) { // L'utente si è connesso regolarmente case DocsPAWA.DocsPaWR.LoginResult.OK: Session["userData"] = utente; break; case DocsPAWA.DocsPaWR.LoginResult.UNKNOWN_USER: message = "Nome o password errati"; break; case DocsPAWA.DocsPaWR.LoginResult.USER_ALREADY_LOGGED_IN: string loginMode = null; try { loginMode = ConfigSettings.getKey(ConfigSettings.KeysENUM.ADMINISTERED_LOGIN_MODE); } catch (Exception) {} if (loginMode == null || loginMode.ToUpper() == Boolean.TrueString.ToUpper()) { // Gestione tramite tool di amministrazione Session["AdminMode"] = true; message = "L'utente ha gia' una connessione aperta. Contattare l'amministrazione."; } else { Session.Add("loginData", userLogin); utente = UserManager.ForcedLogin(this, userLogin, out loginResult); } break; default: // Application Error message = "Errore nella procedura di Login. Contattare l'amministrazione."; break; } return(utente); }
private void btn_salva_Click(object sender, System.EventArgs e) { trasmissione = TrasmManager.getGestioneTrasmissione(this); m_hashTableRuoliSup = TrasmManager.getHashRuoliSup(this); m_hashTableUtenti = TrasmManager.getHashUtenti(this); if (trasmissione != null) { ruolo = (DocsPAWA.DocsPaWR.Ruolo)m_hashTableRuoliSup[this.ddl_ruolo.SelectedIndex]; utente = (DocsPAWA.DocsPaWR.Utente)m_hashTableUtenti[this.ddl_utente.SelectedIndex]; } trasmissione.ruolo = ruolo; trasmissione.utente = utente; TrasmManager.setGestioneTrasmissione(this, trasmissione); Response.Write("<script>var k=window.opener.document.forms[0].submit(); window.close();</script>"); }
private void Initialize(DocsPAWA.DocsPaWR.Ruolo ruolo, DocsPaWR.Utente utente, DocsPaWR.InfoUtente infoUtente, string docNumber) { this._ruolo = ruolo; this._utente = utente; this._infoUtente = infoUtente; this.FillMittenteSmistamento(); if (docNumber != null && docNumber.Equals(string.Empty)) { // caricamento dei system_id di tutte le trasmissioni ricevute dall'utente // Se sono stati impostati i filtri in todolist sulle trasmissioni, // vengono applicati anche nel reperimento dei dati dello smistamento DocsPaWR.FiltroRicerca[] filtriRicerca = null; if (ricercaTrasm.DialogFiltriRicercaTrasmissioni.CurrentFilters != null) { filtriRicerca = ricercaTrasm.DialogFiltriRicercaTrasmissioni.CurrentFilters; } this.FillArrayDocumentiTrasmessi(filtriRicerca); } else { DocsPaWR.DatiTrasmissioneDocumento datiDoc = new DocsPAWA.DocsPaWR.DatiTrasmissioneDocumento(); datiDoc.IDDocumento = docNumber; this._datiDocumentiTrasmessi = new ArrayList(); this._datiDocumentiTrasmessi.Add(datiDoc); datiDoc = null; } // posizionamento sul primo documento in lista if (this.GetDocumentCount() > 0) { this.MoveFirstDocument(); } // lettura UO (destinazione) this.FillUO(); }
/// <summary> /// Creazione di un nuovo oggetto SchedaDocumento /// </summary> /// <returns></returns> public void CreaNuovoDocumento(string tipoProto) { DocsPAWA.DocsPaWR.SchedaDocumento retValue = new DocsPAWA.DocsPaWR.SchedaDocumento(); retValue.predisponiProtocollazione = true; // Tipologia protocollo in "Arrivo" //retValue.tipoProto="A"; // OLD ProtocollazioneIngresso.Login.LoginMng loginMng = new ProtocollazioneIngresso.Login.LoginMng(this._page); DocsPAWA.DocsPaWR.Utente utente = loginMng.GetUtente(); DocsPAWA.DocsPaWR.Ruolo ruolo = loginMng.GetRuolo(); retValue.systemId = null; retValue.oggetto = new DocsPAWA.DocsPaWR.Oggetto(); // campi obbligatori per DocsFusion retValue.idPeople = utente.idPeople; retValue.userId = utente.userId; retValue.typeId = DocsPAWA.DocumentManager.getTypeId(); retValue.appId = "ACROBAT"; retValue.privato = "0"; // doc non privato //this.SetDocumentoCorrente(retValue); // OLD if (tipoProto.Equals("A")) { setDatiProtocolloIngresso(retValue); } else { if (tipoProto.Equals("P")) { setDatiProtocolloUscita(retValue); } } }
private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here try { schedaDocumento = DocumentManager.getDocumentoSelezionato(this); userHome = UserManager.getUtente(this); userRuolo = UserManager.getRuolo(this); if (schedaDocumento != null) { if (!IsPostBack) { queryTrasmissioni(); for (int i = 0; i < listaTrasmissioni.Length; i++) { CaricaDataGrid((DocsPAWA.DocsPaWR.Trasmissione)listaTrasmissioni[i], i); } if (listaTrasmissioni.Length > 0) { this.Datagrid2.DataSource = this.dataSetTrasmXRisp1; Session["dataSetTrasmXrisp"] = this.dataSetTrasmXRisp1; dv = this.dataSetTrasmXRisp1.Tables[0].DefaultView; this.Datagrid2.DataBind(); } else { this.lbl_message.Text = "Non sono state trovate trasmissioni"; this.btn_ok.Visible = false; } } } } catch (Exception ex) { ErrorManager.redirect(this, ex); } }
private bool getRagTrasmissioneUfficioReferente() { bool retValue = true; bool verificaRagioni; trasmissione = TrasmManager.getGestioneTrasmissione(this); utente = UserManager.getUtente(this); ruolo = UserManager.getRuolo(this); //se è null la trasmissione è nuova altrimenti è in modifica if (trasmissione == null) { trasmissione = new DocsPAWA.DocsPaWR.Trasmissione(); trasmissione.systemId = null; trasmissione.ruolo = ruolo; trasmissione.utente = utente; trasmissione.tipoOggetto = DocsPAWA.DocsPaWR.TrasmissioneTipoOggetto.FASCICOLO; trasmissione.infoDocumento = null; trasmissione.infoFascicolo = FascicoliManager.getInfoFascicoloDaFascicolo(FascicoliManager.getFascicoloSelezionato(this), this); TrasmManager.setGestioneTrasmissione(this, trasmissione); } DocsPaWR.RagioneTrasmissione ragTrasm = null; ragTrasm = FascicoliManager.TrasmettiFascicoloToUoReferente(ruolo, out verificaRagioni); if (ragTrasm == null && !verificaRagioni) { retValue = false; } else { TrasmManager.setRagioneSel(this, ragTrasm); } return(retValue); }
protected void Page_Load(object sender, EventArgs e) { // Distruzione della response this.Response.Expires = -1; // L'id del gruppo cui appartiene l'utente che // ha richiesto la creazione del link string groupId; // Il numero del documento da visualizzare string docNumber = string.Empty; // Il system id del documento da visualizzare string idProfile = string.Empty; // Prelevamento dalla query string del docNumber, dell'idProfile // e del groupId docNumber = Request["docNumber"]; idProfile = Request["idProfile"]; groupId = Request["groupId"]; // Verifica della correttezza dei parametri. In particolare non // possono essere nulli sia idProfile che docNumber e deve essere // presente groupId if ((!(String.IsNullOrEmpty(docNumber) && String.IsNullOrEmpty(idProfile)))) { // Si prova a prelevare l'utente attualmente loggato try { userHome = UserManager.getUtente(); } catch (Exception ex) { // ...se si sono verificati errori si considera // l'utente come non loggato... userHome = null; } // ...se l'utente non è loggato... if (userHome == null) { // ...si crea il link alla pagina di login... string lgnPage = Utils.getHttpFullPath(this) + "/login.aspx?" + Request.QueryString.ToString(); // ...e si immerge uno script per l'apertura della pagina di login string scriptString = String.Format("redirectToLogin('{0}');", lgnPage); ClientScript.RegisterStartupScript(this.GetType(), "redLogin", scriptString, true); } else { if (string.IsNullOrEmpty(groupId)) { groupId = UserManager.getInfoUtente().idGruppo; } // ...altrimenti si visualizza il documento richiesto this.visualizzaDocumento(docNumber, idProfile, Request["numVersion"], Request["isAttachement"], groupId); } } else { // In caso di mancanza di parametri viene visualizzato un messaggio di errore this.ltlMessage.Text = "Alcuni parametri non sono validi."; } }
/// <summary> /// Caricamento dei dati utilizzabili per la stampa dell'etichetta /// in un'insieme di campi testo nascosti /// </summary> /// <param name="schedaDocumento"></param> private void FillCampiEtichetta(DocsPAWA.DocsPaWR.SchedaDocumento schedaDocumento, string txt_num_stampe) { string abilita_multi_stampa_etichetta = DocsPAWA.utils.InitConfigurationKeys.GetValue("0", "FE_MULTI_STAMPA_ETICHETTA"); #region parametro Dispositivo Di Stampa //if(ConfigSettings.getKey(ConfigSettings.KeysENUM.DISPOSITIVO_STAMPA)!=null) //{ // this.hd_dispositivo.Value=ConfigSettings.getKey(ConfigSettings.KeysENUM.DISPOSITIVO_STAMPA); //} //else //{ // this.hd_dispositivo.Value="Penna"; //} //this.hd_modello_dispositivo.Value = ConfigSettings.getKey(ConfigSettings.KeysENUM.MODELLO_DISPOSITIVO_STAMPA); AmmUtils.WebServiceLink ws = new AmmUtils.WebServiceLink(); var dispositivoStampaUtente = ws.AmmGetDispositivoStampaUtente(UserManager.getInfoUtente().idPeople); if (dispositivoStampaUtente != null) { this.hd_dispositivo.Value = "Etichette"; this.hd_modello_dispositivo.Value = dispositivoStampaUtente.ToString(); } else { this.hd_dispositivo.Value = "Penna"; } #endregion parametro Dispositivo Di Stampa #region parametro Descrizione Amministrazione string descAmm = getDescAmministrazione(this.GetLoginManager().GetUtente().idAmministrazione); #endregion parametro Descrizione Amministrazione #region parametro Classifica Primaria string classificaPrimaria = String.Empty; string classificazioneInEtichetta = System.Configuration.ConfigurationManager.AppSettings["StampaClassificazioneInEtichetta"]; if (classificazioneInEtichetta != null) { switch (classificazioneInEtichetta) { case "1": // stampa il codice classifica In Etichetta classificaPrimaria = getClassificaPrimaria(); break; default: //massimo digregorio, non necessario se l'assegnazione avviene in dichiarazione. old: classificaPrimaria = String.Empty; break; } } this.hd_classifica.Value = classificaPrimaria; #endregion parametro Classifica Primaria #region parametro Fascicolo primario string fascicoloInEtichetta = System.Configuration.ConfigurationManager.AppSettings["StampaFascicoloInEtichetta"]; if (fascicoloInEtichetta != null) { switch (fascicoloInEtichetta) { case "1": // stampa il codice fascicolo In Etichetta this.hd_fascicolo.Value = this.GetCodiceFascicolo(); break; default: this.hd_fascicolo.Value = String.Empty; break; } } #endregion parametro Fascicolo primario #region patch per cuneo string descAmministrInEtichetta = System.Configuration.ConfigurationManager.AppSettings["StampaDescrizioneAmministrazioneInEtichetta"]; if (descAmministrInEtichetta != null) { switch (descAmministrInEtichetta) { case "1": // Stampa Descrizione Amministrazione In Etichetta this.hd_amministrazioneEtichetta.Value = descAmm; break; default: this.hd_amministrazioneEtichetta.Value = String.Empty; break; } } //aggiuto tag Hidden "hd_desAmministrazione" per ActiveX di stampa /* se parametro esiste ed a 0, a hd_desAmministrazione viene assegnata la classifica * se parametro non esiste o esiste <> 0, a hd_desAmministrazione viene assegnata la descrizione dell'amministrazione */ bool BarCodeConAmministrazione = true; DocsPAWA.DocsPaWR.Configurazione visualizzaClassificaSopraBarCode = UserManager.getParametroConfigurazione(this.Page); if (visualizzaClassificaSopraBarCode != null) { if (visualizzaClassificaSopraBarCode.valore.Equals("0")) { BarCodeConAmministrazione = false; } } if (BarCodeConAmministrazione) { this.hd_descrizioneAmministrazione.Value = descAmm; } else { this.hd_descrizioneAmministrazione.Value = classificaPrimaria; } #endregion patch per cuneo #region parametro URL File di configurazione Dispositivo di Stampa this.hd_UrlIniFileDispositivo.Value = ConfigSettings.getKey(ConfigSettings.KeysENUM.URL_INIFILE_DISPOSITIVO_STAMPA); #endregion parametro URL File di configurazione Dispositivo di Stampa #region parametri scheda Documento this.hd_signature.Value = schedaDocumento.protocollo.segnatura; this.hd_num_doc.Value = schedaDocumento.docNumber; this.hd_dataCreazione.Value = schedaDocumento.dataCreazione; this.hd_codiceUoCreatore.Value = schedaDocumento.creatoreDocumento.uo_codiceCorrGlobali; //CAMBIA l'ETICHETTA PER LA STAMPA A SECONDA DEL VALORE SETTATO IN AMMINISTRAZIONE DocsPAWA.DocsPaWR.InfoUtente infoUser = new DocsPAWA.DocsPaWR.InfoUtente(); DocsPAWA.DocsPaWR.Utente utente = DocsPAWA.UserManager.getUtente(); DocsPAWA.DocsPaWR.DocsPaWebService wws = new DocsPAWA.DocsPaWR.DocsPaWebService(); DocsPAWA.DocsPaWR.EtichettaInfo[] eti = wws.getEtichetteDocumenti(infoUser, utente.idAmministrazione); if (schedaDocumento.tipoProto.Equals("A")) { this.hd_tipo_proto.Value = eti[0].Descrizione; } else { if (schedaDocumento.tipoProto.Equals("P")) { this.hd_tipo_proto.Value = this.hd_tipo_proto.Value = eti[1].Descrizione; } else { this.hd_tipo_proto.Value = this.hd_tipo_proto.Value = eti[2].Descrizione; } } //this.hd_tipo_proto.Value = schedaDocumento.tipoProto; this.hd_coduo_proto.Value = String.Empty; //è gestito sul db e sull'oggetto ruolo utente attuale, ma non nell'oggetto schedaDocumento; if (schedaDocumento.registro != null) { this.hd_codreg_proto.Value = schedaDocumento.registro.codRegistro; this.hd_descreg_proto.Value = schedaDocumento.registro.descrizione; } if (schedaDocumento.protocollo != null) { //Celeste //this.hd_num_proto.Value = schedaDocumento.protocollo.numero; this.hd_num_proto.Value = Utils.formatProtocollo(schedaDocumento.protocollo.numero); //Fine Celeste this.hd_anno_proto.Value = schedaDocumento.protocollo.anno; if (abilita_multi_stampa_etichetta.Equals("1")) { this.hd_data_proto.Value = Utils.dateLength(schedaDocumento.protocollo.dataProtocollazione); } else if (schedaDocumento.oraCreazione != null && schedaDocumento.oraCreazione != "") { this.hd_data_proto.Value = Utils.dateLength(schedaDocumento.protocollo.dataProtocollazione) + " " + Utils.timeLength(schedaDocumento.oraCreazione); } else { this.hd_data_proto.Value = Utils.dateLength(schedaDocumento.protocollo.dataProtocollazione); } //massimo digregorio new: if (schedaDocumento.protocollatore != null) { this.hd_coduo_proto.Value = schedaDocumento.protocollatore.uo_codiceCorrGlobali; } } if (!string.IsNullOrEmpty(schedaDocumento.oraCreazione)) { this.hd_ora_creazione.Value = Utils.timeLength(schedaDocumento.oraCreazione); this.hd_ora_creazione.Value = this.hd_ora_creazione.Value.Substring(0, 5); } #endregion parametri scheda Documento #region stampa multipla etichetta //preparo gli attributi per il numero di stampe effettuate finora e da effettuare ora if (abilita_multi_stampa_etichetta.Equals("1")) { if (!string.IsNullOrEmpty(txt_num_stampe)) { this.hd_num_stampe.Value = txt_num_stampe; } else { this.hd_num_stampe.Value = "1"; } // recupero il valore di stampa corrente da inserire nella successiva etichetta da stampare int num_stampe_eff; if (!String.IsNullOrEmpty(schedaDocumento.protocollo.stampeEffettuate)) { num_stampe_eff = Convert.ToInt32(schedaDocumento.protocollo.stampeEffettuate) + 1; this.hd_num_stampe_effettuate.Value = num_stampe_eff.ToString(); } else { this.hd_num_stampe_effettuate.Value = "1"; } } else { this.hd_num_stampe.Value = "1"; this.hd_num_stampe_effettuate.Value = "1"; } #endregion stampa multipla etichetta #region parametri Allegati (a partire dalla versione 3.5.0) this.hd_numeroAllegati.Value = schedaDocumento.allegati.Length.ToString(); #endregion }
/// <summary> /// PAGE LOAD /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Page_Load(object sender, System.EventArgs e) { Utils.startUp(this); this.Response.Expires = -1; if (!this.IsPostBack) { // Impostazione contesto chiamante this.SetContext(); } FascicoliManager.removeMemoriaFascicoloSelezionato(this); FascicoliManager.removeMemoriaFolderSelezionata(this); // menù DOCUMENTI this.menuDoc.MenuPosLeft = 133; // menù RICERCA this.menuRic.MenuPosLeft = 224; // menù GESTIONE this.menuGest.MenuPosLeft = 315; // menù OPZIONI this.menuConf.MenuPosLeft = 406; // menù HELP // this.menuHelp.MenuPosLeft = 497; // disabilitazione dei pulsanti this.btn_doc.Enabled = false; this.btn_search.Enabled = false; this.btn_gest.Enabled = false; this.btn_config.Enabled = false; this.btn_help.Enabled = false; // abilitazione dei pulsanti in base al ruolo ricoperto dall'utente userRuolo = (DocsPAWA.DocsPaWR.Ruolo)Session["userRuolo"]; if (userRuolo != null) { this.enableFunction(); } if (IsPostBack) { UserManager.disabilitaVociMenuNonAutorizzate(this); this.checkChiaviWebConfig(); } else { // gestione label dati utente in alto a DX userHome = UserManager.getUtente(this); infoUt = UserManager.getInfoUtente(); //Gestione in caso di deleghe if (infoUt.delegato != null) { userHomeDelegato = UserManager.getUtenteDelegato(); if (userHomeDelegato != null) { if (userHomeDelegato.descrizione != "" || userHomeDelegato.descrizione != null) { this.lbl_info_utente.Text = userHomeDelegato.descrizione + " "; } } if (userHome != null) { this.lbl_info_utente.Text += "<br>Delegato da " + userHome.descrizione + " "; } if (userRuolo != null) { this.lbl_info_utente.Text += "<br>" + userRuolo.descrizione + " "; } } else { if (userHome != null) { if (userHome.descrizione != "" || userHome.descrizione != null) { this.lbl_info_utente.Text = userHome.descrizione + " "; } } if (userRuolo != null) { this.lbl_info_utente.Text += "<br>" + userRuolo.descrizione + " "; } } if (UserManager.ruoloIsAutorized(this, "GEST_ARCHIVIA")) { this.lbl_info_utente.Text += "<br> AREA DEPOSITO "; } } Page.DataBind(); //Modifica frezza + fabio etichette protocolli getLettereProtocolli(); foreach (docsPaMenu.myLink itm in menuDoc.Links) { if (itm.Key == "PROTO_INGRESSO_SEMPLIFICATO") { itm.Text = eti_prot_ingresso; } if (itm.Key == "PROTO_USCITA_SEMPLIFICATO") { itm.Text = eti_prot_partenza; } } }
public void ExecuteForcedLogin() { try { DocsPaWR.UserLogin lgn = new DocsPAWA.DocsPaWR.UserLogin(); /* Integrazione IAM*/ string policyAgent = null; policyAgent = ConfigSettings.getKey(ConfigSettings.KeysENUM.POLICY_AGENT_ENABLED); if ((policyAgent != null && policyAgent.ToUpper() == Boolean.TrueString.ToUpper())) { vic.Integra VIC = new vic.Integra(Context, ""); lgn.UserName = VIC.amData.account.ToString(); lgn.Token = VIC.amData.account.ToString() + '&' + VIC.amData.codFiscale.ToString() + '&' + VIC.amData.matricola.ToString(); string appo = VIC.amData.account.ToString() + "&" + ConfigSettings.getKey(ConfigSettings.KeysENUM.CHIAVE_TOKEN).ToString() + '&' + VIC.amData.codFiscale.ToString() + '&' + VIC.amData.matricola.ToString(); byte[] bt_datiInput = ASCIIEncoding.ASCII.GetBytes(appo); lgn.Token = lgn.Token + '&' + DocsPaUtils.Security.CryptographyManager.CalcolaImpronta(bt_datiInput); if (String.IsNullOrEmpty(VIC.amData.account.ToString()) || String.IsNullOrEmpty(VIC.amData.codFiscale.ToString()) || String.IsNullOrEmpty(VIC.amData.matricola.ToString())) { this.ErrorMessage = this.ErrorMessage = INCORRECT_DATA_FORMAT_ACCESS_MANAGER; return; } } else { lgn.UserName = UserId; lgn.Password = UserPwd; } /*fine Integrazione IAM*/ lgn.IdAmministrazione = IdAmministrazione; DocsPaWR.LoginResult loginResult; utente = UserManager.ForcedLogin(this.Page, lgn, out loginResult); switch (loginResult) { case DocsPAWA.DocsPaWR.LoginResult.OK: ErrorMessage = null; break; case DocsPAWA.DocsPaWR.LoginResult.UNKNOWN_USER: ErrorMessage = UNKNOWN_USER_MSG; pgType = PageType.authentication; break; case DocsPAWA.DocsPaWR.LoginResult.USER_ALREADY_LOGGED_IN: ErrorMessage = USER_ALREADY_LOGGED_MSG; string loginMode = null; try { loginMode = ConfigSettings.getKey(ConfigSettings.KeysENUM.ADMINISTERED_LOGIN_MODE); } catch (Exception) {} if (loginMode == null || loginMode.ToUpper() == Boolean.TrueString.ToUpper()) { // Gestione tramite tool di amministrazione pgType = PageType.authentication; } else { ErrorMessage = USER_ALREADY_LOGGED_ASK_FOR_FORCE_MSG; pgType = PageType.choice; } break; case DocsPAWA.DocsPaWR.LoginResult.DISABLED_USER: ErrorMessage = DISABLED_USER_MSG; pgType = PageType.authentication; break; case DocsPAWA.DocsPaWR.LoginResult.NO_RUOLI: ErrorMessage = USER_WITH_NO_RULE_MSG; pgType = PageType.authentication; break; default: // Application Error ErrorMessage = GENERIC_ERROR_MSG; pgType = PageType.authentication; break; } } catch (Exception) { ErrorMessage = GENERIC_ERROR_MSG; pgType = PageType.authentication; } if (utente == null) { AddToSession(); } else { if (utente.ruoli.Length > 0) { utente.ruoli[0].selezionato = true; } UserManager.setUtente(this.Page, utente); //Session["userData"] = utente; UserManager.setRuolo(this.Page, utente.ruoli[0]); if (utente.ruoli[0].registri != null && utente.ruoli[0].registri.Length > 0) { UserManager.setRegistroSelezionato(this.Page, utente.ruoli[0].registri[0]); } this.GoToHomePage(); } }
private void Page_Load(object sender, System.EventArgs e) { try { Session["Bookmark"] = "RicercaDoc"; Utils.startUp(this); // Put user code to initialize the page here userHome = (DocsPAWA.DocsPaWR.Utente)Session["userData"]; userRuolo = (DocsPAWA.DocsPaWR.Ruolo)Session["userRuolo"]; if (!string.IsNullOrEmpty(System.Configuration.ConfigurationManager.AppSettings["VISUALIZZA_RICERCHE_GRIGI"])) { this.ricercaGrigi = System.Configuration.ConfigurationManager.AppSettings["VISUALIZZA_RICERCHE_GRIGI"]; } else { this.ricercaGrigi = "0"; } //nuova gestione rimozione sessione scheda DocumentManager.removeDocumentoInLavorazione(this); //rimuovo oggetto delle ricerche salvate // ogni qualvolta cambio contesto if ((IsPostBack) && Session["itemUsedSearch"] != null) { Session.Remove("itemUsedSearch"); } string nomeTab = "estesa"; if (Request.QueryString["tab"] != string.Empty && Request.QueryString["tab"] != null) { nomeTab = Request.QueryString["tab"].ToString(); } CaricaTab(nomeTab); //nascondo il tab stampa registro if (Request.QueryString["ricADL"] != string.Empty && Request.QueryString["ricADL"] != null) { btn_StampaReg.Enabled = false; btn_StampaReg.ImageUrl = "../App_Themes/ImgComuni/tab_disattivo.gif"; btn_StampaRep.Enabled = false; btn_StampaRep.ImageUrl = "../App_Themes/ImgComuni/tab_disattivo.gif"; } //Rimuovo l'eventuale fascicolo selezionato per la fascicolazione rapida if (IsPostBack) { FascicoliManager.removeFascicoloSelezionatoFascRapida(this); } if (!Utils.isEnableRepertori(userRuolo.idAmministrazione)) { btn_StampaRep.Enabled = false; btn_StampaRep.ImageUrl = "../App_Themes/ImgComuni/tab_disattivo.gif"; } if (!IsPostBack) { if (String.IsNullOrEmpty(Request["gridPer"])) { Session.Remove("itemUsedSearch"); } DocumentManager.removeFiltroRicDoc(this); } } catch (System.Exception ex) { ErrorManager.redirect(this, ex); } }
private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here fascicolo = FascicoliManager.getFascicoloSelezionato(this); if (fascicolo == null) { Response.Write("<SCRIPT>top.principale.iFrame_dx.iFrame_cn.document.location='../blank_page.htm';</SCRIPT>"); return; } //Profilazione dinamica fascicoli if (System.Configuration.ConfigurationManager.AppSettings["ProfilazioneDinamicaFasc"] != null && System.Configuration.ConfigurationManager.AppSettings["ProfilazioneDinamicaFasc"] == "1" && fascicolo.tipo.Equals("P")) { pnl_profilazione.Visible = true; if (fascicolo.template != null) { txt_tipoFasc.Text = fascicolo.template.DESCRIZIONE;; fascicolo.template = ProfilazioneFascManager.getTemplateFascDettagli(fascicolo.systemID, this); FascicoliManager.setFascicoloSelezionato(fascicolo); } } //Fine Profilazione dinamica fascicoli userRuolo = UserManager.getRuolo(this); userHome = UserManager.getUtente(this); infoUt = UserManager.getInfoUtente(this); if (!Page.IsPostBack) { HashFolder = new Hashtable(); if (this.Page.Session["fascDettagliFasc.nodoSelezionato"] == null) { this.Page.Session["fascDettagliFasc.nodoSelezionato"] = getSelectedNodeFolder(); } setInfoFascicolo(); } else { this.Page.Session.Remove("fascDettagliFasc.nodoSelezionato"); HashFolder = FascicoliManager.getHashFolder(this); } //selezionaUltimoNodoSelezionato(); //controllo se devo creare una nuova cartella if (Session["descNewFolder"] != null) { DocsPAWA.DocsPaWR.ResultCreazioneFolder result; if (!this.CreateNewFolder(out result)) { // Visualizzazione messaggio di errore string errorMessage = string.Empty; if (result == DocsPAWA.DocsPaWR.ResultCreazioneFolder.FOLDER_EXIST) { errorMessage = "Il sottofascicolo richiesto è già presente e non può essere duplicato"; } else { errorMessage = "Errore nella creazione del sottofascicolo"; } Response.Write(string.Format("<script>alert('{0}');</script>", errorMessage)); } Session.Remove("descNewFolder"); } //Seleziono il folder selezionato da ricerca sottofascicolo if (hd_returnValueModal.Value == "Y") //ritorno dalla modale di ricerca dei sottofascicoli { SelezionaSottofascicolo(); } else { selezionaUltimoNodoSelezionato(); } Folders.SelectExpands = true; if (enableUfficioRef) { this.pnl_uffRef.Visible = true; if (fascicolo.ufficioReferente != null) { DocsPaWR.Corrispondente corrRef = UserManager.getCorrispondenteBySystemID(this, fascicolo.ufficioReferente.systemId); this.txt_cod_uff_ref.Text = corrRef.codiceRubrica; this.txt_desc_uff_ref.Text = corrRef.descrizione; fascicolo.ufficioReferente = corrRef; FascicoliManager.setFascicoloSelezionato(this, fascicolo); // trasmetti a UO referente solo se vengo da nuovo fascicolo //se vengo dal dettaglio del fascicolo la trasmissione non deve partire if (Request.QueryString["newFasc"] != null && this.Request.QueryString["newFasc"].ToString().Equals("1")) { //effettuo la trasmissione dopo la creazione di un nuovo fascicolo(provendo da doc classifica) //Invia la trasmissione ai ruoli di riferimento dell'Ufficio Referente if (!getRagTrasmissioneUfficioReferente()) { string theAlert = "<script>alert('Attenzione! Ragione di trasmissione assente per l\\'Ufficio referente."; theAlert = theAlert + "\\nLa trasmissione non è stata effettuata.');</script>"; Response.Write(theAlert); } else { string esito = setCorrispondentiTrasmissione(); if (!esito.Equals("")) { esito = esito.Replace("'", "''"); Page.RegisterStartupScript("chiudi", "<script>alert('" + esito + "')</script>"); esito = ""; } else { //richiamo il metodo che salva la trasmissione DocsPAWA.DocsPaWR.InfoUtente infoUtente = UserManager.getInfoUtente(); if (infoUtente.delegato != null) { trasmissione.delegato = ((DocsPAWA.DocsPaWR.InfoUtente)(infoUtente.delegato)).idPeople; } //Nuovo metodo saveExecuteTrasm trasmissione.daAggiornare = false; DocsPaWR.Trasmissione trasm_res = TrasmManager.saveExecuteTrasm(this, trasmissione, infoUtente); //trasmissione = TrasmManager.saveTrasm(this, trasmissione); //trasmissione.daAggiornare = false; //DocsPaWR.Trasmissione trasm_res = TrasmManager.executeTrasm(this,trasmissione); if (trasm_res != null && trasm_res.ErrorSendingEmails) { Response.Write("<script>window.alert('Non è stato possibile inoltrare una o più e-mail. \\nContattare l\\'amministratore per risolvere il problema.');</script>"); } } } //rimozione variabili di sessione TrasmManager.removeGestioneTrasmissione(this); TrasmManager.removeRagioneSel(this); FascicoliManager.removeUoReferenteSelezionato(this); // FascicoliManager.removeFascicoloSelezionato(this); //Rimuovo la variabile di sessione dopo la trasmissione } } } else { this.pnl_uffRef.Visible = false; } //Session.Remove("newFasc"); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_Insert_Click(object sender, System.EventArgs e) { try { bool tuttoOk = true; this.newCorr = new DocsPAWA.DocsPaWR.Corrispondente(); this.parentCorr = UserManager.getParentCorr(this); DocsPaWR.Corrispondente insCorr = new DocsPAWA.DocsPaWR.Corrispondente(); //creo l'oggetto canale DocsPaWR.Canale canale = new DocsPAWA.DocsPaWR.Canale(); canale.systemId = this.dd_canpref.SelectedItem.Value; //inserisco campi switch (this.ddl_tipoCorr.SelectedItem.Value) { case "U": { if (this.parentCorr == null || (this.parentCorr != null && ((DocsPAWA.DocsPaWR.UnitaOrganizzativa)parentCorr).tipoIE.Equals("E"))) { if (this.txt_descr.Text != null && !this.txt_descr.Text.Equals("")) { if ((this.txt_telefono1 == null || this.txt_telefono1.Text.Equals("")) && !(this.txt_telefono2 == null || this.txt_telefono2.Text.Equals(""))) { Response.Write("<script language='javascript'>window.alert(\"Attenzione, inserire il campo telefono princ.\");</script>"); tuttoOk = false; } else if (this.txt_cap != null && !this.txt_cap.Text.Equals("") && this.txt_cap.Text.Length != 5) { Response.Write("<script language='javascript'>window.alert(\"Attenzione, il campo CAP deve essere di 5 cifre\");</script>"); tuttoOk = false; } else if (this.txt_cap != null && !this.txt_cap.Text.Equals("") && !Utils.isNumeric(this.txt_cap.Text)) { Response.Write("<script language='javascript'>window.alert(\"Attenzione, il campo CAP deve un numero\");</script>"); tuttoOk = false; } else if (this.txt_provincia != null && !this.txt_provincia.Text.Equals("") && this.txt_provincia.Text.Length != 2) { Response.Write("<script language='javascript'>window.alert(\"Attenzione, il campo provincia deve essere di 2 cifre\");</script>"); tuttoOk = false; } else if (this.txt_provincia != null && !this.txt_provincia.Text.Equals("") && !Utils.isCorrectProv(this.txt_provincia.Text)) { Response.Write("<script language='javascript'>window.alert(\"Attenzione, il campo provincia non è corretto\");</script>"); tuttoOk = false; } else { DocsPaWR.UnitaOrganizzativa new_UO = new DocsPAWA.DocsPaWR.UnitaOrganizzativa(); new_UO.codiceCorrispondente = this.txt_codCorr.Text; new_UO.codiceRubrica = this.txt_codRub.Text; new_UO.descrizione = this.txt_descr.Text; new_UO.idAmministrazione = UserManager.getInfoUtente(this).idAmministrazione; new_UO.idRegistro = UserManager.getRegistroSelezionato(this).systemId; //UserManager.getListaIdRegistriUtente(this)[0]; new_UO.tipoCorrispondente = this.ddl_tipoCorr.SelectedItem.Value; new_UO.email = this.txt_email.Text; new_UO.canalePref = canale; new_UO.codiceAmm = txt_codAmm.Text; new_UO.codiceAOO = txt_codAOO.Text; if ((this.txt_indirizzo.Text != null && !this.txt_indirizzo.Equals("")) || (this.txt_cap.Text != null && !this.txt_cap.Equals("")) || (this.txt_citta.Text != null && !this.txt_citta.Equals("")) || (this.txt_provincia.Text != null && !this.txt_provincia.Equals("")) || (this.txt_nazione.Text != null && !this.txt_nazione.Equals("")) || (this.txt_telefono1.Text != null && !this.txt_telefono1.Equals("")) || (this.txt_telefono2 != null && !this.txt_telefono2.Equals("")) || (this.txt_fax.Text != null && !this.txt_fax.Equals("")) || (this.txt_codfisc.Text != null && !this.txt_codfisc.Equals("")) || (this.txt_note.Text != null && !this.txt_note.Equals("")) || (this.txt_local.Text != null && !this.txt_local.Equals(""))) { new_UO.info = insertDettagli(); new_UO.dettagli = true; } insCorr = UserManager.addressbookInsertCorrispondente(this, new_UO, this.parentCorr); } } else { Response.Write("<script language='javascript'>window.alert(\"Attenzione, il campo descrizione è obbligatorio.\");</script>"); tuttoOk = false; } } else { Response.Write("<script language='javascript'>window.alert(\"Attenzione, l'Unità organizzativa superiore deve essere esterna.\");</script>"); tuttoOk = false; } break; } case "P": { if (this.txt_cognome.Text != null && !this.txt_cognome.Text.Equals("")) { if ((this.txt_telefono1 == null || this.txt_telefono1.Text.Equals("")) && !(this.txt_telefono2 == null || this.txt_telefono2.Text.Equals(""))) { Response.Write("<script language='javascript'>window.alert(\"Attenzione, inserire il campo telefono princ.\");</script>"); tuttoOk = false; } else if (this.txt_cap != null && !this.txt_cap.Text.Equals("") && this.txt_cap.Text.Length != 5) { Response.Write("<script language='javascript'>window.alert(\"Attenzione, il campo CAP deve essere di 5 cifre\");</script>"); tuttoOk = false; } else if (this.txt_cap != null && !this.txt_cap.Text.Equals("") && !Utils.isNumeric(this.txt_cap.Text)) { Response.Write("<script language='javascript'>window.alert(\"Attenzione, il campo CAP deve un numero\");</script>"); tuttoOk = false; } else if (this.txt_provincia != null && !this.txt_provincia.Text.Equals("") && this.txt_provincia.Text.Length != 2) { Response.Write("<script language='javascript'>window.alert(\"Attenzione, il campo provincia deve essere di 2 cifre\");</script>"); tuttoOk = false; } else if (this.txt_provincia != null && !this.txt_provincia.Text.Equals("") && !Utils.isCorrectProv(this.txt_provincia.Text)) { Response.Write("<script language='javascript'>window.alert(\"Attenzione, il campo provincia non è corretto\");</script>"); tuttoOk = false; } else { DocsPaWR.Utente new_UT = new DocsPAWA.DocsPaWR.Utente(); new_UT.codiceCorrispondente = this.txt_codCorr.Text; new_UT.codiceRubrica = this.txt_codRub.Text; new_UT.cognome = this.txt_cognome.Text; new_UT.nome = this.txt_descr.Text; new_UT.email = this.txt_email.Text; new_UT.descrizione = this.txt_cognome.Text + this.txt_descr.Text; new_UT.idAmministrazione = UserManager.getInfoUtente(this).idAmministrazione; new_UT.idRegistro = UserManager.getRegistroSelezionato(this).systemId; //UserManager.getListaIdRegistriUtente(this)[0]; new_UT.tipoCorrispondente = this.ddl_tipoCorr.SelectedItem.Value; new_UT.canalePref = canale; new_UT.codiceAmm = txt_codAmm.Text; new_UT.codiceAOO = txt_codAOO.Text; if ((this.txt_indirizzo.Text != null && !this.txt_indirizzo.Equals("")) || (this.txt_cap.Text != null && !this.txt_cap.Equals("")) || (this.txt_citta.Text != null && !this.txt_citta.Equals("")) || (this.txt_provincia.Text != null && !this.txt_provincia.Equals("")) || (this.txt_nazione.Text != null && !this.txt_nazione.Equals("")) || (this.txt_telefono1.Text != null && !this.txt_telefono1.Equals("")) || (this.txt_telefono2 != null && !this.txt_telefono2.Equals("")) || (this.txt_fax.Text != null && !this.txt_fax.Equals("")) || (this.txt_codfisc.Text != null && !this.txt_codfisc.Equals("")) || (this.txt_note.Text != null && !this.txt_note.Equals("")) || (this.txt_local.Text != null && !this.txt_local.Equals(""))) { new_UT.info = insertDettagli(); new_UT.dettagli = true; } insCorr = UserManager.addressbookInsertCorrispondente(this, new_UT, this.parentCorr); } } else { Response.Write("<script language='javascript'>window.alert(\"Attenzione, il campo cognome è obbligatorio.\");</script>"); tuttoOk = false; } if (this.parentCorr != null && (!this.parentCorr.GetType().Equals(typeof(DocsPAWA.DocsPaWR.Ruolo)) || !this.parentCorr.tipoIE.Equals("E"))) { Response.Write("<script language='javascript'>window.alert(\"Attenzione, il parent deve essere un RUOLO esterno.\");</script>"); tuttoOk = false; } break; } case "R": { if (this.parentCorr != null && this.parentCorr.GetType().Equals(typeof(DocsPAWA.DocsPaWR.UnitaOrganizzativa)) && ((DocsPAWA.DocsPaWR.UnitaOrganizzativa)parentCorr).tipoIE.Equals("E")) { if (this.txt_descr.Text != null && !this.txt_descr.Text.Equals("")) { DocsPaWR.Ruolo new_RUO = new DocsPAWA.DocsPaWR.Ruolo(); new_RUO.codiceCorrispondente = this.txt_codCorr.Text; new_RUO.codiceRubrica = this.txt_codRub.Text; new_RUO.descrizione = this.txt_descr.Text; ((DocsPAWA.DocsPaWR.Corrispondente)(new_RUO)).email = this.txt_email.Text; new_RUO.idAmministrazione = UserManager.getInfoUtente(this).idAmministrazione; new_RUO.idRegistro = UserManager.getRegistroSelezionato(this).systemId; //UserManager.getListaIdRegistriUtente(this)[0]; new_RUO.tipoCorrispondente = this.ddl_tipoCorr.SelectedItem.Value; new_RUO.canalePref = canale; new_RUO.codiceAmm = txt_codAmm.Text; new_RUO.codiceAOO = txt_codAOO.Text; insCorr = UserManager.addressbookInsertCorrispondente(this, new_RUO, this.parentCorr); } else { Response.Write("<script language='javascript'>window.alert(\"Attenzione, il campo descrizione è obbligatorio.\");</script>"); tuttoOk = false; } } else { Response.Write("<script language='javascript'>window.alert(\"Attenzione,\\n Per inserire un nuovo RUOLO deve essere selezionata una U.O. esterna nella Rubrica.\\n Ripetere la procedura d'inserimento. \");</script>"); tuttoOk = false; } break; } } if (insCorr != null && insCorr.errore == null) { if (tuttoOk) { Response.Write("<script>window.close();</script>"); String trg = Request.QueryString["target"]; after_InsCorr(insCorr.codiceRubrica, insCorr, "proto", "N", trg); Response.Write("<script>window.opener.parent.parent.frames[1].location='../blank_page.htm';</script>"); } else { Response.Write("<script>window.close();</script>"); } } else { Response.Write("<script language=\"javascript\">window.alert(\"" + insCorr.errore + "\");</script>"); } } catch (Exception es) { ErrorManager.redirectToErrorPage(this, es); } //Session.Remove("target"); }
private void Page_Load(object sender, System.EventArgs e) { Session["AdminBookmark"] = "ListeDistribuzione"; //----- CONTROLLO DELL'UTENTE AMMINISTRATORE CONNESSO ----------- if (Session.IsNewSession) { Response.Redirect("../Exit.aspx?FROM=EXPIRED"); } AmmUtils.WebServiceLink ws = new AmmUtils.WebServiceLink(); if (!ws.CheckSession(Session.SessionID)) { Response.Redirect("../Exit.aspx?FROM=ABORT"); } if (Session["AMMDATASET"] == null) { RegisterStartupScript("NoProfilazione", "<script>alert('Attenzione selezionare un\\'amministrazione !'); document.location = '../Gestione_Homepage/Home.aspx';</script>"); return; } // --------------------------------------------------------------- //Decommentare con integrazione in FrontEnd if (Session["selCorrDaRubrica"] != null) { addCorrSelDaRubrica((DocsPAWA.DocsPaWR.ElementoRubrica[])Session["selCorrDaRubrica"]); } //Gestione del tasto invio DocsPAWA.Utils.DefaultButton(this, ref txt_codiceCorr, ref imgBtn_addCorr); DocsPAWA.Utils.DefaultButton(this, ref txt_nomeLista, ref btn_salva); DocsPAWA.Utils.DefaultButton(this, ref txt_descrizione, ref imgBtn_addCorr); string[] amministrazione = ((string)Session["AMMDATASET"]).Split('@'); string codiceAmministrazione = amministrazione[0]; idAmministrazione = wws.getIdAmmByCod(codiceAmministrazione); if (!IsPostBack) { lbl_position.Text = " • Amministrazione: " + AmmUtils.UtilsXml.GetAmmDataSession((string)Session["AMMDATASET"], "1"); DocsPAWA.DocsPaWR.Utente ut = new DocsPAWA.DocsPaWR.Utente(); ut.codiceAmm = codiceAmministrazione; ut.idAmministrazione = idAmministrazione; ut.tipoIE = "I"; Session.Add("userData", ut); DocsPAWA.DocsPaWR.Ruolo rl = new DocsPAWA.DocsPaWR.Ruolo(); rl.codiceAmm = codiceAmministrazione; rl.idAmministrazione = idAmministrazione; rl.tipoIE = "I"; Session.Add("userRuolo", rl); Panel1.Visible = true; Panel2.Visible = false; dsListe = wws.getListeDistribuzioneAmm(idAmministrazione); dg_1.DataSource = dsListe; dg_1.DataBind(); 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); btn_salva.Visible = false; this.imgBtn_descrizione.Attributes["onClick"] = "_ApriRubrica();"; this.btn_nuova.Attributes["onClick"] = "confirmMod();"; } }