public ActionResult Create(X_Menu menu) { entities.X_Menu.Add(menu); entities.SaveChanges(); var data = new { statusCode = "200", message = "操作成功", navTabId = "MasterSystemMenuSelect", rel = "", callbackType = "closeCurrent", forwardUrl = "" }; return(Json(data)); }
public ActionResult Delete(Int32 id) { X_Menu model = new X_Menu() { Id = id }; entities.Entry(model).State = System.Data.Entity.EntityState.Deleted; entities.SaveChanges(); var data = new { statusCode = "200", message = "操作成功", navTabId = "MasterSystemMenuSelect", rel = "", callbackType = "closeCurrent", forwardUrl = "" }; return(Json(data)); }
public ActionResult Update(X_Menu menu) { X_Menu model = entities.X_Menu.Find(menu.Id); model.Name = menu.Name; model.Order = menu.Order; model.ParentId = menu.ParentId; model.Area = menu.Area; model.Ctrl = menu.Ctrl; model.Action = menu.Action; entities.SaveChanges(); var data = new { statusCode = "200", message = "操作成功", navTabId = "MasterSystemMenuSelect", rel = "", callbackType = "closeCurrent", forwardUrl = "" }; return(Json(data)); }