Beispiel #1
0
        public void Catalogos()
        {
            _sMensaje = "";

            _eCatList = new List <ECatalogo>();

            try
            {
                //Procs = Procedimientos.sp_TraeCatalogo;
                SClaveCat     = ClaveCatalogo;
                lLlaveTipoCat = LlaveTipoCat;
                _ds           = TraeCatalogo();

                if (Exception == null)
                {
                    if (_ds != null || _ds.Tables.Count > 0 || _ds.Tables[0].Rows.Count > 0)
                    {
                        foreach (DataRow _dr in _ds.Tables[0].Rows)
                        {
                            _eCat = new ECatalogo
                            {
                                Llave = (int)_dr["llave"],
                                Texto = (string)_dr["texto"]
                            };

                            _eCatList.Add(_eCat);
                        }
                    }
                }
            }
            catch (Exception err)
            {
                _Exception = err;
            }
        } // Catalogos
Beispiel #2
0
        public nCatalogo() : base(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString)
        {
            _sSubClase = "nCatalogo";


            _Exception = null;
            _eCatList  = new List <ECatalogo>();
            _eCat      = new ECatalogo();
            DB         = null;
        }