void loadOperationPartTimeType_Completed(object sender, EventArgs e) { ProductPartTypeDictionary.Clear(); LoadOperation loadOperation = sender as LoadOperation; foreach (ProductManager.Web.Model.product_part_type product_part_type in loadOperation.Entities) { ProductPartTypeEntity productPartTypeEntity = new ProductPartTypeEntity(); productPartTypeEntity.ProductPartType = product_part_type; productPartTypeEntity.Update(); ProductPartTypeDictionary.Add(productPartTypeEntity.ProductPartTypeID, productPartTypeEntity); } App app = Application.Current as App; LoadOperation<ProductManager.Web.Model.user_project> loadOperationUserProject = ProductDomainContext.Load<ProductManager.Web.Model.user_project>(ProductDomainContext.GetUserProjectQuery(app.UserInfo.UserID)); loadOperationUserProject.Completed += LoadUserProjectComplete; }
void loadOperationFileType_Completed(object sender, EventArgs e) { ProductPartTypeEntityList.Clear(); LoadOperation loadOperation = sender as LoadOperation; foreach (ProductManager.Web.Model.product_part_type product_part_type in loadOperation.Entities) { ProductPartTypeEntity productPartTypeEntity = new ProductPartTypeEntity(); productPartTypeEntity.ProductPartType = product_part_type; productPartTypeEntity.Update(); ProductPartTypeEntityList.Add(productPartTypeEntity); } UpdateChanged("FileTypeEntityList"); IsBusy = false; }
private void loadOperationProductPartType_Completed(object sender, EventArgs e) { ProductPartTypeEntityList.Clear(); ProductPartTypeDictionary.Clear(); LoadOperation loadOperation = sender as LoadOperation; foreach (ProductManager.Web.Model.product_part_type product_part_type in loadOperation.Entities) { ProductPartTypeEntity productPartTypeEntity = new ProductPartTypeEntity(); productPartTypeEntity.ProductPartType = product_part_type; productPartTypeEntity.Update(); ProductPartTypeEntityList.Add(productPartTypeEntity); ProductPartTypeDictionary.Add(productPartTypeEntity.ProductPartTypeID, productPartTypeEntity); } this.productPartTimeSource = new EntityList<ProductManager.Web.Model.product_part_time>(this.ProductDomainContext.product_part_times); this.productPartTimeLoader = new DomainCollectionViewLoader<ProductManager.Web.Model.product_part_time>( this.LoadProductPartTimeEntities, this.LoadOperationProductPartTimeCompleted); this.productPartTimeView = new DomainCollectionView<ProductManager.Web.Model.product_part_time>(this.productPartTimeLoader, this.productPartTimeSource); using (this.CollectionProductPartTimeView.DeferRefresh()) { this.productPartTimeView.MoveToFirstPage(); } }