Exemplo n.º 1
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;
 }
        private void LoadTaxPayerDocument_Complete(LoadOperation <Web.Model.taxpayerdocument> sender)
        {
            TaxPayerDocumentList.Clear();
            taxPayerDocumentSource.Source = sender.Entities;
            foreach (DocumentManager.Web.Model.taxpayerdocument taxpayerdocument in sender.Entities)
            {
                TaxPayerDocumentEntity taxPayerDocumentEntity = new TaxPayerDocumentEntity();
                taxPayerDocumentEntity.TaxPayerDocument = taxpayerdocument;
                taxPayerDocumentEntity.Update();

                taxPayerDocumentEntity.TaxPayerName = taxPayerEntity.TaxPayerName;
                FileTypeEntity lFileTypeEntity;
                if (FileTypeEntityDictionary != null &&
                    taxPayerDocumentEntity.TaxPayerDocumentTypeId.HasValue &&
                    FileTypeEntityDictionary.TryGetValue(taxPayerDocumentEntity.TaxPayerDocumentTypeId.Value, out lFileTypeEntity))
                {
                    taxPayerDocumentEntity.FileTypeName = lFileTypeEntity.FileTypeName;
                }

                UserEntity lUserEntity;
                if (UserEntityDictionary != null &&
                    taxPayerDocumentEntity.TaxPayerUpdateUserId.HasValue &&
                    UserEntityDictionary.TryGetValue(taxPayerDocumentEntity.TaxPayerUpdateUserId.Value, out lUserEntity))
                {
                    taxPayerDocumentEntity.UpdateUserName = lUserEntity.UserName;
                }

                TaxPayerDocumentList.Add(taxPayerDocumentEntity);
            }
            UpdateChanged("TaxPayerDocumentList");
            FinishLoadings(null, null);
        }
        private void LoadOperationTaxPayerDocumentCompleted(LoadOperation <DocumentManager.Web.Model.taxpayerdocument> aLoadOperation)
        {
            TaxPayerDocumentEntityList.Clear();
            foreach (DocumentManager.Web.Model.taxpayerdocument taxpayerdocument in aLoadOperation.Entities)
            {
                TaxPayerDocumentEntity taxPayerDocumentEntity = new TaxPayerDocumentEntity();
                taxPayerDocumentEntity.TaxPayerDocument = taxpayerdocument;
                taxPayerDocumentEntity.Update();

                FileTypeEntity lFileTypeEntity;
                if (FileTypeEntityDictionary != null &&
                    taxPayerDocumentEntity.TaxPayerDocumentTypeId.HasValue &&
                    FileTypeEntityDictionary.TryGetValue(taxPayerDocumentEntity.TaxPayerDocumentTypeId.Value, out lFileTypeEntity))
                {
                    taxPayerDocumentEntity.FileTypeName = lFileTypeEntity.FileTypeName;
                }

                TaxPayerDocumentEntityList.Add(taxPayerDocumentEntity);
            }
            UpdateChanged("TaxPayerDocumentEntityList");
            IsBusy = false;
        }