2013年8月23日

摘要: 页面JS代码 Controller里的代码 [HttpGet] public ActionResult Form(int? id) { QueryType(); EntryModel model = new EntryModel(); if (id != null) { model = business.Get(id.Value); } return View(model); } ... 阅读全文

posted @ 2013-08-23 14:52 !sylar 阅读(291) 评论(0) 推荐(0) 编辑

摘要: [HttpPost] public ActionResult Form(NewsModel model) { if (ModelState.IsValid) { if (model.Id == 0) { cmd.Add(model); } else { cmd.Update(model.Id... 阅读全文

posted @ 2013-08-23 14:46 !sylar 阅读(562) 评论(0) 推荐(0) 编辑