Exemplo n.º 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));
            }
        }
Exemplo n.º 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));
        }