示例#1
0
 public async Task <int> DeletePropertyDocumentAsync(PropertyCheckListDocumentsModel documents)
 {
     using (var dataService = DataServiceFactory.CreateDataService())
     {
         var doc = new PropertyCheckListDocuments();
         UpdateDocumentFromModel(doc, documents);
         return(await dataService.DeletePropertyCheckListDocumentAsync(doc));
     }
 }
示例#2
0
 private void UpdateDocumentFromModel(PropertyCheckListDocuments target, PropertyCheckListDocumentsModel source)
 {
     target.PropertyCheckListBlobId = source.PropertyCheckListBlobId;
     target.CheckListPropertyId     = source.CheckListPropertyId;
     target.PropertyGuid            = source.guid;
     target.FileBlob             = source.ImageBytes;
     target.FileName             = source.FileName;
     target.FileType             = source.ContentType;
     target.FileCategoryId       = source.FileCategoryId;
     target.UploadTime           = DateTime.Now;
     target.DueDate              = source.DueDate.UtcDateTime;
     target.ActualCompletionDate = source.ActualCompletionDate.UtcDateTime;
     target.Remarks              = source.Remarks;
 }