Beispiel #1
0
 public void DeleteDocumentType(DocumentTypeDTO documentType)
 {
     if (documentType == null)
     {
         throw new Exception("文档不能为空");
     }
     var deleteDocumentType = _documentTypeRepository.Get(documentType.DocumentTypeId);
     _documentTypeRepository.Remove(deleteDocumentType);
 }
Beispiel #2
0
 public void ModifyDocumentType(DocumentTypeDTO documentType)
 {
     if (documentType == null)
     {
         throw new Exception("文档不能为空");
     }
     var updateDocumentType = _documentTypeRepository.Get(documentType.DocumentTypeId);
     DocumentTypeFactory.SetDocumentType(updateDocumentType, documentType.Name, documentType.Description);
     _documentTypeRepository.Modify(updateDocumentType);
 }
Beispiel #3
0
 public void InsertDocumentType(DocumentTypeDTO documentType)
 {
     if (documentType == null)
     {
         throw new Exception("文档不能为空");
     }
     //新建文档
     var newDocumentType = DocumentTypeFactory.CreateDocumentType();
     DocumentTypeFactory.SetDocumentType(newDocumentType, documentType.Name, documentType.Description);
     _documentTypeRepository.Add(newDocumentType);
 }