public JsonNetResult SaveMenu(BW_Menu entity) { if (entity.ID == 0) { #region 维护新增数据 entity.MenuType = (int)MenuTypeEnum.Menu; entity.CreateOn = DateTime.Now; entity.CreateBy = ""; #endregion } else { #region 维护修改数据 entity.EditOn = DateTime.Now; entity.EditBy = ""; #endregion } var r = entity.Save(); if (r > 0) { return ExController.JsonNet(entity); } return ExController.JsonNet(new { ID = 0 }); }
public JsonResult SaveAuthorityBtn(BW_Menu entity) { entity.MenuType = (int)MenuTypeEnum.AuthorityBtn; entity.CreateOn = DateTime.Now; entity.CreateBy = ""; var r = entity.Save(); if (r > 0) { return ExController.JsonNet(entity); } return ExController.JsonNet(new { ID = 0 }); }
public long DeleteMenu(BW_Menu entity) { return entity.Delete(); }