//编辑保存 public ActionResult SaveEdit(ITC_Organization_M model) { model.Organization_createdtime = DateTime.Now; model.Organization_Oprt = UserContext.UserName; if (uifo.Exists(model.Orga_ID)) { if (uifo.Update(model)) { OrgaContext.InitCache(); EventContext.Add(MenuID, string.Format("修改:{0}", model.Orga_ID)); return(Content("保存成功!")); } else { return(Content("保存失败!")); } } else { return(Content("保存失败! 编码[" + model.Orga_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) { OrgaContext.InitCache(); return(Content("删除成功!")); } else { return(Content("删除失败!")); } }