示例#1
0
        public void getEventosXML()
        {
            try
            {
                Controllers.EventosController obEventosController = new Controllers.EventosController();
                var lstclsEventos = obEventosController.getEventosXMLController();

                if (lstclsEventos != null)
                {
                    gvwDatos.DataSource = lstclsEventos;
                }
                else
                {
                    gvwDatos.DataSource = null;
                }

                gvwDatos.DataBind();
            }
            catch (Exception ex)
            {
                ClientScript.RegisterStartupScript(this.GetType(), "Mensaje", "<script> swal('Error','" + ex.Message + "','error') </script>");
            }
        }
示例#2
0
        void getEventosJson()
        {
            try
            {
                Controllers.EventosController   obEventosController = new Controllers.EventosController();
                List <Logica.Models.clsEventos> lstclsEventos       = obEventosController.getEventosJsonController();

                if (lstclsEventos.Count > 0)
                {
                    gvwDatosJson.DataSource = lstclsEventos;
                }
                else
                {
                    gvwDatosJson.DataSource = null;
                }
                gvwDatosJson.DataBind();
            }
            catch (Exception ex)
            {
                Logica.BL.clsGeneral obclsGeneral = new Logica.BL.clsGeneral();
                string stError = obclsGeneral.Log(ex.Message.ToString());
                ClientScript.RegisterStartupScript(this.GetType(), "mensaje", "<script>swal('Error!', '" + stError + "', 'error')</script>");
            }
        }