public ActionResult Delete(int primaryKey) { long count = ItemService.GetChildCount(primaryKey); if (count == 0) { //删除字典。 int row = ItemService.Delete(primaryKey); //删除字典选项。 ItemsDetailService.Delete(primaryKey); return(row > 0 ? Success() : Error()); } return(Warning(string.Format("操作失败,请先删除该项的{0}个子级字典。", count))); }
public async Task <IActionResult> DeleteForm(string keyValue) { await itemsDetailApp.Delete(keyValue, this.TenantId); return(Success("删除成功。")); }
public ActionResult Delete(int primaryKey) { int row = ItemsDetailService.Delete(primaryKey); return(row > 0 ? Success() : Error()); }