Exemple #1
0
    protected void CheckBoxSelAll_OnCheckedChanged(object sender, EventArgs e)
    {
        CheckBox cb = (CheckBox)GridViewUtenti.HeaderRow.FindControl("CheckBoxSelAll");

        if (cb.Checked)
        {
            fieldSelected.Value = "hdr;";
            TextCountSel.Value  = "0";
            //foreach (DataRow dr in ((DataTable)ViewState["dvUte"]).Rows)
            //{
            //    fieldSelected.Value += "val_" + Convert.ToString(dr["UTE_ID_UTENTE"]) + ";";
            //    TextCountSel.Value = Convert.ToString(Convert.ToInt32(TextCountSel.Value) + 1);
            //}
            int[] test = (int[])ViewState["dvUte"];
            for (int i = 0; i < test.Length; i++)
            {
                fieldSelected.Value += "val_" + Convert.ToString(test[i]) + ";";
                TextCountSel.Value   = Convert.ToString(Convert.ToInt32(TextCountSel.Value) + 1);
            }
            GridViewUtenti.DataBind();
        }
        else
        {
            fieldSelected.Value = "";
            TextCountSel.Value  = "0";
            GridViewUtenti.DataBind();
        }
    }
Exemple #2
0
    protected void ButtonCerca_Click(object sender, EventArgs e)
    {
        try
        {
            BuildWhereClause();
            hWhereClause.Value           = WhereClause;
            GridViewUtenti.SelectedIndex = -1;
            GridViewUtenti.DataBind();
        }

        catch (Exception ex)
        {
            // Gestione messaggistica all'utente e trace in DB dell'errore
            ExceptionPolicy.HandleException(ex, "Propagate Policy");
        }
    }
Exemple #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //Ripresa parametri di pagina
        qPANEL = Convert.ToString(Request.QueryString["PANEL"]);
        if (qPANEL == null)
        {
            qPANEL = "";
        }

        string id_utente = Request.QueryString["UTE_ID_UTENTE"];

        if (id_utente == null)
        {
            qUTE_ID_UTENTE = 0;
        }
        else
        {
            qUTE_ID_UTENTE = Convert.ToInt32(Request.QueryString["UTE_ID_UTENTE"]);
        }

        SetPageControlAccess();

        GridViewUtenti.PageSize = Convert.ToInt32(DropDownListRecordPagina.SelectedValue);

        if (!IsPostBack)
        {
            GridViewUtenti.Columns[GridIndexOfByName(GridViewUtenti, "UTE_NOME")].HeaderText            = GetValueDizionarioUI("NOME");
            GridViewUtenti.Columns[GridIndexOfByName(GridViewUtenti, "UTE_COGNOME")].HeaderText         = GetValueDizionarioUI("COGNOME");
            GridViewUtenti.Columns[GridIndexOfByName(GridViewUtenti, "UTE_USER_ID")].HeaderText         = GetValueDizionarioUI("USER_ID");
            GridViewUtenti.Columns[GridIndexOfByName(GridViewUtenti, "UTE_EMAIL")].HeaderText           = GetValueDizionarioUI("EMAIL");
            GridViewUtenti.Columns[GridIndexOfByName(GridViewUtenti, "CLI_RAGIONE_SOCIALE")].HeaderText = GetValueDizionarioUI("AZIENDA");

            //Label
            LabelTitolo.InnerText    = GetValueDizionarioUI("UTENTI");
            LabelRecPagina.InnerText = GetValueDizionarioUI("RECORD_PAGINA");
            LabelElemSel.InnerText   = GetValueDizionarioUI("ELEMENTI_SELEZIONATI");
            //Pulsanti
            ButtonFiltroUtente.Text          = GetValueDizionarioUI("FILTRO");
            btnCerca.Text                    = GetValueDizionarioUI("CERCA");
            LabelCognome.InnerText           = GetValueDizionarioUI("COGNOME");
            LabelNome.InnerText              = GetValueDizionarioUI("NOME");
            LabelCodiceIndividuale.InnerText = GetValueDizionarioUI("CODICE_INDIVIDUALE");
            LabelEmail.InnerText             = GetValueDizionarioUI("EMAIL");
            LabelCDC.InnerText               = GetValueDizionarioUI("CODICE_CDC");
            LabelOnline.InnerText            = GetValueDizionarioUI("SOLO_UTENTI_ONLINE");
            LabelUserId.InnerText            = GetValueDizionarioUI("USER_ID");
            LabelCliente.InnerText           = GetValueDizionarioUI("AZIENDA");
            LabelPwdInviata.InnerText        = GetValueDizionarioUI("PASSWORD_INVIATA");

            Clienti objClienti = new Clienti();
            txtCliente.DataSource     = objClienti.getDdlClienti();
            txtCliente.DataValueField = "CLI_ID_CLIENTE";
            txtCliente.DataTextField  = "CLI_RAGIONE_SOCIALE";
            txtCliente.DataBind();
            txtCliente.Items.Insert(0, new ListItem("", ""));

            txtPwdInviata.Items.Insert(0, new ListItem("", ""));
            txtPwdInviata.Items.Insert(1, new ListItem("No", "0"));
            txtPwdInviata.Items.Insert(2, new ListItem("Sì", "1"));

            GridViewUtenti.DataBind();
        }


        permessoDEL = dizionarioPermessi["UTE"];

        if (allowAccess == false)
        {
            WhereClause = " WHERE 1=2 ";
        }
    }