private void loadOperationProjectFiles_Completed(object sender, EventArgs e)
 {
     ProjectFilesEntityList.Clear();
     LoadOperation<ProductManager.Web.Model.project_files> loadOperation = sender as LoadOperation<ProductManager.Web.Model.project_files>;
     foreach (ProductManager.Web.Model.project_files project_files in loadOperation.Entities)
     {
         ProjectFilesEntity projectFilesEntity = new ProjectFilesEntity();
         projectFilesEntity.ProjectFiles = project_files;
         projectFilesEntity.Update();
         projectFilesEntity.FileUrl = CustomUri.GetAbsoluteUrl(projectFilesEntity.ManufactureNumber + "/" + projectFilesEntity.FileName);
         DepartmentEntity lDepartmentEntity;
         if (DepartmentEntityDictionary.TryGetValue(projectFilesEntity.DepartmentID, out lDepartmentEntity))
         {
             projectFilesEntity.DepartmentName = lDepartmentEntity.DepartmentName;
         }
         UserEntity lUserEntity;
         if (UserEntityDictionary.TryGetValue(projectFilesEntity.UserID, out lUserEntity))
         {
             projectFilesEntity.UserName = lUserEntity.CUserName;
         }
         FileTypeEntity lFileTypeEntity;
         if (FileTypeEntityDictionary.TryGetValue(projectFilesEntity.FileTypeID, out lFileTypeEntity))
         {
             projectFilesEntity.FileTypeName = lFileTypeEntity.FileTypeName;
         }
         ProjectFilesEntityList.Add(projectFilesEntity);
     }
     IsBusy = false;
 }
 private void loadOperationProjectFiles_Completed(LoadOperation<ProductManager.Web.Model.project_files> aLoadOperation)
 {
     ProjectFilesEntityList.Clear();
     //LoadOperation<ProductManager.Web.Model.project_files> loadOperation = sender as LoadOperation<ProductManager.Web.Model.project_files>;
     foreach (ProductManager.Web.Model.project_files project_files in aLoadOperation.Entities)
     {
         ProjectFilesEntity projectFilesEntity = new ProjectFilesEntity();
         projectFilesEntity.ProjectFiles = project_files;
         projectFilesEntity.Update();
         DepartmentEntity lDepartmentEntity;
         if (DepartmentDictionary.TryGetValue(projectFilesEntity.DepartmentID, out lDepartmentEntity))
         {
             projectFilesEntity.DepartmentName = lDepartmentEntity.DepartmentName;
         }
         UserEntity lUserEntity;
         if (UserEntityDictionary.TryGetValue(projectFilesEntity.UserID, out lUserEntity))
         {
             projectFilesEntity.UserName = lUserEntity.CUserName;
         }
         if (UserEntityDictionary.TryGetValue(projectFilesEntity.FileDeletePersionID, out lUserEntity))
         {
             projectFilesEntity.FileDeletePersionName = lUserEntity.CUserName;
         }
         FileTypeEntity lFileTypeEntity;
         if (FileTypeEntityDictionary.TryGetValue(projectFilesEntity.FileTypeID, out lFileTypeEntity))
         {
             projectFilesEntity.FileTypeName = lFileTypeEntity.FileTypeName;
         }
         ProjectFilesEntityList.Add(projectFilesEntity);
     }
     UpdateChanged("ProjectFilesEntityList");
     canConfirm = isLinkProject ? (ProjectFilesEntityList.Count > 0) : (null != SelectProjectFilesEntity);
     UpdateChanged("CanConfirm");
     IsBusy = false;
 }
        void loadOperationAllProjectFiles_Completed(object sender, EventArgs e)
        {
            ProjectFilesEntityList.Clear();
            LoadOperation<ProductManager.Web.Model.project_files> loadOperation = sender as LoadOperation<ProductManager.Web.Model.project_files>;
            foreach (ProductManager.Web.Model.project_files project_files in loadOperation.Entities)
            {
                ProjectFilesEntity projectFilesEntity = new ProjectFilesEntity();
                projectFilesEntity.ProjectFiles = project_files;
                projectFilesEntity.Update();

                Dictionary<String, ProjectFilesEntity> lTempDictionary;
                if (!FilesDictionarys.TryGetValue(projectFilesEntity.manufactureNumber, out lTempDictionary))
                {
                    lTempDictionary = new Dictionary<string, ProjectFilesEntity>();
                    FilesDictionarys.Add(projectFilesEntity.manufactureNumber, lTempDictionary);
                }

                if (lTempDictionary != null)
                {
                    ProjectFilesEntity lFileEntityTemp;
                    if (!lTempDictionary.TryGetValue(projectFilesEntity.FileName, out lFileEntityTemp))
                    {
                        lTempDictionary.Add(projectFilesEntity.FileName, projectFilesEntity);
                    }
                }

            }
            IsBusy = false;
        }