public List <EntPerfil> GetConsultaPerfileAcceso(EntPerfil Dobj, string tipo)
        {
            List <EntPerfil>      lst  = new List <EntPerfil>();
            DBParameterCollection pcol = ParamConfiguracion.LLenaPerfiles(Dobj, Comunes.BUSCAR, tipo);

            using (dr = db.ExecuteDataReader(Procedimientos.SpPerfiles, pcol, conm, tranm, CommandType.StoredProcedure))
            {
                while (dr.Read())
                {
                    EntPerfil obj = new EntPerfil();
                    if (dr["Pantalla"] != DBNull.Value)
                    {
                        obj.RutaPantalla = (dr["Pantalla"].ToString());
                    }
                    if (dr["IdPerfil"] != DBNull.Value)
                    {
                        obj.IdPerfil = Convert.ToInt32(dr["IdPerfil"].ToString());
                    }
                    if (dr["IdPantalla"] != DBNull.Value)
                    {
                        obj.IdPantalla = Convert.ToInt32(dr["IdPantalla"].ToString());
                    }
                    if (dr["IdPermiso"] != DBNull.Value)
                    {
                        obj.IdPermiso = Convert.ToInt32(dr["IdPermiso"].ToString());
                    }
                    if (dr["ST_C_AP_LEER"] != DBNull.Value)
                    {
                        obj.ST_C_AP_LEER = Convert.ToBoolean(dr["ST_C_AP_LEER"]);
                    }
                    if (dr["ST_C_AP_LEERYESCRIBIR"] != DBNull.Value)
                    {
                        obj.ST_C_AP_LEERYESCRIBIR = Convert.ToBoolean(dr["ST_C_AP_LEERYESCRIBIR"]);
                    }

                    lst.Add(obj);
                }
            }
            return(lst);
        }
        public int InsUpdPerfiles(EntPerfil Dobj, string opc, string tipo)
        {
            Respuesta <int> res = new Respuesta <int>();

            DBParameterCollection pcol = ParamConfiguracion.LLenaPerfiles(Dobj, opc, tipo);

            using (dr = db.ExecuteDataReader(Procedimientos.SpPerfiles, pcol, conm, tranm, CommandType.StoredProcedure))
            {
                while (dr.Read())
                {
                    res = ExisteError(dr);
                    if (!res.EsExitoso)
                    {
                        throw new Exception(res.MensajeUsuario);
                    }
                    else
                    {
                        return(res.TotalRegistros);
                    }
                }
            }
            return(0);
        }