public void inserisciMenuATendina(DocsPAWA.DocsPaWR.OggettoCustom oggettoCustom, Table table) { if (oggettoCustom.DESCRIZIONE.Equals("")) { return; } Label etichettaMenuATendina = new Label(); etichettaMenuATendina.Text = oggettoCustom.DESCRIZIONE; etichettaMenuATendina.Font.Size = FontUnit.Point(8); etichettaMenuATendina.Font.Bold = true; etichettaMenuATendina.Font.Name = "Verdana"; DropDownList menuATendina = new DropDownList(); menuATendina.ID = oggettoCustom.SYSTEM_ID.ToString(); int valoreDiDefault = -1; for (int i = 0; i < oggettoCustom.ELENCO_VALORI.Length; i++) { DocsPaWR.ValoreOggetto valoreOggetto = ((DocsPAWA.DocsPaWR.ValoreOggetto)(oggettoCustom.ELENCO_VALORI[i])); menuATendina.Items.Add(new ListItem(valoreOggetto.VALORE, valoreOggetto.VALORE)); } menuATendina.CssClass = "comp_profilazione_anteprima"; if (valoreDiDefault != -1) { menuATendina.SelectedIndex = valoreDiDefault; } if (!(valoreDiDefault != -1 && oggettoCustom.CAMPO_OBBLIGATORIO.Equals("SI"))) { menuATendina.Items.Insert(0, ""); } if (!oggettoCustom.VALORE_DATABASE.Equals("")) { menuATendina.SelectedIndex = impostaSelezioneMenuATendina(oggettoCustom.VALORE_DATABASE, menuATendina); } TableRow row = new TableRow(); TableCell cell_1 = new TableCell(); cell_1.Controls.Add(etichettaMenuATendina); row.Cells.Add(cell_1); TableCell cell_2 = new TableCell(); cell_2.Controls.Add(menuATendina); row.Cells.Add(cell_2); table.Rows.Add(row); }
public void inserisciSelezioneEsclusiva(DocsPAWA.DocsPaWR.OggettoCustom oggettoCustom, Table table) { TableRow row_1 = new TableRow(); TableCell cell_1 = new TableCell(); if (oggettoCustom.DESCRIZIONE.Equals("")) { return; } Label etichettaSelezioneEsclusiva = new Label(); ImageButton cancella_selezioneEsclusiva = new ImageButton(); etichettaSelezioneEsclusiva.Text = oggettoCustom.DESCRIZIONE; etichettaSelezioneEsclusiva.Font.Size = FontUnit.Point(8); etichettaSelezioneEsclusiva.Font.Bold = true; etichettaSelezioneEsclusiva.Font.Name = "Verdana"; etichettaSelezioneEsclusiva.Width = Unit.Percentage(90); if (!oggettoCustom.CAMPO_OBBLIGATORIO.Equals("SI")) { cancella_selezioneEsclusiva.ID = "_" + oggettoCustom.SYSTEM_ID.ToString(); cancella_selezioneEsclusiva.ImageUrl = "../images/cancella.gif"; cancella_selezioneEsclusiva.CssClass = "resettaSelezioneEsclusiva"; cancella_selezioneEsclusiva.Width = 10; cancella_selezioneEsclusiva.Height = 10; cancella_selezioneEsclusiva.Attributes.Add("tableParent", table.ID); cancella_selezioneEsclusiva.Click += new System.Web.UI.ImageClickEventHandler(cancella_selezioneEsclusiva_Click); cell_1.Controls.Add(cancella_selezioneEsclusiva); } RadioButtonList selezioneEsclusiva = new RadioButtonList(); selezioneEsclusiva.ID = oggettoCustom.SYSTEM_ID.ToString(); int valoreDiDefault = -1; for (int i = 0; i < oggettoCustom.ELENCO_VALORI.Length; i++) { DocsPaWR.ValoreOggetto valoreOggetto = ((DocsPAWA.DocsPaWR.ValoreOggetto)(oggettoCustom.ELENCO_VALORI[i])); selezioneEsclusiva.Items.Add(new ListItem(valoreOggetto.VALORE, valoreOggetto.VALORE)); } selezioneEsclusiva.CssClass = "comp_profilazione_anteprima"; if (oggettoCustom.ORIZZONTALE_VERTICALE.Equals("Orizzontale")) { selezioneEsclusiva.RepeatDirection = RepeatDirection.Horizontal; } else { selezioneEsclusiva.RepeatDirection = RepeatDirection.Vertical; } if (valoreDiDefault != -1) { selezioneEsclusiva.SelectedIndex = valoreDiDefault; } if (!oggettoCustom.VALORE_DATABASE.Equals("")) { selezioneEsclusiva.SelectedIndex = impostaSelezioneEsclusiva(oggettoCustom.VALORE_DATABASE, selezioneEsclusiva); } cell_1.Controls.Add(etichettaSelezioneEsclusiva); cell_1.ColumnSpan = 2; row_1.Cells.Add(cell_1); table.Rows.Add(row_1); TableRow row_2 = new TableRow(); TableCell cell_2 = new TableCell(); cell_2.Controls.Add(selezioneEsclusiva); cell_2.ColumnSpan = 2; row_2.Cells.Add(cell_2); table.Rows.Add(row_2); }
public void inserisciCasellaDiSelezione(DocsPAWA.DocsPaWR.OggettoCustom oggettoCustom, Table table) { if (oggettoCustom.DESCRIZIONE.Equals("")) { return; } Label etichettaCasellaSelezione = new Label(); etichettaCasellaSelezione.Text = oggettoCustom.DESCRIZIONE; etichettaCasellaSelezione.Font.Size = FontUnit.Point(8); etichettaCasellaSelezione.Font.Bold = true; etichettaCasellaSelezione.Font.Name = "Verdana"; //etichettaCasellaSelezione.Width = 430; etichettaCasellaSelezione.Width = Unit.Percentage(100); CheckBoxList casellaSelezione = new CheckBoxList(); casellaSelezione.ID = oggettoCustom.SYSTEM_ID.ToString(); int valoreDiDefault = -1; for (int i = 0; i < oggettoCustom.ELENCO_VALORI.Length; i++) { DocsPaWR.ValoreOggetto valoreOggetto = ((DocsPAWA.DocsPaWR.ValoreOggetto)(oggettoCustom.ELENCO_VALORI[i])); casellaSelezione.Items.Add(new ListItem(valoreOggetto.VALORE, valoreOggetto.VALORE)); if (valoreOggetto.VALORE_DI_DEFAULT.Equals("SI")) { valoreDiDefault = i; } } casellaSelezione.CssClass = "comp_profilazione_anteprima"; if (oggettoCustom.ORIZZONTALE_VERTICALE.Equals("Orizzontale")) { casellaSelezione.RepeatDirection = RepeatDirection.Horizontal; } else { casellaSelezione.RepeatDirection = RepeatDirection.Vertical; } if (valoreDiDefault != -1) { casellaSelezione.SelectedIndex = valoreDiDefault; } if (oggettoCustom.VALORI_SELEZIONATI != null) { impostaSelezioneCaselleDiSelezione(oggettoCustom, casellaSelezione); } TableRow row_1 = new TableRow(); TableCell cell_1 = new TableCell(); cell_1.Controls.Add(etichettaCasellaSelezione); cell_1.ColumnSpan = 2; row_1.Cells.Add(cell_1); table.Rows.Add(row_1); TableRow row_2 = new TableRow(); TableCell cell_2 = new TableCell(); cell_2.Controls.Add(casellaSelezione); cell_2.ColumnSpan = 2; row_2.Cells.Add(cell_2); table.Rows.Add(row_2); }
public void inserisciSelezioneEsclusiva(DocsPAWA.DocsPaWR.OggettoCustom oggettoCustom, string readOnly) { TableRow row_1 = new TableRow(); TableCell cell_1 = new TableCell(); if (oggettoCustom.DESCRIZIONE.Equals("")) { return; } Label etichettaSelezioneEsclusiva = new Label(); if (oggettoCustom.CAMPO_OBBLIGATORIO.Equals("SI")) { etichettaSelezioneEsclusiva.Text = oggettoCustom.DESCRIZIONE + " *"; } else { etichettaSelezioneEsclusiva.Text = oggettoCustom.DESCRIZIONE; } etichettaSelezioneEsclusiva.Font.Size = FontUnit.Point(8); etichettaSelezioneEsclusiva.Font.Bold = true; etichettaSelezioneEsclusiva.Font.Name = "Verdana"; //etichettaSelezioneEsclusiva.Width = 400; etichettaSelezioneEsclusiva.Width = Unit.Percentage(90); RadioButtonList selezioneEsclusiva = new RadioButtonList(); selezioneEsclusiva.ID = oggettoCustom.SYSTEM_ID.ToString(); int valoreDiDefault = -1; for (int i = 0; i < oggettoCustom.ELENCO_VALORI.Length; i++) { DocsPaWR.ValoreOggetto valoreOggetto = ((DocsPAWA.DocsPaWR.ValoreOggetto)(oggettoCustom.ELENCO_VALORI[i])); //Valori disabilitati/abilitati if (valoreOggetto.ABILITATO == 1 || (valoreOggetto.ABILITATO == 0 && valoreOggetto.VALORE == oggettoCustom.VALORE_DATABASE)) { //Nel caso il valore è disabilitato ma selezionato lo rendo disponibile solo fino al salvataggio del documento if (valoreOggetto.ABILITATO == 0 && valoreOggetto.VALORE == oggettoCustom.VALORE_DATABASE) { valoreOggetto.ABILITATO = 1; } selezioneEsclusiva.Items.Add(new ListItem(valoreOggetto.VALORE, valoreOggetto.VALORE)); //Valore di default if (valoreOggetto.VALORE_DI_DEFAULT.Equals("SI")) { valoreDiDefault = i; } } } selezioneEsclusiva.CssClass = "comp_profilazione_anteprima"; if (oggettoCustom.ORIZZONTALE_VERTICALE.Equals("Orizzontale")) { selezioneEsclusiva.RepeatDirection = RepeatDirection.Horizontal; } else { selezioneEsclusiva.RepeatDirection = RepeatDirection.Vertical; } if (valoreDiDefault != -1) { selezioneEsclusiva.SelectedIndex = valoreDiDefault; } if (!oggettoCustom.VALORE_DATABASE.Equals("")) { selezioneEsclusiva.SelectedIndex = impostaSelezioneEsclusiva(oggettoCustom.VALORE_DATABASE, selezioneEsclusiva); } //Verifico i diritti del ruolo sul campo impostaDirittiRuoloSelezioneEsclusiva(etichettaSelezioneEsclusiva, selezioneEsclusiva, oggettoCustom, template); if (readOnly == "SI") { selezioneEsclusiva.Enabled = false; } cell_1.Controls.Add(etichettaSelezioneEsclusiva); cell_1.ColumnSpan = 2; row_1.Cells.Add(cell_1); table.Rows.Add(row_1); TableRow row_2 = new TableRow(); TableCell cell_2 = new TableCell(); cell_2.Controls.Add(selezioneEsclusiva); cell_2.ColumnSpan = 2; row_2.Cells.Add(cell_2); table.Rows.Add(row_2); }
public void inserisciMenuATendina(DocsPAWA.DocsPaWR.OggettoCustom oggettoCustom, string readOnly) { if (oggettoCustom.DESCRIZIONE.Equals("")) { return; } Label etichettaMenuATendina = new Label(); if (oggettoCustom.CAMPO_OBBLIGATORIO.Equals("SI")) { etichettaMenuATendina.Text = oggettoCustom.DESCRIZIONE + " *"; } else { etichettaMenuATendina.Text = oggettoCustom.DESCRIZIONE; } etichettaMenuATendina.Font.Size = FontUnit.Point(8); etichettaMenuATendina.Font.Bold = true; etichettaMenuATendina.Font.Name = "Verdana"; DropDownList menuATendina = new DropDownList(); menuATendina.ID = oggettoCustom.SYSTEM_ID.ToString(); int valoreDiDefault = -1; for (int i = 0; i < oggettoCustom.ELENCO_VALORI.Length; i++) { DocsPaWR.ValoreOggetto valoreOggetto = ((DocsPAWA.DocsPaWR.ValoreOggetto)(oggettoCustom.ELENCO_VALORI[i])); //Valori disabilitati/abilitati if (valoreOggetto.ABILITATO == 1 || (valoreOggetto.ABILITATO == 0 && valoreOggetto.VALORE == oggettoCustom.VALORE_DATABASE)) { //Nel caso il valore è disabilitato ma selezionato lo rendo disponibile solo fino al salvataggio del documento if (valoreOggetto.ABILITATO == 0 && valoreOggetto.VALORE == oggettoCustom.VALORE_DATABASE) { valoreOggetto.ABILITATO = 1; } menuATendina.Items.Add(new ListItem(valoreOggetto.VALORE, valoreOggetto.VALORE)); //Valore di default if (valoreOggetto.VALORE_DI_DEFAULT.Equals("SI")) { valoreDiDefault = i; } } } menuATendina.CssClass = "comp_profilazione_anteprima"; if (valoreDiDefault != -1) { menuATendina.SelectedIndex = valoreDiDefault; } if (!(valoreDiDefault != -1 && oggettoCustom.CAMPO_OBBLIGATORIO.Equals("SI"))) { menuATendina.Items.Insert(0, ""); } if (!oggettoCustom.VALORE_DATABASE.Equals("")) { menuATendina.SelectedIndex = impostaSelezioneMenuATendina(oggettoCustom.VALORE_DATABASE, menuATendina); } //Verifico i diritti del ruolo sul campo impostaDirittiRuoloSulCampo(etichettaMenuATendina, menuATendina, oggettoCustom, template); if (readOnly == "SI") { menuATendina.Enabled = false; } TableRow row = new TableRow(); TableCell cell_1 = new TableCell(); cell_1.Controls.Add(etichettaMenuATendina); row.Cells.Add(cell_1); TableCell cell_2 = new TableCell(); cell_2.Controls.Add(menuATendina); row.Cells.Add(cell_2); table.Rows.Add(row); }
public void inserisciCasellaDiSelezione(DocsPAWA.DocsPaWR.OggettoCustom oggettoCustom, string readOnly) { if (oggettoCustom.DESCRIZIONE.Equals("")) { return; } Label etichettaCasellaSelezione = new Label(); if (oggettoCustom.CAMPO_OBBLIGATORIO.Equals("SI")) { etichettaCasellaSelezione.Text = oggettoCustom.DESCRIZIONE + " *"; } else { etichettaCasellaSelezione.Text = oggettoCustom.DESCRIZIONE; } etichettaCasellaSelezione.Font.Size = FontUnit.Point(8); etichettaCasellaSelezione.Font.Bold = true; etichettaCasellaSelezione.Font.Name = "Verdana"; //etichettaCasellaSelezione.Width = 430; etichettaCasellaSelezione.Width = Unit.Percentage(100); CheckBoxList casellaSelezione = new CheckBoxList(); casellaSelezione.ID = oggettoCustom.SYSTEM_ID.ToString(); int valoreDiDefault = -1; for (int i = 0; i < oggettoCustom.ELENCO_VALORI.Length; i++) { DocsPaWR.ValoreOggetto valoreElenco = ((DocsPAWA.DocsPaWR.ValoreOggetto)(oggettoCustom.ELENCO_VALORI[i])); if (i < oggettoCustom.VALORI_SELEZIONATI.Length) { string valoreSelezionato = (string)(oggettoCustom.VALORI_SELEZIONATI[i]); if (valoreElenco.ABILITATO == 1 || (valoreElenco.ABILITATO == 0 && !string.IsNullOrEmpty(valoreSelezionato))) { //Nel caso il valore è disabilitato ma selezionato lo rendo disponibile solo fino al salvataggio del documento if (valoreElenco.ABILITATO == 0 && !string.IsNullOrEmpty(valoreSelezionato)) { valoreElenco.ABILITATO = 1; } casellaSelezione.Items.Add(new ListItem(valoreElenco.VALORE, valoreElenco.VALORE)); //Valore di default if (valoreElenco.VALORE_DI_DEFAULT.Equals("SI")) { valoreDiDefault = i; } } } } casellaSelezione.CssClass = "comp_profilazione_anteprima"; if (oggettoCustom.ORIZZONTALE_VERTICALE.Equals("Orizzontale")) { casellaSelezione.RepeatDirection = RepeatDirection.Horizontal; } else { casellaSelezione.RepeatDirection = RepeatDirection.Vertical; } if (valoreDiDefault != -1) { casellaSelezione.SelectedIndex = valoreDiDefault; } if (oggettoCustom.VALORI_SELEZIONATI != null) { impostaSelezioneCaselleDiSelezione(oggettoCustom, casellaSelezione); } //Verifico i diritti del ruolo sul campo impostaDirittiRuoloSulCampo(etichettaCasellaSelezione, casellaSelezione, oggettoCustom, template); if (readOnly == "SI") { casellaSelezione.Enabled = false; } TableRow row_1 = new TableRow(); TableCell cell_1 = new TableCell(); cell_1.Controls.Add(etichettaCasellaSelezione); cell_1.ColumnSpan = 2; row_1.Cells.Add(cell_1); table.Rows.Add(row_1); TableRow row_2 = new TableRow(); TableCell cell_2 = new TableCell(); cell_2.Controls.Add(casellaSelezione); cell_2.ColumnSpan = 2; row_2.Cells.Add(cell_2); table.Rows.Add(row_2); }