Пример #1
0
        public RespuestaComunBE GetCatEspecifico(string sIdCatalogo, string sValorFiltro = "")
        {
            CatalogosDA      oCatalogosDA     = new CatalogosDA();
            CatGeneralesBE   item             = new CatGeneralesBE();
            ConfiguracionDA  oConfiguracionDA = new ConfiguracionDA();
            RespuestaComunBE Respuesta        = new RespuestaComunBE();
            ConfiguracionBE  itemConfig       = new ConfiguracionBE();


            string sConexionString = string.Empty;

            //itemConfig.psIDCONFIGAPP =  ConfigurationSettings.AppSettings["IELDBConn"].ToString();

            //Respuesta = oConfiguracionDA.GetConfigAPP(itemConfig);
            sConexionString = System.Configuration.ConfigurationManager.ConnectionStrings["IELDBConn"].ConnectionString;

            item.psIDCATGENERALES = sIdCatalogo;

            Respuesta = GetCatGenerales(item);

            item = Respuesta.lstCatGenerales[0];
            item.psVALORFILTRO = sValorFiltro;

            Respuesta = oCatalogosDA.GetCatEspecifico(Respuesta.lstCatGenerales[0], sConexionString);

            return(Respuesta);
        }
Пример #2
0
        public RespuestaComunBE AddConfigAPP(ConfiguracionBE item, string sConexionString)
        {
            RespuestaComunBE RespuestaComun = new RespuestaComunBE();
            OleDbCommand     Comando        = new OleDbCommand();
            OleDbConnection  Conexion       = new OleDbConnection();
            OleDbTransaction Transaccion    = null;
            string           sComando       = string.Empty;
            StringBuilder    sMensajeError  = new StringBuilder();
            string           sResultado     = string.Empty;

            RespuestaComun.itemError           = new ErrorBE();
            RespuestaComun.itemError.psMensaje = new StringBuilder(string.Empty);

            try
            {
                Conexion.ConnectionString = sConexionString;
                Conexion.Open();
                Transaccion         = Conexion.BeginTransaction();
                Comando.Connection  = Conexion;
                Comando.Transaction = Transaccion;

                sComando               = "spAddConfigApp";
                Comando.CommandText    = sComando;
                Comando.CommandType    = CommandType.StoredProcedure;
                Comando.CommandTimeout = 0;
                Comando.Parameters.Clear();

                Comando.Parameters.Add(new OleDbParameter("DESCRIPCION", item.psDESCRIPCION)).Direction  = ParameterDirection.Input;
                Comando.Parameters.Add(new OleDbParameter("VALOR", item.psVALOR)).Direction              = ParameterDirection.Input;
                Comando.Parameters.Add(new OleDbParameter("ACTIVO", item.psACTIVO)).Direction            = ParameterDirection.Input;
                Comando.Parameters.Add(new OleDbParameter("IDCONFIGAPPNEW", OleDbType.BigInt)).Direction = ParameterDirection.Output;

                //[15102015][falta agregar la instruccion que obtiene el nombre del metodo]RespuestaComun.itemError.psMensaje.Append("[spGetConfigApp]");
                RespuestaComun.itemError.psMensaje.Append("[spAddConfigApp]");

                Comando.ExecuteNonQuery();
                RespuestaComun.psIDCONFIGAPP = Comando.Parameters["IDCONFIGAPPNEW"].Value.ToString();

                Transaccion.Commit();
                RespuestaComun.itemError.pbFlag = true;
            }
            catch (Exception Ex)
            {
                //Generar una deccion para crear Log de errores
                RespuestaComun.itemError.psMensaje.Append("[");
                RespuestaComun.itemError.psMensaje.Append(Ex.Message);
                RespuestaComun.itemError.psMensaje.Append("]");
                RespuestaComun.itemError.pbFlag = false;
            }
            finally
            {
                Transaccion.Dispose();
                Transaccion = null;
                Comando.Dispose();
                Comando = null;
                Conexion.Close();
                Conexion = null;
            }
            return(RespuestaComun);
        }
