Exemple #1
0
        internal void OnAppearing()
        {
            Patients = PatientListService.GetPatients();
            foreach (var p in Patients)
            {
                p.TopLeftGroup  = new ObservableCollection <DynamicValue>();
                p.TopRightGroup = new ObservableCollection <DynamicValue>();
                p.LeftGroup     = new ObservableCollection <DynamicValue>();
                p.RightGroup    = new ObservableCollection <DynamicValue>();

                foreach (var c in ColumnGroups.FirstOrDefault(c => c.Title == "TopLeft").ToList())
                {
                    p.TopLeftGroup.Add(new DynamicValue
                    {
                        Header = c.Header,
                        Value  = c.Value
                    });
                }
                foreach (var c in ColumnGroups.FirstOrDefault(c => c.Title == "TopRight").ToList())
                {
                    p.TopRightGroup.Add(new DynamicValue
                    {
                        Header = c.Header,
                        Value  = c.Value
                    });
                }
                foreach (var c in ColumnGroups.FirstOrDefault(c => c.Title == "Left").ToList())
                {
                    p.LeftGroup.Add(new DynamicValue
                    {
                        Header = c.Header,
                        Value  = c.Value
                    });
                }
                foreach (var c in ColumnGroups.FirstOrDefault(c => c.Title == "Right").ToList())
                {
                    p.RightGroup.Add(new DynamicValue
                    {
                        Header = c.Header,
                        Value  = c.Value
                    });
                }
            }
        }
Exemple #2
0
 public WardListViewModel(INavigation navigation)
 {
     this.Navigation = navigation;
     ColumnGroups    = PatientListService.CreateColumns();
 }