Exemplo n.º 1
0
        //
        // GET: /CuentaGasto/

        public ActionResult Index()
        {
            CuentaGastos cg = new CuentaGastos();

            ViewBag.Model = cg.listCuentaGastos();
            var    jss = new JavaScriptSerializer();
            String js  = jss.Serialize(cg.listCuentaGastos());

            ViewBag.json = js;
            return(View());
        }
Exemplo n.º 2
0
        public JsonResult IndexRest()
        {
            CuentaGastos cg = new CuentaGastos();

            return(Json(cg.listCuentaGastos(), JsonRequestBehavior.AllowGet));
        }