Esempio n. 1
0
        public UserManager()
        {
            InitializeComponent();

            ComboBoxItemsProvider userRoleProvider = this.userXamDataGrid.TryFindResource("UserRoleItemsProvider") as ComboBoxItemsProvider;

            if (userRoleProvider != null)
            {
                userRoleProvider.ItemsSource = new ComboBoxDataItem[]
                {
                    new ComboBoxDataItem(GlobalVars.USER_ROLE_ENUM.ADMIN, "Admin"),
                    new ComboBoxDataItem(GlobalVars.USER_ROLE_ENUM.USER, "User"),
                };
            }

            UserVM = new UserViewModel();

            this.DataContext = UserVM;
        }
Esempio n. 2
0
        void xdgOrders_FieldLayoutInitialized(object sender, Infragistics.Windows.DataPresenter.Events.FieldLayoutInitializedEventArgs e)
        {
            ComboBoxItemsProvider MedicationsProvider = this.TryFindResource("MedicationLookUp") as ComboBoxItemsProvider;

            MedicationsProvider.ItemsSource = ((OrdersViewModel)this.DataContext).AllMedications;
        }