コード例 #1
0
        public ActionResult GetZonasByID(int idProvincia)
        {
            var servUbicaciones = new UbicacionesService();
            var listaZonas = new List<ParDeValores>();// { new ParDeValores() { id = 0, descripcion = "Seleccionar.." } };

            listaZonas.AddRange(servUbicaciones.GetZonas(idProvincia).Select(x => new ParDeValores() { id = x.ID, descripcion = x.Descripcion }));
            return Json(
                listaZonas, JsonRequestBehavior.AllowGet
            );
        }
コード例 #2
0
        public ActionResult GetZonas(IEnumerable<int> idProvincias)
        {
            var servUbicaciones = new UbicacionesService();
            var listaZonas = new List<ParDeValores>();// { new ParDeValores() { id = 0, descripcion = "Seleccionar.." } };

            listaZonas.AddRange(servUbicaciones.GetZonas(idProvincias).Select(x => new ParDeValores() { id = x.ID, descripcion = x.Descripcion }));

            ViewBag.ListZonas = listaZonas;

            return PartialView("ComboZonas", new modBondiRicotero());
        }