Ejemplo n.º 1
0
        public ActionResult Edit(int id)
        {
            string role = new Business.AccountBusiness().currentMember();

            if (role == "U" || role == "A")
            {
                return(RedirectToAction("Login", "Account"));
            }
            var district = webApi.GetDistrict(id);

            ViewBag.Areas  = new SelectList(webApi.GetAreas(), "AREA_ID", "AREA_NAME", district.CITY.AREA.AREA_ID);
            ViewBag.Cities = new SelectList(webApi.GetCitiesByAreas(district.CITY.AREA.AREA_ID), "CITY_ID", "CITY_NAME");
            return(View(district));
        }