//编辑保存 public ActionResult SaveEdit(ITC_Sysmenus_M model) { model.Menu_createdtime = DateTime.Now; model.Menu_Oprt = UserContext.UserName; if (uifo.Exists(model.Menu_ID)) { if (uifo.Update(model)) { MenuContext.InitCache(); EventContext.Add(MenuID, string.Format("修改:{0}", model.Menu_ID)); return(Content("保存成功!")); } else { return(Content("保存失败!")); } } else { return(Content("保存失败! 编码[" + model.Menu_ID + "]不存在!")); } }
//删除 public ActionResult Delete(string ids) { int count = 0; foreach (string id in ids.Split(',')) { if (uifo.Delete(id)) { EventContext.Add(MenuID, string.Format("删除:{0}", id)); count++; } } if (count > 0) { MenuContext.InitCache(); return(Content("删除成功!")); } else { return(Content("删除失败!")); } }