Detail.razor.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using Microsoft.AspNetCore.Components;
  2. using System;
  3. using System.Threading.Tasks;
  4. using wispro.sp.entity.CompareCase;
  5. using wispro.sp.share;
  6. using wispro.sp.web.Pages.AppCase;
  7. using wispro.sp.web.Services;
  8. namespace wispro.sp.web.Pages.CompareFile
  9. {
  10. public partial class Detail
  11. {
  12. [Inject] public CompareFileService _CompareFileService { get; set; }
  13. int _value = 1;
  14. int _ShowResultString = 1;
  15. CaseInfo _currentCase = null;
  16. [Parameter]
  17. public string caseNo { get; set; }
  18. protected override async Task OnInitializedAsync()
  19. {
  20. QueryFilter _filter = new QueryFilter();
  21. _filter.ConditionTree.Add(
  22. new FieldCondition()
  23. {
  24. FieldName = "CaseNo",
  25. LogicOperate = LogicEnum.And,
  26. Operator = OperatorEnum.Contains,
  27. Value = caseNo,
  28. ValueType = "System.String"
  29. }
  30. );
  31. _filter.PageIndex = 1;
  32. _filter.PageSize = 10;
  33. var data = await _CompareFileService.Query(_filter);
  34. var _caseList = data.Results;
  35. var _total = data.TotalCount;
  36. if (_total > 0)
  37. {
  38. _currentCase = _caseList[0];
  39. }
  40. else
  41. {
  42. Console.WriteLine("没找到案件!");
  43. }
  44. StateHasChanged();
  45. }
  46. }
  47. }