private void preLoad() { periodService.GetAllPeriods((res, exp) => { if (exp == null) { Periods = res; } else { appController.HandleException(exp); } }); }
private void loadAllPeriods() { ShowBusyIndicator("در حال دریافت اطلاعات"); periodService.GetAllPeriods((res, exp) => appController.BeginInvokeOnDispatcher(() => { HideBusyIndicator(); if (exp == null) { SourcePeriods = new ObservableCollection <PeriodDescriptionDTO>(res.Where(p => p.Id != Period.Id).ToList()); } else { appController.HandleException(exp); } })); }
private void refresh() { ShowBusyIndicator("در حال دریافت اطلاعات..."); periodService.GetAllPeriods( (res, exp) => { appController.BeginInvokeOnDispatcher(() => { HideBusyIndicator(); if (exp == null) { periods.SourceCollection = res.Result; periods.TotalItemCount = res.TotalCount; periods.PageIndex = Math.Max(0, res.CurrentPage - 1); } else { appController.HandleException(exp); } }); }, periods.PageSize, periods.PageIndex + 1); }