private void InicializaPagina()
    {
        try
        {
            PerfilBL oPerfilBL = new PerfilBL();
            oPerfilBL.ErrorEvent += new PerfilBL.ErrorDelegate((Master as Seguridad).Transaction_ErrorEvent);

            oPerfilBEList = new PerfilBEList();
            oPerfilBEList.Add(new PerfilBE());

            this.cboEstado.cargarCombo(ConstanteBE.OBJECTO_TIPO_TODOS);
            this.cboEstado.SelectedValue = "0";

            this.gvPerfiles.DataSource = oPerfilBEList;
            this.gvPerfiles.DataBind();

            this.gvPerfiles.PageSize = Profile.PageSize;

            ViewState["oPerfilBEList"] = oPerfilBEList;
        }
        catch (Exception ex)
        {
            (Master as Seguridad).Web_ErrorEvent(this, ex);
        }
    }
Example #2
0
        public PerfilBEList GetPerfilesBandejaConcesionario(String aplicacionID, String strCodUsuario)
        {
            PerfilBEList oPerfilBEList = new PerfilBEList();
            IDataReader  reader        = null;

            try
            {
                using (Database db = new Database())
                {
                    db.ProcedureName = "sgsnet_sps_bandeja_perfil_concesionario";
                    db.AddParameter("@vi_ch_cod_apli", DbType.String, ParameterDirection.Input, aplicacionID);
                    db.AddParameter("@vi_va_cod_usuario", DbType.String, ParameterDirection.Input, strCodUsuario);
                    reader = db.GetDataReader();
                }

                while (reader.Read())
                {
                    oPerfilBEList.Add(this.ConstructBandejaPerfilConcesionario(reader));
                }
                reader.Close();
            }
            catch
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
                throw;
            }
            return(oPerfilBEList);
        }
Example #3
0
        //DAC - 22/12/2010 - Inicio
        public PerfilBEList GetPerfilesBandeja(String aplicacionID, String dscPerfil, String estado, String strFlConcesionario)
        {
            PerfilBEList oPerfilBEList = new PerfilBEList();
            IDataReader  reader        = null;

            try
            {
                using (Database db = new Database())
                {
                    db.ProcedureName = "sgsnet_sps_bandeja_perfil";
                    db.AddParameter("@vi_ch_cod_apli", DbType.String, ParameterDirection.Input, aplicacionID);
                    db.AddParameter("@vi_va_nom_perfil", DbType.String, ParameterDirection.Input, dscPerfil);
                    db.AddParameter("@vi_ch_cod_estado", DbType.String, ParameterDirection.Input, estado);
                    //DAC - 22/12/2010 - Inicio
                    db.AddParameter("@vi_ch_fl_concesionario", DbType.String, ParameterDirection.Input, strFlConcesionario);
                    //DAC - 22/12/2010 - Fin
                    reader = db.GetDataReader();
                }

                while (reader.Read())
                {
                    oPerfilBEList.Add(ConstructBandejaPerfil(reader));
                }
                reader.Close();
            }
            catch
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
                throw;
            }
            return(oPerfilBEList);
        }
    protected void btnBuscar_Click(object sender, ImageClickEventArgs e)
    {
        PerfilBL oPerfilBL = new PerfilBL();

        oPerfilBL.ErrorEvent += new PerfilBL.ErrorDelegate((Master as Seguridad).Transaction_ErrorEvent);

        oPerfilBEList = oPerfilBL.GetPerfilesBandeja(Profile.Aplicacion, this.txtPerfil.Text.Trim(), this.cboEstado.SelectedValue, "");

        if (oPerfilBEList == null || oPerfilBEList.Count == 0)
        {
            oPerfilBEList = new PerfilBEList();
            JavaScriptHelper.Alert(this, Message.keyNoRegistros, "");
            oPerfilBEList.Add(new PerfilBE());
            GuardaParametros(0);
        }
        else
        {
            GuardaParametros(1);
        }
        this.gvPerfiles.DataSource = oPerfilBEList;
        this.gvPerfiles.DataBind();
        ViewState["oPerfilBEList"] = oPerfilBEList;
    }