コード例 #1
0
 public ActionResult Edit(NewsTypeModel type)
 {
     if (ModelState.IsValid)
     {
         type.Save(_messageDao);
         return RedirectToAction("Index");
     }
     return View(type);
 }
コード例 #2
0
 public ActionResult Edit(string id)
 {
     var result = new NewsTypeModel(_messageDao.NewsTypeDao.Get(id));
     return View(result);
 }
コード例 #3
0
        public ActionResult Create()
        {
            var result = new NewsTypeModel { Name = "new message type" };

            return View(result);
        }