public ActionResult SaveRole(RoleInputDto roleInput)
{
if (!ModelState.IsValid)
{
return this.Json(OperationResult.Error("输入值有错误"));
}
try
{
if (roleInput.Id == Guid.Empty)
{
this.roleService.Add(roleInput);
}
else
{
this.roleService.Update(roleInput);
}
return this.Json(OperationResult.Success("保存成功"));
}
catch (Exception e)
{
return this.Json(OperationResult.Error("保存失败," + e.Message));
}
}