Пример #3
0
        private List <CatalogosBE> GetDdlCatalogos(string sIdCatalogo, bool bEsCatalogo, string sValorFiltro)
        {
            CatalogosBR      oCommonServiceClient = new CatalogosBR();
            RespuestaComunBE Respuesta            = new RespuestaComunBE();

            List <CatalogosBE> lstCatalogos = new List <CatalogosBE>();

            if (sIdCatalogo != "0")
            {
                Respuesta = oCommonServiceClient.GetCatEspecifico(sIdCatalogo, sValorFiltro);
            }
            else
            {
                return(lstCatalogos);
            }

            List <CatalogosBE> lstDdl = new List <CatalogosBE>();
            CatalogosBE        item   = new CatalogosBE();

            if (bEsCatalogo)
            {
                item.ID          = "0";
                item.DESCRIPCION = "Seleccione Opción..";
                lstDdl.Add(item);
            }
            lstDdl.AddRange(Respuesta.lstCatalogo);
            lstCatalogos = lstDdl;

            return(lstCatalogos);
        }
Пример #4
0
        private List <CatGeneralesBE> GetCatGenerales(string sIdCatGenerales = null)
        {
            List <CatGeneralesBE> lstCatGenerales = new List <CatGeneralesBE>();
            CatalogosBR           oCatBus         = new CatalogosBR();
            RespuestaComunBE      RespuestaComun  = new RespuestaComunBE();
            CatGeneralesBE        item            = new CatGeneralesBE();


            item.psIDCATGENERALES = sIdCatGenerales;
            RespuestaComun        = oCatBus.GetCatGenerales(item);

            if (RespuestaComun.itemError.pbFlag)
            {
                if (sIdCatGenerales == null)
                {
                    ViewState["lstCatGenerales"] = RespuestaComun.lstCatGenerales;
                }
                else
                {
                    item.psNOMBRECATALOGO = RespuestaComun.lstCatGenerales[0].psNOMBRECATALOGO.ToString();
                    item.psIDCATALOGO     = RespuestaComun.lstCatGenerales[0].psIDCATALOGO.ToString();
                    item.psFILTRO         = RespuestaComun.lstCatGenerales[0].psFILTRO.ToString();
                    item.psDESCRIPCION    = RespuestaComun.lstCatGenerales[0].psDESCRIPCION.ToString();
                    item.psACTIVO         = RespuestaComun.lstCatGenerales[0].psACTIVO;

                    CatGeneralesWUC.SetCatGenerales(item);
                }
            }
            lstCatGenerales = RespuestaComun.lstCatGenerales;


            return(lstCatGenerales);
        }
Пример #5
0
        private void SetDdlCatalogos(DropDownList ddl, string sIdCatalogo, string sValorFiltro = "")
        {
            CatalogosBR      oBus      = new CatalogosBR();
            RespuestaComunBE Respuesta = new RespuestaComunBE();


            if (sIdCatalogo != "0")
            {
                Respuesta = oBus.GetCatEspecifico(sIdCatalogo, sValorFiltro);
            }
            else
            {
                return;
            }

            List <CatalogosBE> lstDdl = new List <CatalogosBE>();
            CatalogosBE        item   = new CatalogosBE();

            item.ID          = "0";
            item.DESCRIPCION = "Seleccione Opción..";

            lstDdl.Add(item);
            lstDdl.AddRange(Respuesta.lstCatalogo);

            ddl.DataSource     = lstDdl;
            ddl.DataValueField = "ID";
            ddl.DataTextField  = "DESCRIPCION";

            ddl.DataBind();
        }
