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;
        }
Beispiel #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;
 }
        public void LoadData()
        {
            IsBusy = true;
            ProductDomainContext      = new ProductDomainContext();
            SystemManageDomainContext = new SystemManageDomainContext();
            selectProjectEntity       = null;
            ProjectFilesEntityList.Clear();
            LoadOperation <ProductManager.Web.Model.department> loadOperationDepartment =
                SystemManageDomainContext.Load <ProductManager.Web.Model.department>(SystemManageDomainContext.GetDepartmentQuery());

            loadOperationDepartment.Completed += loadOperationDepartment_Completed;
        }
        void updateFileWindow_Closed(object sender, EventArgs e)
        {
            UpdateFileWindow updateFileWindow = sender as UpdateFileWindow;

            if (updateFileWindow.DialogResult == true)
            {
                ProjectFilesEntityList.Add(AddProjectFilesEntity);
                AddProjectFilesEntity.DUpdate();
                ProductDomainContext.project_files.Add(AddProjectFilesEntity.ProjectFiles);
                IsBusy = true;
                SubmitOperation subOperation = ProductDomainContext.SubmitChanges();
                subOperation.Completed += SubOperationCommpleted;
            }
        }
Beispiel #5
0
 private void LoadOperationProjectCompleted(LoadOperation <ProductManager.Web.Model.project> aLoadOperation)
 {
     ProjectEntityList.Clear();
     ProjectFilesEntityList.Clear();
     foreach (ProductManager.Web.Model.project project in aLoadOperation.Entities)
     {
         ProjectEntity projectEntity = new ProjectEntity();
         projectEntity.Project = project;
         projectEntity.Update();
         ProjectEntityList.Add(projectEntity);
     }
     if (aLoadOperation.TotalEntityCount != -1)
     {
         this.projectView.SetTotalItemCount(aLoadOperation.TotalEntityCount);
     }
     UpdateChanged("ProjectEntityList");
     UpdateChanged("CollectionProjectView");
     UpdateChanged("ProjectFilesEntityList");
     UpdateChanged("RecorderCount");
     this.IsBusy = false;
 }