Example #1
0
        public void inserisciMenuATendina(SAAdminTool.DocsPaWR.OggettoCustom oggettoCustom)
        {
            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.POSIZIONE;
            int valoreDiDefault = -1;

            for (int i = 0; i < oggettoCustom.ELENCO_VALORI.Length; i++)
            {
                SAAdminTool.DocsPaWR.ValoreOggetto valoreOggetto = ((SAAdminTool.DocsPaWR.ValoreOggetto)(oggettoCustom.ELENCO_VALORI[i]));
                menuATendina.Items.Add(new ListItem(valoreOggetto.VALORE, valoreOggetto.VALORE));
                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, "");
            }

            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);
        }
Example #2
0
        public void inserisciSelezioneEsclusiva(SAAdminTool.DocsPaWR.OggettoCustom oggettoCustom)
        {
            if (oggettoCustom.DESCRIZIONE.Equals(""))
            {
                return;
            }
            Label etichettaSelezioneEsclusiva = new Label();

            HtmlAnchor cancella_selezioneEsclusiva = new HtmlAnchor();

            if (oggettoCustom.CAMPO_OBBLIGATORIO.Equals("SI"))
            {
                etichettaSelezioneEsclusiva.Text = oggettoCustom.DESCRIZIONE + " *";
            }
            else
            {
                etichettaSelezioneEsclusiva.Text = oggettoCustom.DESCRIZIONE;

                cancella_selezioneEsclusiva.HRef = "javascript:clearSelezioneEsclusiva(" + oggettoCustom.POSIZIONE + "," + oggettoCustom.ELENCO_VALORI.Length + ");";
                //cancella_selezioneEsclusiva.HRef = "javascript:clearSelezioneEsclusiva_"+oggettoCustom.POSIZIONE+"();";
                cancella_selezioneEsclusiva.InnerHtml = "<img src=\"../Images/cancella.gif\" width=\"10\" height=\"10\" border=\"0\" alt=\"Resetta selezione\" class=\"resettaSelezioneEsclusiva\">";
            }

            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.POSIZIONE;
            int valoreDiDefault = -1;

            for (int i = 0; i < oggettoCustom.ELENCO_VALORI.Length; i++)
            {
                SAAdminTool.DocsPaWR.ValoreOggetto valoreOggetto = ((SAAdminTool.DocsPaWR.ValoreOggetto)(oggettoCustom.ELENCO_VALORI[i]));
                selezioneEsclusiva.Items.Add(new ListItem(valoreOggetto.VALORE, valoreOggetto.VALORE));
                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;
            }

            TableRow  row_1  = new TableRow();
            TableCell cell_1 = new TableCell();

            cell_1.Controls.Add(cancella_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);

            if (focus)
            {
                SetFocus(selezioneEsclusiva);
                focus = false;
            }
        }
Example #3
0
        public void inserisciCasellaDiSelezione(SAAdminTool.DocsPaWR.OggettoCustom oggettoCustom)
        {
            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.POSIZIONE;
            int valoreDiDefault = -1;

            for (int i = 0; i < oggettoCustom.ELENCO_VALORI.Length; i++)
            {
                SAAdminTool.DocsPaWR.ValoreOggetto valoreOggetto = ((SAAdminTool.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;
            }

            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);

            if (focus)
            {
                SetFocus(casellaSelezione);
                focus = false;
            }
        }