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();
                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;
                }
                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);
            }
            IsBusy = false;
        }
Exemple #2
0
 private void LoadOperationProjectCompleted(LoadOperation <ProductManager.Web.Model.project_files> aLoadOperation)
 {
     ProjectFilesEntityList.Clear();
     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;
 }
Exemple #3
0
 private void OnCancelCommand()
 {
     ProjectFilesEntity.Update();
     ProjectFilesEntity.RaisALL();
     childWindow.DialogResult = false;
 }