public ActionResult Delete(int 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))); }
public async Task <IActionResult> DeleteForm(string keyValue) { await organizeApp.Delete(keyValue, this.TenantId); return(Success("删除成功。")); }