public Task <ObservableCollection <ErrorViewModel> > GetErrorsAsync(string courseId, string planId) => RunAsync(context => { var planningItem = Extensions.GetPlanningItem(context.Patient, courseId, planId); var calculator = new ErrorCalculator(); var errorGrid = calculator.Calculate(planningItem); return(errorGrid); });
public List <ErrorViewModel> GetErrors(PlanningItemViewModel planningItem) { var calculator = new ErrorCalculator(); ErrorGrid = calculator.Calculate(planningItem.PlanningItemObject); ErrorGrid = ErrorGrid.OrderBy(x => x.Status).ToList(); return(ErrorGrid); }