Пример #6
0
        private List <ConfiguracionBE> GetConfiguracion(string sIdConfiguracion = null)
        {
            List <ConfiguracionBE> lstConfiguracion = new List <ConfiguracionBE>();
            ConfiguracionBR        oConBus          = new ConfiguracionBR();
            RespuestaComunBE       RespuestaComun   = new RespuestaComunBE();
            ConfiguracionBE        item             = new ConfiguracionBE();


            item.psIDCONFIGAPP = sIdConfiguracion;
            RespuestaComun     = oConBus.GetConfigAPP(item);

            if (RespuestaComun.itemError.pbFlag)
            {
                if (sIdConfiguracion == null)
                {
                    ViewState["lstCatGenerales"] = RespuestaComun.lstConfiguracion;
                }
                else
                {
                    item.psIDCONFIGAPP = RespuestaComun.lstConfiguracion[0].psIDCONFIGAPP.ToString();
                    item.psDESCRIPCION = RespuestaComun.lstConfiguracion[0].psDESCRIPCION.ToString();
                    item.psVALOR       = RespuestaComun.lstConfiguracion[0].psVALOR.ToString();
                    item.psACTIVO      = RespuestaComun.lstConfiguracion[0].psACTIVO;

                    ConfiguracionWUC.SetConfiguracion(item);
                }
            }
            lstConfiguracion = RespuestaComun.lstConfiguracion;


            return(lstConfiguracion);
        }
Пример #7
0
        public RespuestaComunBE GetConfigAPP(ConfiguracionBE item)
        {
            ConfiguracionDA  oConfiguracionDA = new ConfiguracionDA();
            RespuestaComunBE Respuesta        = new RespuestaComunBE();
            ConfiguracionBE  itemConfig       = new ConfiguracionBE();

            Respuesta = oConfiguracionDA.GetConfigAPP(item);

            return(Respuesta);
        }
Пример #8
0
        protected void ddlCatGenerales_TextChanged(object sender, EventArgs e)
        {
            RespuestaComunBE Respuesta    = new RespuestaComunBE();
            CommonBR         oBus         = new CommonBR();
            string           sNombreTabla = ddlCatGenerales.SelectedItem.ToString();

            Respuesta = oBus.GetDefinicionTabla(sNombreTabla);

            txtColumnaId.Text   = Respuesta.psIdentityTabla;
            txtDescripcion.Text = Respuesta.psDescripcionTabla;
        }
Пример #9
0
        private void AddConfiguracion()
        {
            ConfiguracionBR  oConBus        = new ConfiguracionBR();
            RespuestaComunBE RespuestaComun = new RespuestaComunBE();
            ConfiguracionBE  item           = new ConfiguracionBE();

            item = ConfiguracionWUC.GetConfiguracion();

            RespuestaComun = oConBus.AddConfigAPP(item);



            if (RespuestaComun.itemError.pbFlag)
            {
                SetGrid(true);
            }
        }
Пример #10
0
        public RespuestaComunBE SetConfigAPP(ConfiguracionBE item)
        {
            ConfiguracionDA  oConfiguracionDA = new ConfiguracionDA();
            RespuestaComunBE Respuesta        = new RespuestaComunBE();
            ConfiguracionBE  itemConfig       = new ConfiguracionBE();

            string sConexionString = string.Empty;

            itemConfig.psIDCONFIGAPP = ConfigurationSettings.AppSettings["IELDBConn"].ToString();

            Respuesta       = oConfiguracionDA.GetConfigAPP(itemConfig);
            sConexionString = Respuesta.lstConfiguracion[0].psVALOR;

            Respuesta = oConfiguracionDA.SetConfigAPP(item, sConexionString);

            return(Respuesta);
        }
Пример #11
0
        private void AddCatGenerales()
        {
            CatalogosBR      oCatBus        = new CatalogosBR();
            RespuestaComunBE RespuestaComun = new RespuestaComunBE();
            CatGeneralesBE   item           = new CatGeneralesBE();

            item = CatGeneralesWUC.GetCatGenerales();

            RespuestaComun = oCatBus.AddCatGenerales(item);



            if (RespuestaComun.itemError.pbFlag)
            {
                SetGrid(true);
            }
        }
