예제 #1
0
        public ActionResult AddOrEdit(int id = 0)
        {
            if (id == 0)
            {
                return(View(new Notice()));
            }
            else
            {
                var mile = _dal.Get <Notice>(id);

                return(View(mile));
            }
        }
예제 #2
0
        public ActionResult Detail(int id = 0)
        {
            ViewBag.Title = "活动详情";

            if (id == 0)
            {
                return(RedirectToAction("Index"));
            }

            var notice = dal.Get <Notice>(id);

            return(View(notice));
        }