12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- 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<InputField> inputFields;
- private List<InputFieldValue> 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<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)}");
- }
- }
- }
|