Пример #12
0
        public RespuestaComunBE SetCatGenerales(CatGeneralesBE item)
        {
            CatalogosDA      oCatalogosDA     = new CatalogosDA();
            ConfiguracionDA  oConfiguracionDA = new ConfiguracionDA();
            RespuestaComunBE Respuesta        = new RespuestaComunBE();
            ConfiguracionBE  itemConfig       = new ConfiguracionBE();

            string sConexionString = string.Empty;

            //itemConfig.psIDCONFIGAPP =  ConfigurationSettings.AppSettings["IELDBConn"].ToString();

            //Respuesta = oConfiguracionDA.GetConfigAPP(itemConfig);
            sConexionString = System.Configuration.ConfigurationManager.ConnectionStrings["IELDBConn"].ConnectionString;

            Respuesta = oCatalogosDA.SetCatGenerales(item, sConexionString);

            return(Respuesta);
        }
Пример #13
0
        public RespuestaComunBE GetDefinicionTabla(string sNombreTabla)
        {
            CommonDA           oCommonDA        = new CommonDA();
            ConfiguracionDA    oConfiguracionDA = new ConfiguracionDA();
            RespuestaComunBE   Respuesta        = new RespuestaComunBE();
            ConfiguracionBE    itemConfig       = new ConfiguracionBE();
            List <CatalogosBE> lsCatalogos      = new List <CatalogosBE>();


            string sConexionString = string.Empty;

            itemConfig.psIDCONFIGAPP = ConfigurationSettings.AppSettings["IELDBConn"].ToString();

            Respuesta       = oConfiguracionDA.GetConfigAPP(itemConfig);
            sConexionString = Respuesta.lstConfiguracion[0].psVALOR;

            Respuesta = oCommonDA.GetDefinicionTabla(sNombreTabla, sConexionString);

            return(Respuesta);
        }
Пример #14
0
        public void SetGrid(string sIdCatalogo, bool bCargaInicial = false)
        {
            List <CatalogosBE> lstCatalogo = new List <CatalogosBE>();

            txtDescripcion.Text      = string.Empty;
            ViewState["sIdCatalogo"] = sIdCatalogo;
            if (bCargaInicial)
            {
                CatalogosBR oBus = new CatalogosBR();

                RespuestaComunBE Respuesta = new RespuestaComunBE();

                Respuesta = oBus.GetCatEspecifico(sIdCatalogo, "");
                ViewState["lstCatalogo"] = Respuesta.lstCatalogo;

                Respuesta = null;
            }

            lstCatalogo = (List <CatalogosBE>)ViewState["lstCatalogo"];
            grdAdmonCatalogos.DataSource = lstCatalogo;
            grdAdmonCatalogos.DataBind();
        }
