/// <summary> /// 添加权限 /// </summary> /// <param name="model"></param> /// <returns></returns> public ActionResult EditAuthority(Authority model) { AjaxReturnData result = new AjaxReturnData(); int EditCount = 0; if (string.IsNullOrEmpty(model.ObjectId)) { //新增 model.ObjectId = Guid.NewGuid().ToString(); EditCount = _authority.Insert <Authority>(model); } else { Dictionary <string, object> param = new Dictionary <string, object>(); param.Add("ObjectId", model.ObjectId); //修改 EditCount = _authority.UpdateTable <Authority>(model, param); } if (EditCount < 0) { result.States = false; } return(AjaxJson(result)); }