public Stream GetSDSDocument(string FileName) { CswNbtChemWatchReturn Ret = new CswNbtChemWatchReturn(); var SvcDriver = new CswWebSvcDriver <CswNbtChemWatchReturn, string>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServiceChemWatch.GetSDSDocument, ParamObj: FileName ); SvcDriver.run(); string ContentDisposition = string.Empty; // Filetype encountered: .pdf, .gz if (FileName.EndsWith(".pdf")) { ContentDisposition = "inline; filename=" + FileName; WebOperationContext.Current.OutgoingResponse.ContentType = "application/pdf"; } else { ContentDisposition = "attachment; filename=" + FileName; } WebOperationContext.Current.OutgoingResponse.Headers.Set("Content-disposition", ContentDisposition); return(Ret.Data.SDSDocument); }//startImport()
public CswNbtChemWatchReturn CreateSDSDocuments(CswNbtChemWatchRequest Request) { CswNbtChemWatchReturn Ret = new CswNbtChemWatchReturn(); var SvcDriver = new CswWebSvcDriver <CswNbtChemWatchReturn, CswNbtChemWatchRequest>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServiceChemWatch.CreateSDSDocuments, ParamObj: Request ); SvcDriver.run(); return(Ret); }
public CswNbtChemWatchReturn GetMatchingSuppliers(CswNbtChemWatchRequest Request) { CswNbtChemWatchReturn Ret = new CswNbtChemWatchReturn(); var SvcDriver = new CswWebSvcDriver <CswNbtChemWatchReturn, CswNbtChemWatchRequest>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServiceChemWatch.GetMatchingSuppliers, ParamObj: Request ); SvcDriver.run(); return(Ret); }