Пример #15
0
        /// <summary>
        /// Actualiza catalogo espeficico. Definición de todos los catalogos de la aplicación
        /// </summary>
        /// <param name="item">Se usa CatGeneralesBE Total mente llena para insertar</param>
        /// <param name="sConexionString">cadena de conexión que se obtiene de la clase ConfiguracionDA</param>
        /// <returns>RespuestaComun.lstCatGenerales</returns>
        public RespuestaComunBE SetCatEspecifico(CatGeneralesBE item, string sConexionString)
        {
            RespuestaComunBE       RespuestaComun = new RespuestaComunBE();
            List <ConfiguracionBE> lstClienteOld  = new List <ConfiguracionBE>();
            OleDbCommand           Comando        = new OleDbCommand();
            OleDbConnection        Conexion       = new OleDbConnection();
            OleDbTransaction       Transaccion    = null;
            string        sComando      = string.Empty;
            StringBuilder sMensajeError = new StringBuilder();
            string        sResultado    = string.Empty;

            RespuestaComun.itemError           = new ErrorBE();
            RespuestaComun.itemError.psMensaje = new StringBuilder(string.Empty);

            try
            {
                Conexion.ConnectionString = sConexionString;
                Conexion.Open();
                Transaccion         = Conexion.BeginTransaction();
                Comando.Connection  = Conexion;
                Comando.Transaction = Transaccion;

                sComando               = "spSetCatEspecifico";
                Comando.CommandText    = sComando;
                Comando.CommandType    = CommandType.StoredProcedure;
                Comando.CommandTimeout = 0;
                Comando.Parameters.Clear();

                Comando.Parameters.Add(new OleDbParameter("IDCATGENERALES", item.psIDCATGENERALES)).Direction = ParameterDirection.Input;
                Comando.Parameters.Add(new OleDbParameter("NOMBRECATALOGO", item.psNOMBRECATALOGO)).Direction = ParameterDirection.Input;
                Comando.Parameters.Add(new OleDbParameter("IDCATALOGO", item.psIDCATALOGO)).Direction         = ParameterDirection.Input;
                Comando.Parameters.Add(new OleDbParameter("DESCRIPCION", item.psDESCRIPCION)).Direction       = ParameterDirection.Input;
                Comando.Parameters.Add(new OleDbParameter("FILTRO", item.psFILTRO)).Direction = ParameterDirection.Input;
                Comando.Parameters.Add(new OleDbParameter("ACTIVO", item.psACTIVO)).Direction = ParameterDirection.Input;



                //[15102015][falta agregar la instruccion que obtiene el nombre del metodo]RespuestaComun.itemError.psMensaje.Append("[spGetConfigApp]");
                RespuestaComun.itemError.psMensaje.Append("[spSetCatGenerales]");

                Comando.ExecuteNonQuery();
                Transaccion.Commit();

                RespuestaComun.itemError.pbFlag = true;
            }
            catch (Exception Ex)
            {
                //Generar una deccion para crear Log de errores
                RespuestaComun.itemError.psMensaje.Append("[");
                RespuestaComun.itemError.psMensaje.Append(Ex.Message);
                RespuestaComun.itemError.psMensaje.Append("]");
                RespuestaComun.itemError.pbFlag = false;
            }
            finally
            {
                Transaccion.Dispose();
                Transaccion = null;
                Comando.Dispose();
                Comando = null;
                Conexion.Close();
                Conexion = null;
            }
            return(RespuestaComun);
        }
Пример #16
0
        /// <summary>
        /// Consulta de catalogo espeficico. Definición de todos los catalogos de la aplicación
        /// </summary>
        /// <param name="item">Se usa CatGeneralesBE para la consulta, Se requiere el idCatGenerales</param>
        /// <param name="sConexionString">cadena de conexión que se obtiene de la clase ConfiguracionDA</param>
        /// <returns>RespuestaComun.lstCatGenerales</returns>
        public RespuestaComunBE GetCatEspecifico(CatGeneralesBE item, string sConexionString)
        {
            RespuestaComunBE RespuestaComun = new RespuestaComunBE();
            OleDbCommand     Comando        = new OleDbCommand();
            OleDbConnection  Conexion       = new OleDbConnection();
            OleDbDataReader  Lector         = null;
            string           sComando       = string.Empty;
            StringBuilder    sMensajeError  = new StringBuilder();
            string           sResultado     = string.Empty;

            RespuestaComun.lstCatalogo         = new List <CatalogosBE>();
            RespuestaComun.itemError           = new ErrorBE();
            RespuestaComun.itemError.psMensaje = new StringBuilder(string.Empty);

            try
            {
                Conexion.ConnectionString = sConexionString;
                Conexion.Open();
                Comando.Connection = Conexion;

                sComando               = "spGetCatEspecifico";
                Comando.CommandText    = sComando;
                Comando.CommandType    = CommandType.StoredProcedure;
                Comando.CommandTimeout = 0;
                Comando.Parameters.Clear();

                Comando.Parameters.Add(new OleDbParameter("IDCATGENERALES", item.psIDCATGENERALES)).Direction = ParameterDirection.Input;
                Comando.Parameters.Add(new OleDbParameter("NOMBRECATALOGO", item.psNOMBRECATALOGO)).Direction = ParameterDirection.Input;
                Comando.Parameters.Add(new OleDbParameter("IDCATALOGO", item.psIDCATALOGO)).Direction         = ParameterDirection.Input;
                Comando.Parameters.Add(new OleDbParameter("DESCRIPCION", item.psDESCRIPCION)).Direction       = ParameterDirection.Input;
                Comando.Parameters.Add(new OleDbParameter("FILTRO", item.psFILTRO)).Direction           = ParameterDirection.Input;
                Comando.Parameters.Add(new OleDbParameter("ACTIVO", item.psACTIVO)).Direction           = ParameterDirection.Input;
                Comando.Parameters.Add(new OleDbParameter("VALORFILTRO", item.psVALORFILTRO)).Direction = ParameterDirection.Input;


                //[15102015][falta agregar la instruccion que obtiene el nombre del metodo]RespuestaComun.itemError.psMensaje.Append("[spGetConfigApp]");
                RespuestaComun.itemError.psMensaje.Append("[spGetCatEspecifico]");

                Lector = Comando.ExecuteReader();

                if (Lector.HasRows)
                {
                    while (Lector.Read())
                    {
                        CatalogosBE itemLector = new CatalogosBE();

                        itemLector.ID          = Lector["ID"].ToString();
                        itemLector.DESCRIPCION = Lector["DESCRIPCION"].ToString();

                        RespuestaComun.lstCatalogo.Add(itemLector);
                    }
                }
                RespuestaComun.itemError.pbFlag = true;
            }
            catch (Exception Ex)
            {
                //Generar una deccion para crear Log de errores
                RespuestaComun.itemError.psMensaje.Append("[");
                RespuestaComun.itemError.psMensaje.Append(Ex.Message);
                RespuestaComun.itemError.psMensaje.Append("]");
                RespuestaComun.itemError.pbFlag = false;
            }
            finally
            {
                Lector.Close();
                Lector.Dispose();
                Lector = null;
                Comando.Dispose();
                Comando = null;
                Conexion.Close();
                Conexion = null;
            }
            return(RespuestaComun);
        }
