예제 #1
0
        public UserAddEdit(UserViewModel userViewModel, bool isCreateProcess, bool isPopup = false)
        {
            // Initialize service
            this.userService    = DependencyResolver.Kernel.Get <IUserService>();
            this.companyService = DependencyResolver.Kernel.Get <ICompanyService>();
            InitializeComponent();

            this.DataContext = this;

            CurrentUser     = userViewModel;
            IsCreateProcess = isCreateProcess;
            IsPopup         = isPopup;

            RolesFromDB       = new ObservableCollection <UserRoleViewModel>(UserRolesHelper.GetAvailableRoles());
            UserRolesItemForm = new CompanyUserViewModel();

            Thread td = new Thread(() => DisplayItems());

            td.IsBackground = true;
            td.Start();

            Thread displayThread = new Thread(() => PopulateCompanyData());

            displayThread.IsBackground = true;
            displayThread.Start();
        }