Exemple #1
0
        private void BindFilter()
        {
            List <FiltroProcessoFirma> processFilter = new List <FiltroProcessoFirma>();
            FiltroProcessoFirma        filter;

            #region FILTRO RUOLO

            if (!string.IsNullOrEmpty(this.txtCodiceRuolo.Text))
            {
                filter           = new DocsPaWR.FiltroProcessoFirma();
                filter.Argomento = DocsPaWR.FiltriProcessoFirma.ID_RUOLO_VISIBILITA.ToString();
                filter.Valore    = this.idRuolo.Value;
                processFilter.Add(filter);
            }
            if (string.IsNullOrEmpty(this.txtCodiceRuolo.Text) && !string.IsNullOrEmpty(this.txtDescrizioneRuolo.Text))
            {
                filter           = new DocsPaWR.FiltroProcessoFirma();
                filter.Argomento = DocsPaWR.FiltriProcessoFirma.DESC_RUOLO_VISIBILITA.ToString();
                filter.Valore    = this.txtDescrizioneRuolo.Text;
                processFilter.Add(filter);
            }

            this.FiltroRicerca = processFilter;

            #endregion
        }
Exemple #2
0
        private bool BindFilters()
        {
            bool result = true;

            List <FiltroProcessoFirma> processFilter = new List <FiltroProcessoFirma>();
            FiltroProcessoFirma        filter;

            #region ORDINAMENTO

            filter           = new DocsPaWR.FiltroProcessoFirma();
            filter.Argomento = DocsPaWR.FiltriProcessoFirma.ORDER_FIELD.ToString();
            filter.Valore    = this.ddlOrder.SelectedValue;
            processFilter.Add(filter);

            filter           = new DocsPaWR.FiltroProcessoFirma();
            filter.Argomento = DocsPaWR.FiltriProcessoFirma.ORDER_DIRECTION.ToString();
            filter.Valore    = this.ddlAscDesc.SelectedValue;
            processFilter.Add(filter);

            #endregion

            #region RUOLO COINVOLTO

            if (!string.IsNullOrEmpty(this.txtCodiceRuoloTitolare.Text))
            {
                filter           = new DocsPaWR.FiltroProcessoFirma();
                filter.Argomento = DocsPaWR.FiltriProcessoFirma.RUOLO_COINVOLTO.ToString();
                filter.Valore    = this.idRuoloTitolare.Value;
                processFilter.Add(filter);
            }

            #endregion

            #region UTENTE COINVOLTO

            if (!string.IsNullOrEmpty(this.txtCodiceUtenteTitolare.Text))
            {
                filter           = new DocsPaWR.FiltroProcessoFirma();
                filter.Argomento = DocsPaWR.FiltriProcessoFirma.UTENTE_COINVOLTO.ToString();
                filter.Valore    = this.idUtenteTitolare.Value;
                processFilter.Add(filter);
            }

            #endregion

            #region TIPO
            if (this.cbl_TipoProcesso.Items.FindByValue("P") != null)
            {
                filter           = new DocsPaWR.FiltroProcessoFirma();
                filter.Argomento = DocsPaWR.FiltriProcessoFirma.TIPO_PROCESSO.ToString();
                if (this.cbl_TipoProcesso.Items.FindByValue("P").Selected)
                {
                    filter.Valore = "true";
                }
                else
                {
                    filter.Valore = "false";
                }
                processFilter.Add(filter);
            }
            if (this.cbl_TipoProcesso.Items.FindByValue("M") != null)
            {
                filter           = new DocsPaWR.FiltroProcessoFirma();
                filter.Argomento = DocsPaWR.FiltriProcessoFirma.TIPO_MODELLO.ToString();
                if (this.cbl_TipoProcesso.Items.FindByValue("M").Selected)
                {
                    filter.Valore = "true";
                }
                else
                {
                    filter.Valore = "false";
                }
                processFilter.Add(filter);
            }
            #endregion

            #region NOME
            if (!string.IsNullOrEmpty(this.txtNome.Text.Trim()))
            {
                filter           = new DocsPaWR.FiltroProcessoFirma();
                filter.Argomento = DocsPaWR.FiltriProcessoFirma.NOME.ToString();
                filter.Valore    = this.txtNome.Text;
                processFilter.Add(filter);
            }
            #endregion

            #region STATO

            if (this.cbl_StatoProcesso.Items.FindByValue("V") != null)
            {
                filter           = new DocsPaWR.FiltroProcessoFirma();
                filter.Argomento = DocsPaWR.FiltriProcessoFirma.VALIDO.ToString();
                if (this.cbl_StatoProcesso.Items.FindByValue("V").Selected)
                {
                    filter.Valore = "true";
                }
                else
                {
                    filter.Valore = "false";
                }
                processFilter.Add(filter);
            }
            if (this.cbl_StatoProcesso.Items.FindByValue("I") != null)
            {
                filter           = new DocsPaWR.FiltroProcessoFirma();
                filter.Argomento = DocsPaWR.FiltriProcessoFirma.INVALIDO.ToString();
                if (this.cbl_StatoProcesso.Items.FindByValue("I").Selected)
                {
                    filter.Valore = "true";
                }
                else
                {
                    filter.Valore = "false";
                }
                processFilter.Add(filter);
            }

            #endregion

            this.FiltersProcesses = processFilter;

            return(result);
        }