Пример #17
0
        public RespuestaComunBE GetConfigAPP(ConfiguracionBE item)
        {
            RespuestaComunBE RespuestaComun  = new RespuestaComunBE();
            OleDbCommand     Comando         = new OleDbCommand();
            OleDbConnection  Conexion        = new OleDbConnection();
            OleDbDataReader  Lector          = null;
            string           sComando        = string.Empty;
            StringBuilder    sMensajeError   = new StringBuilder();
            string           sConexionString = @"Provider=SQLOLEDB;Server=192.168.10.102\SQLEXPRESS;Database=Seguridad;UID=sa; Pwd=S3gur1d4d*";
            //string sConexionString = @"Provider=SQLOLEDB;Server=JCMARTINEZ-PC\SQL2012;Database=seguridadlatinoqa;Uid=pvldev; Pwd=dominico";
            string sResultado = string.Empty;

            RespuestaComun.lstConfiguracion    = new List <ConfiguracionBE>();
            RespuestaComun.itemError           = new ErrorBE();
            RespuestaComun.itemError.psMensaje = new StringBuilder(string.Empty);

            try
            {
                Conexion.ConnectionString = sConexionString;
                Conexion.Open();
                Comando.Connection = Conexion;

                sComando               = "spGetConfigApp";
                Comando.CommandText    = sComando;
                Comando.CommandType    = CommandType.StoredProcedure;
                Comando.CommandTimeout = 0;
                Comando.Parameters.Clear();

                Comando.Parameters.Add(new OleDbParameter("IDCONFIGAPP", item.psIDCONFIGAPP)).Direction = ParameterDirection.Input;

                //[15102015][falta agregar la instruccion que obtiene el nombre del metodo]RespuestaComun.itemError.psMensaje.Append("[spGetConfigApp]");
                RespuestaComun.itemError.psMensaje.Append("[spGetConfigApp]");

                Lector = Comando.ExecuteReader();

                if (Lector.HasRows)
                {
                    while (Lector.Read())
                    {
                        ConfiguracionBE itemLector = new ConfiguracionBE();

                        itemLector.psIDCONFIGAPP = Lector["IDCONFIGAPP"].ToString();
                        itemLector.psDESCRIPCION = Lector["DESCRIPCION"].ToString();
                        itemLector.psVALOR       = Lector["VALOR"].ToString();
                        itemLector.psACTIVO      = Lector["ACTIVO"].ToString();


                        RespuestaComun.lstConfiguracion.Add(itemLector);
                    }
                }
                RespuestaComun.itemError.pbFlag = true;
            }
            catch (Exception Ex)
            {
                //Generar una deccion para crear Log de errores
                RespuestaComun.itemError.psMensaje.Append("[");
                RespuestaComun.itemError.psMensaje.Append(Ex.Message);
                RespuestaComun.itemError.psMensaje.Append("]");
                RespuestaComun.itemError.pbFlag = false;
            }
            finally
            {
                Lector.Close();
                Lector.Dispose();
                Lector = null;
                Comando.Dispose();
                Comando = null;
                Conexion.Close();
                Conexion = null;
            }
            return(RespuestaComun);
        }
