using AntDesign;
using Microsoft.AspNetCore.Components;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using wispro.sp.entity;
using wispro.sp.share;
using wispro.sp.web.Services;

namespace wispro.sp.web.Pages.AppCase
{
    public partial class MyFistPage
    {
        private List<PerformanceItem> _Datas;
        private bool _loading = false;
        private int _total;

        [Inject] public PerformanceItemServices _ItemService { get; set; }
        [Inject] public MessageService _message { get; set; }
        [Inject] protected NavigationManager NavigationManager { get; set; }
        [Inject] protected  IUserService _userService { get; set; }

        protected async override Task OnInitializedAsync()
        {
            
            _loading = true;

            //System.Diagnostics.Debug.WriteLine(_userService.CurrentUser.Userid);
            var data = await _ItemService.GetMyList(_userService.CurrentUser.Userid.Value,jxType.doing);


            _Datas = data.Results;
            _total = data.TotalCount;
            _loading = false;

            //StateHasChanged();

        }
    }
}
