private async Task GeneratePdfDocument() { if (!string.IsNullOrEmpty(contactId) || !string.IsNullOrEmpty(tenAgreementRef) || !string.IsNullOrEmpty(startdate)) { BuildDoc bdoc = new BuildDoc(); Document document = bdoc.GeneratePdfDocument(contactId, tenAgreementRef, startdate); if (document != null) { document.DrawToWeb(); } } }
private async Task GeneratePdfDocument() { if (!string.IsNullOrEmpty(contactId) || !string.IsNullOrEmpty(startdate)) { BuildDoc bdoc = new BuildDoc(); Document document = bdoc.GeneratePdfDocument(contactId, tenAgreementRef, startdate); if (document != null) { byte[] docbytes = document.Draw(); string parameters = string.Format("EmailTo={0}&TemplateId={1}&TemplateData={'rent balance':'30', 'link_to_document':'{2}','Rent amount':'55.6'}", emailId, templateId, docbytes); var jsonciresponse = bdoc.ExecuteAPI(GovNotifyAPIURL, parameters); if (jsonciresponse != null) { } } } }