private void LoadImportantPartCompleted(LoadOperation <ProductManager.Web.Model.important_part> aLoadOperation) { ImportantPartEntityList.Clear(); foreach (ProductManager.Web.Model.important_part important_part in aLoadOperation.Entities) { ImportantPartEntity importantPartEntity = new ImportantPartEntity(); importantPartEntity.ImportantPart = important_part; importantPartEntity.UserEntityDictionary = UserEntityDictionary; importantPartEntity.Update(); ProjectEntity projectEntityTemp; if (ProjectEntityDictionary.TryGetValue(importantPartEntity.ManufactureNumber, out projectEntityTemp)) { importantPartEntity.ProjectName = projectEntityTemp.ProjectName; } if (ProjectNameSearch != null && ProjectNameSearch.Length > 0) { if (!importantPartEntity.ProjectName.ToLower().Contains(ProjectNameSearch.ToLower())) { continue; } } ImportantPartEntityList.Add(importantPartEntity); } IsBusy = false; }
private void LoadImportantPartCompleted(LoadOperation <ProductManager.Web.Model.important_part> aLoadOperation) { ImportantPartEntityList.Clear(); foreach (ProductManager.Web.Model.important_part important_part in aLoadOperation.Entities) { ImportantPartEntity importantPartEntity = new ImportantPartEntity(); importantPartEntity.ImportantPart = important_part; importantPartEntity.UserEntityDictionary = UserEntityDictionary; importantPartEntity.Update(); ImportantPartEntityList.Add(importantPartEntity); } IsBusy = false; }
private void OnCancelCommand() { ImportantPartEntity.Update(); ImportantPartEntity.RaisALL(); childWindow.DialogResult = false; }