Пример #18
0
        /// <summary>
        /// Ejecuta el sl_help de la tabla que se envia
        /// </summary>
        /// <param name="sNombreTabla"> Nombre de la tabla a consultar</param>
        /// <param name="sConexionString"> cadena de conexión que se obtiene de la clase ConfiguracionDA</param>
        /// <returns>En lstCatalogos[].DESCRIPCION se regresa el nombre de las columnas de la tabla. En psIdentityTabla Se regresa el Identity de la tabla
        ///</returns>
        public RespuestaComunBE GetDefinicionTabla(string sNombreTabla, string sConexionString)
        {
            RespuestaComunBE RespuestaComun = new RespuestaComunBE();
            OleDbCommand     Comando        = new OleDbCommand();
            OleDbConnection  Conexion       = new OleDbConnection();
            OleDbDataReader  Lector         = null;
            string           sComando       = string.Empty;
            StringBuilder    sMensajeError  = new StringBuilder();
            string           sResultado     = string.Empty;

            RespuestaComun.lstCatalogo         = new List <CatalogosBE>();
            RespuestaComun.itemError           = new ErrorBE();
            RespuestaComun.itemError.psMensaje = new StringBuilder(string.Empty);

            try
            {
                Conexion.ConnectionString = sConexionString;
                Conexion.Open();
                Comando.Connection = Conexion;

                sComando               = "spGetDefinicionTabla";
                Comando.CommandText    = sComando;
                Comando.CommandType    = CommandType.StoredProcedure;
                Comando.CommandTimeout = 0;
                Comando.Parameters.Clear();

                Comando.Parameters.Add(new OleDbParameter("NombreTabla", sNombreTabla)).Direction = ParameterDirection.Input;


                //[15102015][falta agregar la instruccion que obtiene el nombre del metodo]RespuestaComun.itemError.psMensaje.Append("[spGetConfigApp]");
                RespuestaComun.itemError.psMensaje.Append("[spGetDefinicionTabla]");

                Lector = Comando.ExecuteReader();

                if (Lector.HasRows)
                {
                    Lector.NextResult();
                    while (Lector.Read())
                    {
                        CatalogosBE itemLector = new CatalogosBE();

                        itemLector.DESCRIPCION = Lector["Column_name"].ToString();

                        RespuestaComun.lstCatalogo.Add(itemLector);
                    }

                    Lector.NextResult();
                    while (Lector.Read())
                    {
                        //Se encuentra el nombre de la columna IDentity
                        RespuestaComun.psIdentityTabla    = Lector["Identity"].ToString();
                        RespuestaComun.psDescripcionTabla = "Descripcion";
                    }
                }

                RespuestaComun.itemError.pbFlag = true;
            }
            catch (Exception Ex)
            {
                //Generar una deccion para crear Log de errores
                RespuestaComun.itemError.psMensaje.Append("[");
                RespuestaComun.itemError.psMensaje.Append(Ex.Message);
                RespuestaComun.itemError.psMensaje.Append("]");
                RespuestaComun.itemError.pbFlag = false;
            }
            finally
            {
                Lector.Close();
                Lector.Dispose();
                Lector = null;
                Comando.Dispose();
                Comando = null;
                Conexion.Close();
                Conexion = null;
            }
            return(RespuestaComun);
        }