コード例 #1
0
        public ActionResult Delete(int id)
        {
            BL_Districts bL_Districts = new BL_Districts();

            bL_Districts.DeleteDistrict(id);

            return(RedirectToAction("AllDistricts"));
        }
コード例 #2
0
        public ActionResult AllDistricts()
        {
            BL_Districts bL_Districts = new BL_Districts();

            List <District> districts_List = bL_Districts.Districts.ToList();

            return(View(districts_List));
        }
コード例 #3
0
        public ActionResult Create(District district)
        {
            if (ModelState.IsValid)
            {
                BL_Districts bL_Districts = new BL_Districts();
                bL_Districts.InsertDistrict(district);

                return(RedirectToAction("AllDistricts"));
            }
            return(View());
        }