using AntDesign; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Forms; using System; using System.Collections.Generic; using System.Linq; using System.Text.Json; using System.Threading.Tasks; using wispro.sp.entity; using wispro.sp.web.Services; namespace wispro.sp.web.Components { public partial class CreateAppeal { public PerformanceItem _Item; public int _AppealTypeId; [Inject] protected AppealTypeService _atService { get; set; } private List inputFields; private List inputFieldValues; private AppealType _CurrentAppealType; private AppealRecord aRecord; public async Task SetParameter(PerformanceItem item, int appealTypeId) { _Item = item; _AppealTypeId = appealTypeId; _CurrentAppealType =await _atService.GetItem(_AppealTypeId); inputFields = await _atService.GetInputFields(_AppealTypeId, 0); } //public override async Task SetParametersAsync(ParameterView parameters) //{ // int temOut; // if(parameters.TryGetValue("AppealTypeId",out temOut)) // { // _CurrentAppealType =await _atService.GetItem(temOut); // } // return base.SetParametersAsync(parameters); //} private void OnFinish(EditContext editContext) { //Console.WriteLine($"Success:{JsonSerializer.Serialize(_model)}"); _ = base.FeedbackRef.CloseAsync(); } private void OnFinishFailed(EditContext editContext) { //Console.WriteLine($"Failed:{JsonSerializer.Serialize(_model)}"); } } }