コード例 #1
0
 public async Task <int> DeletePropertyDocumentAsync(ImagePickerResult documents)
 {
     using (var dataService = DataServiceFactory.CreateDataService())
     {
         var doc = new PropertyDocuments();
         UpdateDocumentFromModel(doc, documents);
         return(await dataService.DeletePropertyDocumentAsync(doc));
     }
 }
コード例 #2
0
 private void UpdateDocumentFromModel(PartyDocuments target, ImagePickerResult source)
 {
     target.PartyBlobId    = source.blobId;
     target.PartyGuid      = source.guid;
     target.FileBlob       = source.ImageBytes;
     target.FileName       = source.FileName;
     target.FileType       = source.ContentType;
     target.FileCategoryId = source.FileCategoryId;
     target.UploadTime     = DateTime.Now;
 }
コード例 #3
0
 private void UpdateDocumentFromModel(CompanyDocuments target, ImagePickerResult source)
 {
     target.CompanyBlobId  = source.blobId;
     target.CompanyGuid    = source.guid;
     target.FileBlob       = Snappy.Encode(source.ImageBytes);
     target.FileName       = source.FileName;
     target.FileType       = source.ContentType;
     target.FileCategoryId = source.FileCategoryId;
     target.UploadTime     = DateTime.Now;
     target.FileLength     = source.Size;
 }