void loadOperationFileType_Completed(object sender, EventArgs e)
        {
            FileTypeEntityDictionary.Clear();
            FileTypeEntityList.Clear();

            LoadOperation loadOperation = sender as LoadOperation;

            foreach (ProductManager.Web.Model.filetype filetype in loadOperation.Entities)
            {
                FileTypeEntity fileTypeEntity = new FileTypeEntity();
                fileTypeEntity.FileType = filetype;
                fileTypeEntity.Update();
                FileTypeEntityDictionary.Add(fileTypeEntity.FileTypeID, fileTypeEntity);
                FileTypeEntityList.Add(fileTypeEntity);
            }

            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.PageSize = 5;
                this.projectView.MoveToFirstPage();
            }
            this.IsBusy = false;
        }
        public void LoadData()
        {
            IsBusy = true;
            systemManageDomainContext = new SystemManageDomainContext();
            systemManageDomainContext.PropertyChanged -= systemManageDomainContext_PropertyChanged;
            systemManageDomainContext.PropertyChanged += systemManageDomainContext_PropertyChanged;
            FileTypeEntityList.Clear();
            selectFileTypeEntity = null;
            LoadOperation <ProductManager.Web.Model.filetype> loadOperationDepartment =
                systemManageDomainContext.Load <ProductManager.Web.Model.filetype>(systemManageDomainContext.GetFiletypeQuery());

            loadOperationDepartment.Completed += loadOperationFileType_Completed;
        }
        void loadOperationFileType_Completed(object sender, EventArgs e)
        {
            FileTypeEntityList.Clear();
            LoadOperation loadOperation = sender as LoadOperation;

            foreach (ProductManager.Web.Model.filetype filetype in loadOperation.Entities)
            {
                FileTypeEntity fileTypeEntity = new FileTypeEntity();
                fileTypeEntity.FileType = filetype;
                fileTypeEntity.Update();
                FileTypeEntityList.Add(fileTypeEntity);
            }
            UpdateChanged("FileTypeEntityList");
            IsBusy = false;
        }
예제 #4
0
        private void loadOperationFileType_Completed(object sender, EventArgs e)
        {
            FileTypeEntityList.Clear();

            LoadOperation loadOperation = sender as LoadOperation;

            foreach (Web.Model.filetype filetype in loadOperation.Entities)
            {
                FileTypeEntity lFileTypeEntity = new FileTypeEntity();
                lFileTypeEntity.FileType = filetype;
                lFileTypeEntity.Update();
                FileTypeEntityList.Add(lFileTypeEntity);
            }

            LoadOperation <DocumentManager.Web.Model.taxpayer> loadOperationTaxPayer =
                documentManagerContext.Load <DocumentManager.Web.Model.taxpayer>(documentManagerContext.GetTaxpayerQuery());

            loadOperationTaxPayer.Completed += loadOperationTaxPayer_Completed;
        }