public AproMissCardPageViewModel(IPageDialogService dialogService, INavigationService navigationService, IEventAggregator eventAggregator) { var fooApp = App.Current as App; _eventAggregator = eventAggregator; _navigationService = navigationService; _dialogService = dialogService; MissCardRefreshCommand = new DelegateCommand(() => { //RefreshIndex++; MissCardItemList.Clear(); Service.BLLService BLL = new Service.BLLService(); var Datas = BLL.Get_MissCardsTest("111"); foreach (var data in Datas) { MissCardItemList.Add(data); } RefreshingStatus = false; }); YesCommand = new DelegateCommand <MissCard>((item) => { item.apro_yn = "Y"; item.emp_name = "被改過了"; }); NoCommand = new DelegateCommand <MissCard>((item) => { item.apro_yn = "N"; }); }
private async Task ReLoadData() { MissCardItemList.Clear(); Service.BLLService BLL = new Service.BLLService(); // var Datas = BLL.Get_MissCards("111"); var apro = new AproRequest { // apro_emp = "085869" apro_emp = LoginUser }; var Datas = await BLL.Get_MissCards(apro); foreach (var data in Datas) { var foo = new MissCardVM { emp = data.emp, emp_name = data.emp_name, attd_date = data.attd_date, attd_time = data.attd_time, apro_yn = data.apro_yn }; MissCardItemList.Add(foo); } }