public ActionResult Delete(Guid primaryKey) { long count = _organizeService.GetChildCount(primaryKey); if (count == 0) { int row = _organizeService.Delete(primaryKey); return(row > 0 ? Success() : Error()); } return(Error(string.Format("操作失败,请先删除该项的{0}个子级机构。", count))); }