private void AddDocumentToRequest(AssociatedDoc assDoc, FaxRequest request) { var originalSelection = ImagesEventManager.Instance.CurrentSelected; var associatedDocsDto = originalSelection; bool wasChanged = false; try { if (originalSelection.DocsId != assDoc.Id || originalSelection.Type != ImagesDtoType.Associated) { associatedDocsDto = imagesDal.GetByDocId(assDoc.Id, ImagesDtoType.Associated); ImagesEventManager.Instance.Raise(new ImagesSelectedEventArgs(associatedDocsDto, false)); wasChanged = true; } var currentEditor = TifEditor.GetCurrentEditor(); var publishToBytes = currentEditor.PublishToBytes(); associatedDocsDto.MarkupImage = publishToBytes; imagesDal.Update(associatedDocsDto); vaulter.VaultAssociatedDoc(assDoc.Id, null); request.AddDocument(assDoc.FileName, currentEditor.TotalPages, publishToBytes); } finally { if (wasChanged) { ImagesEventManager.Instance.Raise(new ImagesSelectedEventArgs(originalSelection, false)); } } }
private FaxRequest GetRequest() { FaxRequest request = new FaxRequest(); request.AppCode = "CNF"; request.AppReference = "293023"; request.AppSender = "srajaman"; request.ReceiptMethodType = "email"; request.ReceiptMethodValue = "*****@*****.**"; request.Recipient = "Samy Raj"; request.AddDocument(@"c:\temp\test\test3.Tif", 1); request.FaxNumber = "3555330"; request.Action.SucessMethodType = "email"; request.Action.SucessMethodValue = "*****@*****.**"; request.Action.FailMethodType = "email"; request.Action.FailMethodValue = "*****@*****.**"; return(request); }