public async Task <int> DeletePropertyDocumentAsync(ImagePickerResult documents) { using (var dataService = DataServiceFactory.CreateDataService()) { var doc = new PropertyDocuments(); UpdateDocumentFromModel(doc, documents); return(await dataService.DeletePropertyDocumentAsync(doc)); } }
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; }
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; }