Ejemplo n.º 1
0
        private void LoadDatagridUserType()
        {
            FormLoading();
            try
            {
                this.Dispatcher.Invoke(() => { dgUserType.ItemsSource = null; });
                List <UserType> lObjuserTypes = mObjUserTypeFactory.GetUserTypeService().GetList().Where(x => x.Active == true && x.Removed == false).ToList();
                mLcvListData = new ListCollectionView(lObjuserTypes);

                this.Dispatcher.Invoke((Action) delegate
                {
                    dgUserType.ItemsSource = mLcvListData;

                    dgUser.Visibility     = Visibility.Collapsed;
                    dgUserType.Visibility = Visibility.Visible;
                });
            }
            catch (Exception lObjException)
            {
                FormDefult();
                CustomMessageBox.Show("Error", lObjException.Message, this.GetParent());
            }
            finally
            {
                FormDefult();
            }
        }
Ejemplo n.º 2
0
        private void LoadCombobox()
        {
            List <UserType> lObjItemTypes = mObjUserFactory.GetUserTypeService().GetList().Where(x => x.Active == true && x.Removed == false).ToList();

            cbUSerType.ItemsSource       = lObjItemTypes;
            cbUSerType.DisplayMemberPath = "Name";
            cbUSerType.SelectedValuePath = "Id";
        }