public async Task<bool> DeleteFormAsync(string keyValue) { var listItemDetails = await _itemDetailsService.FindListByClauseAsync(s => s.ItemId.Equals(keyValue)); if (listItemDetails.Count() > 0) throw new System.Exception("删除数据失败,改数据已产生数据!"); var entity = _repository.FindById(keyValue); await entity.Remove(); return await _repository.UpdateAsync(entity); }
public async Task <string> GetSubData(string id, int page, int limit, string key) { var data = await _itemDetailsService.FindListByClauseAsync(id, key); return(JsonHelper.Instance.Serialize(new TableDataModel { count = data.Count(), data = data.ToList() })); }