public ProjectWorkflowENT PdfGenerate(ProjectWorkflowENT Param, IHostingEnvironment _hostingEnvironment) { ProjectENT model = new ProjectCRUD().SelectSingle(Param.ProjectId); string title = RemoveSpecialCharacters(model.Title); string fileName = title + ".pdf"; CompanyProfileENT setings = new CompanyCRUD().SelectAll(); #region Testing code //string contentRootPath = "https:\\nbk-api-dev.azurewebsites.net";//_hostingEnvironment.ContentRootPath; //Uri baseUri = new Uri("http://nbk-api-dev.azurewebsites.net"); //Uri myUri = new Uri(baseUri, "Resources/Files/"); //Param.AttachmentURL = myUri + fileName; //HTMLToPdf(myUri + "Sample.pdf", myUri + "Docs/" + fileName, model, setings, contentRootPath, Param); #endregion //var path = System.IO.Path.Combine(context.FunctionDirectory, "twinkle.txt"); var uriBuilder = new UriBuilder("https://nbk-api-dev.azurewebsites.net/Resources/Files/"); var uriBuilderDoc = new UriBuilder("https://nbk-api-dev.azurewebsites.net/Resources/Files/Docs/"); var uriBuilderImage = new UriBuilder("https://nbk-api-dev.azurewebsites.net/Resources/"); Uri finalUrl = uriBuilder.Uri; Uri finalUrlDoc = uriBuilderDoc.Uri; Uri finalUrlImage = uriBuilderImage.Uri; //var request = WebRequest.Create(finalUrl); //string webRootPath = _hostingEnvironment.WebRootPath; //string contentRootPath = "https://nbk-api-dev.azurewebsites.net";//_hostingEnvironment.ContentRootPath; Param.AttachmentURL = "https:\\nbk-api-dev.azurewebsites.net" + "\\Resources\\Files\\" + fileName; HTMLToPdf(finalUrl + "Sample.pdf", finalUrlDoc + fileName, model, setings, finalUrlImage + "", Param); return(Param); }
public CompanyProfileENT Update(CompanyProfileENT Obj) { CompanyProfileENT data = new CompanyCRUD().Update(Obj); return(data); }