public ActionResult Delete(string primaryKey) { var id = int.Parse(primaryKey.Trim()); //if (_unitKpiValueService.GetManay(r => r.SD_EKPI_ID == id)?.Count > 0) //{ // return Error("已被执行,请清库后再进行删除"); //} _kpiValueService.ExDelete(r => r.SD_EKPI_ID == id); _unitKpiValueService.ExDelete(r => r.SD_EKPI_ID == id); int paramRow = _kpiparamService.Delete(r => r.SD_EKPI_ID == id); int setrow = _kpisetService.Delete(r => r.SD_EKPI_ID == id); int row = _kpiService.Delete(r => r.SD_EKPI_ID == id); //_kpiService.RefreshOrder(); return(row > 0 ? Success() : Error()); }
public async Task <IActionResult> Delete(int id) { await _hubContext.Clients.All.SendAsync("SentMess", "message"); return(Ok(await _KPIService.Delete(id))); }