protected void Page_Load(object sender, EventArgs e) { this.Page.MaintainScrollPositionOnPostBack = true; template = (DocsPAWA.DocsPaWR.Templates)Session["templateSelPerVisibilita"]; DocsPaWR.OggettoCustom[] elencoOggetti = (DocsPaWR.OggettoCustom[])template.ELENCO_OGGETTI.ToArray(); DocsPaWR.OggettoCustom[] listaCampiSelezionati = elencoOggetti.Where(oggetto => !oggetto.TIPO.DESCRIZIONE_TIPO.ToUpper().Equals("SEPARATORE")).ToArray(); listaCampi = new ArrayList(listaCampiSelezionati); if (template != null) { lbl_titolo.Text = "TIPOLOGIA DOCUMENTO : " + template.DESCRIZIONE; } if (!IsPostBack) { //Session.Add("reloadHT", false); //this.Inizialize(); this.sessionObj.RemoveSessionListaRuoliSel(); this.sessionObj.RemoveSessionListaRuoli(); this.sessionObj.RemoveSessionHashTableRuoli(); this.sessionObj.removeSessionIdRuolo(); } else { impostaSelezioneRuoli(); } }
private void btn_ModelloSU_Click(object sender, System.EventArgs e) { DocsPaWR.Templates template = (DocsPAWA.DocsPaWR.Templates)Session["templateSelPerModelli"]; if (template.PATH_MODELLO_STAMPA_UNIONE != null) { Session.Add("ModelloDaVisualizzare", template.PATH_MODELLO_STAMPA_UNIONE); Page.ClientScript.RegisterStartupScript(this.GetType(), "visualizzaModello", "VisualizzaModello();", true); } }
protected void ddl_tipologiaDoc_SelectedIndexChanged(object sender, System.EventArgs e) { if (string.IsNullOrEmpty(ddl_tipologiaDoc.SelectedValue)) { Session.Remove("template"); panel_Contenuto.Controls.Clear(); this.panel_Contenuto.Visible = false; this.pnl_RFAOO.Visible = false; this.pnlAnno.Visible = false; this.pnlNumero.Visible = false; } else { //this.TxtAnno.Visible = true; //this.lblAnno.Visible = true; this.pnlAnno.Visible = true; this.panel_Contenuto.Visible = true; this.pnl_RFAOO.Visible = true; this.ddlAooRF.Visible = false; this.lblAooRF.Visible = false; this.pnlNumero.Visible = true; this.TxtAnno.Text = ""; string idTemplate = ddl_tipologiaDoc.SelectedValue; DocsPaWR.Templates templateInSessione = (DocsPaWR.Templates)Session["template"]; if (!string.IsNullOrEmpty(idTemplate) && templateInSessione != null && !string.IsNullOrEmpty(templateInSessione.SYSTEM_ID.ToString())) { if (ddl_tipologiaDoc.SelectedValue != templateInSessione.SYSTEM_ID.ToString()) { Session.Remove("template"); panel_Contenuto.Controls.Clear(); } panel_Contenuto.Controls.Clear(); } if (idTemplate != "") { DocsPaWR.Templates template = ProfilazioneDocManager.getTemplateById(idTemplate, this); if (template != null) { Session.Add("template", template); //pnl_RFAOO.Visible = false; ddlAooRF.Items.Clear(); inizializzaPanelContenuto(); this.TxtAnno.Visible = true; this.TxtAnno.Text = ""; this.lblAnno.Visible = true; } else { pnl_RFAOO.Visible = false; } } } }
protected void ImageButton4_Click(object sender, ImageClickEventArgs e) { if (CheckBox4.Checked) { string[] amministrazione = ((string)Session["AMMDATASET"]).Split('@'); string codiceAmministrazione = amministrazione[0]; ((DocsPAWA.DocsPaWR.Templates)Session["templateSelPerModelli"]).PATH_MODELLO_STAMPA_UNIONE = ""; DocsPaWR.Templates template = (DocsPAWA.DocsPaWR.Templates)Session["templateSelPerModelli"]; ProfilazioneDocManager.eliminaModelli(template.DESCRIZIONE, codiceAmministrazione, "ModelloSU.rtf", "doc", (DocsPAWA.DocsPaWR.Templates)Session["templateSelPerModelli"], this); CheckBox4.Checked = false; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.idTemplate = this.Request.QueryString["idTemplate"].ToString(); this.idOggettoCustom = this.Request.QueryString["idOggettoCustom"].ToString(); template = (SAAdminTool.DocsPaWR.Templates)Session["templateSelPerVisibilita"]; if (template != null && template.ELENCO_OGGETTI != null && !string.IsNullOrEmpty(idTemplate) && !string.IsNullOrEmpty(idOggettoCustom)) { impostaTitolo(); caricaDgRuoli(); } } }
//Recupera tutte le tipologie di documento che hanno almeno un contatore che dipende dall'anno // viene utilizzato il metodo che restituisce i contatori di repertorio (vedi Archivio/OpzioniArchivio) // a cui viene passato il booleano false per non prendere i contatori di repertorio private void CaricaTipologia(DropDownList ddl) { DocsPaWR.Templates[] listaTemplates; listaTemplates = DocumentManager.getTipoAttoTrasfDeposito(this, UserManager.getInfoUtente(this).idAmministrazione, false); ddl.Items.Clear(); ddl.Items.Add(""); int cont = 0; if (listaTemplates != null) { for (int i = 0; i < listaTemplates.Length; i++) { DocsPaWR.Templates templ = listaTemplates[i]; if (templ.ABILITATO_SI_NO.Equals("1") && templ.IN_ESERCIZIO.ToUpper().Equals("SI")) { ddl.Items.Add(templ.DESCRIZIONE); ddl.Items[cont + 1].Value = templ.SYSTEM_ID.ToString(); cont++; } } } }
public void impostaDirittiRuoloSelezioneEsclusiva(Object etichetta, Object campo, DocsPaWR.OggettoCustom oggettoCustom, DocsPaWR.Templates template) { //DocsPaWR.AssDocFascRuoli assDocFascRuoli = ProfilazioneFascManager.getDirittiCampoTipologiaFasc(UserManager.getRuolo(this).idGruppo, template.SYSTEM_ID.ToString(), oggettoCustom.SYSTEM_ID.ToString(), this); foreach (DocsPaWR.AssDocFascRuoli assDocFascRuoli in dirittiCampiRuolo) { if (assDocFascRuoli.ID_OGGETTO_CUSTOM == oggettoCustom.SYSTEM_ID.ToString()) { if (assDocFascRuoli != null && assDocFascRuoli.VIS_OGG_CUSTOM == "0") { ((System.Web.UI.WebControls.Label)etichetta).Visible = false; ((System.Web.UI.WebControls.RadioButtonList)campo).Visible = false; //((System.Web.UI.HtmlControls.HtmlAnchor)button).Visible = false; oggettoCustom.CAMPO_OBBLIGATORIO = "NO"; } } } }
//Se il contatore è di tipo AOO o rf recupera la lista di AOO o la lista di rf //e li inserisci nella dropdownlist ddlAooRF private void ddl_Contatori_SelectedIndexChanged(object sender, System.EventArgs e) { if (ddl_Contatori.SelectedValue == "") { this.lblAooRF.Visible = false; } ddlAooRF.Items.Clear(); //this.pnl_RFAOO.Visible = false; this.panel_Contenuto.Visible = true; this.pnl_RFAOO.Visible = true; this.pnlAnno.Visible = true; this.pnlNumero.Visible = true; this.TxtAnno.Text = ""; Session["aoo_rf"] = ""; Session.Remove("template"); string idTemplate = ddl_tipologiaDoc.SelectedValue; DocsPaWR.Templates template = ProfilazioneDocManager.getTemplateById(idTemplate, this); Session.Add("template", template); // DocsPAWA.DocsPaWR.Templates template = (DocsPAWA.DocsPaWR.Templates)Session["template"]; foreach (DocsPAWA.DocsPaWR.OggettoCustom oggetto in template.ELENCO_OGGETTI) { if (oggetto.TIPO.DESCRIZIONE_TIPO == "Contatore") { if (oggetto.DESCRIZIONE.Equals("")) { return; } if (oggetto.SYSTEM_ID.ToString().Equals(ddl_Contatori.SelectedItem.Value)) { DocsPaWR.Ruolo ruoloUtente = UserManager.getRuolo(this); DocsPaWR.Registro[] registriRfVisibili = UserManager.getListaRegistriWithRF(ruoloUtente.systemId, "", ""); this.pnl_RFAOO.Visible = false; this.lblAooRF.Visible = true; switch (oggetto.TIPO_CONTATORE) { case "T": this.pnl_RFAOO.Visible = false; break; case "A": lblAooRF.Text = " AOO"; ////Aggiungo un elemento vuoto ListItem it = new ListItem(); it.Value = ""; it.Text = ""; ddlAooRF.Items.Add(it); //Distinguo se è un registro o un rf for (int i = 0; i < registriRfVisibili.Length; i++) { ListItem item = new ListItem(); if (((DocsPaWR.Registro)registriRfVisibili[i]).chaRF == "0") { item.Value = ((DocsPaWR.Registro)registriRfVisibili[i]).systemId; item.Text = ((DocsPaWR.Registro)registriRfVisibili[i]).codRegistro; ddlAooRF.Items.Add(item); } } ddlAooRF.Width = 100; this.pnl_RFAOO.Visible = true; this.ddlAooRF.Visible = true; break; case "R": lblAooRF.Text = " RF"; ////Aggiungo un elemento vuoto ListItem it_1 = new ListItem(); it_1.Value = ""; it_1.Text = ""; ddlAooRF.Items.Add(it_1); //Distinguo se è un registro o un rf for (int i = 0; i < registriRfVisibili.Length; i++) { ListItem item = new ListItem(); if (((DocsPaWR.Registro)registriRfVisibili[i]).chaRF == "1" && ((DocsPaWR.Registro)registriRfVisibili[i]).rfDisabled == "0") { item.Value = ((DocsPaWR.Registro)registriRfVisibili[i]).systemId; item.Text = ((DocsPaWR.Registro)registriRfVisibili[i]).codRegistro; ddlAooRF.Items.Add(item); } } ddlAooRF.Width = 100; this.pnl_RFAOO.Visible = true; this.ddlAooRF.Visible = true; break; } } else { // poichè la ricerca deve essere fatta per un solo contatore, metto a // stringa vuota il valore di tutti gli altri oggetti del template oggetto.VALORE_DATABASE = string.Empty; } } } }
public static string verificaOkContatoreFasc(DocsPaWR.Templates template) { string result = string.Empty; int lunghezza = 254; if (template != null) { for (int i = 0; i < template.ELENCO_OGGETTI.Length; i++) { DocsPaWR.OggettoCustom oggCustom = (DocsPaWR.OggettoCustom)template.ELENCO_OGGETTI[i]; if (oggCustom.TIPO.DESCRIZIONE_TIPO.ToUpper().Equals("CONTATORE")) { //Con incremento differito selezionato if (oggCustom.TIPO_CONTATORE.Equals("R") || oggCustom.TIPO_CONTATORE.Equals("A")) { if (oggCustom.CONTATORE_DA_FAR_SCATTARE) { if (oggCustom.ID_AOO_RF.Equals("")) { string tipoAooRf = string.Empty; if (oggCustom.TIPO_CONTATORE.Equals("R")) { tipoAooRf = "RF"; } else { tipoAooRf = "Registro"; } result = "Non è stato selezionato alcun " + tipoAooRf + " per il contatore."; } } } } if (string.IsNullOrEmpty(oggCustom.NUMERO_DI_CARATTERI)) { if (!string.IsNullOrEmpty(ConfigSettings.getKey(ConfigSettings.KeysENUM.LENGTH_CAMPI_PROFILATI))) { lunghezza = int.Parse(ConfigSettings.getKey(ConfigSettings.KeysENUM.LENGTH_CAMPI_PROFILATI)); } else { lunghezza = 254; } } else { lunghezza = int.Parse(oggCustom.NUMERO_DI_CARATTERI); } if (oggCustom.TIPO.DESCRIZIONE_TIPO.ToUpper().Equals("CAMPODITESTO")) { if (oggCustom.VALORE_DATABASE.Length > lunghezza) { result = "il numero massimo di carattere disponibili per il campo: " + oggCustom.DESCRIZIONE + " è stato superato"; break; } } } } return(result); }