Exemple #1
0
        void loadOperationUser_Completed(object sender, EventArgs e)
        {
            UserEntityDictionary.Clear();
            UserEntityList.Clear();

            LoadOperation loadOperation = sender as LoadOperation;

            foreach (ProductManager.Web.Model.user user in loadOperation.Entities)
            {
                UserEntity userEntity = new UserEntity();
                userEntity.User = user;
                userEntity.Update();
                UserEntityDictionary.Add(userEntity.UserID, userEntity);
                UserEntityList.Add(userEntity);
            }

            this.importantPartSource = new EntityList <ProductManager.Web.Model.important_part>(this.productDomainContext.important_parts);
            this.importantPartLoader = new DomainCollectionViewLoader <ProductManager.Web.Model.important_part>(
                this.LoadImportantPartEntities,
                this.LoadImportantPartCompleted);
            this.importantPartView = new DomainCollectionView <ProductManager.Web.Model.important_part>(this.importantPartLoader, this.importantPartSource);
            using (this.importantPartView.DeferRefresh())
            {
                this.importantPartView.MoveToFirstPage();
            }
            IsBusy = false;
        }
Exemple #2
0
        void loadOperationUser_Completed(object sender, EventArgs e)
        {
            UserEntityDictionary.Clear();
            UserEntityList.Clear();
            LoadOperation loadOperation = sender as LoadOperation;

            foreach (ProductManager.Web.Model.user user in loadOperation.Entities)
            {
                if (user.user_name == "admin")
                {
                    continue;
                }
                UserEntity userEntity = new UserEntity();
                userEntity.User = user;
                userEntity.Update();
                UserEntityDictionary.Add(userEntity.UserID, userEntity);
                UserEntityList.Add(userEntity);
            }

            planManagerDomainContext.departments.Clear();
            LoadOperation <department> loadOperationDepartment =
                planManagerDomainContext.Load <department>(planManagerDomainContext.GetDepartmentQuery());

            loadOperationDepartment.Completed += loadOperationDepartment_Completed;
        }
Exemple #3
0
        void loadOperationUser_Completed(object sender, EventArgs e)
        {
            UserEntityDictionary.Clear();
            UserEntityList.Clear();
            LoadOperation loadOperation = sender as LoadOperation;

            foreach (ProductManager.Web.Model.user user in loadOperation.Entities)
            {
                if (user.user_name == "admin")
                {
                    continue;
                }
                UserEntity userEntity = new UserEntity();
                userEntity.User = user;
                userEntity.Update();
                UserEntityDictionary.Add(userEntity.UserID, userEntity);
                UserEntityList.Add(userEntity);
            }

            UserEntity userEntityZero = new UserEntity();

            userEntityZero.UserID    = -2;
            userEntityZero.CUserName = "******";
            UserEntityList.Add(userEntityZero);


            this.prjectSource  = new EntityList <ProductManager.Web.Model.project>(this.ProductDomainContext.projects);
            this.projectLoader = new DomainCollectionViewLoader <ProductManager.Web.Model.project>(
                this.LoadProjectEntities,
                this.LoadOperationProjectCompleted);
            this.projectView = new DomainCollectionView <ProductManager.Web.Model.project>(this.projectLoader, this.prjectSource);
            using (this.CollectionProjectView.DeferRefresh())
            {
                this.projectView.MoveToFirstPage();
            }

            this.questionTraceSource = new EntityList <ProductManager.Web.Model.questiontrace>(this.ProductDomainContext.questiontraces);
            this.questionTraceLoader = new DomainCollectionViewLoader <ProductManager.Web.Model.questiontrace>(
                this.LoadQuestionTraceEntities,
                this.LoadOperationQuestionTraceCompleted);
            this.questionTraceView = new DomainCollectionView <ProductManager.Web.Model.questiontrace>(this.questionTraceLoader, this.questionTraceSource);

            this.IsBusy = false;
        }