public JsonResult Edit(Menu menu) { int result = 0; if (menu.ID != 0) { menu.CreateTime = DateTime.Now; result = IMenuBLL.Update(menu); } else { menu.CreateTime = DateTime.Now; var model = IMenuBLL.InsertToEntity(menu); result = model.ID; } return(Json(result, JsonRequestBehavior.AllowGet)); }