public BlobDataReturn SaveFile(string propid, int blobdataid, string caption) { BlobDataReturn ret = new BlobDataReturn(); if (_Context.Request.Files.Count > 0) { BlobDataParams blobDataParams = new BlobDataParams(); blobDataParams.postedFile = _Context.Request.Files[0]; blobDataParams.propid = propid; blobDataParams.Blob.BlobDataId = blobdataid; blobDataParams.Blob.Caption = caption; var SvcDriver = new CswWebSvcDriver <BlobDataReturn, BlobDataParams>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: ret, WebSvcMethodPtr: CswNbtWebServiceBinaryData.saveFile, ParamObj: blobDataParams ); SvcDriver.run(); } return(ret); }
public Stream downloadBulkEditData(string ViewId, string NodeTypeId, string PropIds) { CswNbtWebServiceBulkEdit.BulkEditDownload Ret = new CswNbtWebServiceBulkEdit.BulkEditDownload(); CswNbtWebServiceBulkEdit.BulkEditParams Params = new CswNbtWebServiceBulkEdit.BulkEditParams(); Params.ViewId = ViewId; Params.NodeTypeId = CswConvert.ToInt32(NodeTypeId); CswCommaDelimitedString PropIdsCds = new CswCommaDelimitedString(); PropIdsCds.FromString(PropIds); Params.PropIds = PropIdsCds.ToIntCollection(); var SvcDriver = new CswWebSvcDriver <CswNbtWebServiceBulkEdit.BulkEditDownload, CswNbtWebServiceBulkEdit.BulkEditParams>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServiceBulkEdit.DownloadBulkEditData, ParamObj: Params ); SvcDriver.run(); WebOperationContext.Current.OutgoingResponse.Headers.Set("Content-Disposition", "attachment;filename=\"bulkedit.csv\";"); WebOperationContext.Current.OutgoingResponse.ContentType = "text/csv"; MemoryStream mem = new MemoryStream(); BinaryWriter BWriter = new BinaryWriter(mem); BWriter.Write(Encoding.UTF8.GetBytes(wsTools.DataTableToCSV(Ret.CsvData))); mem.Position = 0; return(mem); }
public Stream getExternalImage(string cdbregno, string productid, string uid) { ExternalImageRet ret = new ExternalImageRet(); ACDSearchParams Params = new ACDSearchParams(); Params.Cdbregno = CswConvert.ToInt32(cdbregno); Params.ProductId = CswConvert.ToInt32(productid); var SvcDriver = new CswWebSvcDriver <ExternalImageRet, ACDSearchParams>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: ret, WebSvcMethodPtr: CswNbtWebServiceC3Search.getExternalImage, ParamObj: Params ); SvcDriver.run(); MemoryStream mem = new MemoryStream(); BinaryWriter BWriter = new BinaryWriter(mem); BWriter.Write(ret.Data); mem.Position = 0; string Filename = "molimage_" + productid; WebOperationContext.Current.OutgoingResponse.Headers.Add("Content-Disposition", "inline;"); WebOperationContext.Current.OutgoingResponse.Headers.Add(HttpResponseHeader.ContentType, "image/png"); return(mem); }
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 Stream getBlob(string jctnodepropid, string nodeid, int blobdataid, string usenodetypeasplaceholder, string uid, string date) { BlobDataReturn ret = new BlobDataReturn(); BlobDataParams blobDataParams = new BlobDataParams(); blobDataParams.appPath = _Context.Request.PhysicalApplicationPath; blobDataParams.propid = jctnodepropid; blobDataParams.nodeid = nodeid; blobDataParams.Blob.BlobDataId = blobdataid; blobDataParams.usenodetypeasplaceholder = usenodetypeasplaceholder.ToString(); blobDataParams.date = date; var SvcDriver = new CswWebSvcDriver <BlobDataReturn, BlobDataParams>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: ret, WebSvcMethodPtr: CswNbtWebServiceBinaryData.getBlob, ParamObj: blobDataParams ); SvcDriver.run(); MemoryStream mem = new MemoryStream(); BinaryWriter BWriter = new BinaryWriter(mem); BWriter.Write(ret.Data.data); mem.Position = 0; WebOperationContext.Current.OutgoingResponse.Headers.Add("Content-Disposition", "attachment;filename=\"" + ret.Data.Blob.FileName + "\";"); WebOperationContext.Current.OutgoingResponse.Headers.Add(HttpResponseHeader.ContentType, ret.Data.Blob.ContentType); return(mem); }
public CswNbtResourceCollection Search(string searchtype, string query) { CswNbtApiSearchRequest Req = new CswNbtApiSearchRequest(query, searchtype); CswNbtResourceCollection Ret = new CswNbtResourceCollection(); //Look for optional params Req.NodeType = _Context.Request.Params["nodetype"] ?? string.Empty; var SvcDriver = new CswWebSvcDriver <CswNbtResourceCollection, CswNbtApiSearchRequest>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServiceApiSearch.Search, ParamObj: Req ); SvcDriver.run(); WebOperationContext ctx = WebOperationContext.Current; ctx.OutgoingResponse.StatusCode = Ret.Status; if (ctx.OutgoingResponse.StatusCode != HttpStatusCode.OK) { Ret = null; } return(Ret); }
public Stream reportCSV(Stream dataStream) { string body = new StreamReader(dataStream).ReadToEnd(); NameValueCollection formData = HttpUtility.ParseQueryString(body); CswNbtWebServiceReport.ReportReturn Ret = new CswNbtWebServiceReport.ReportReturn(); CswNbtWebServiceReport.ReportData Request = new CswNbtWebServiceReport.ReportData(); Request.Context = HttpContext.Current; Request.nodeIdStr = formData["reportid"]; Request.reportFormat = formData["reportFormat"]; formData.Remove("reportid"); formData.Remove("reportFormat"); Request.reportParams = CswNbtWebServiceReport.FormReportParamsToCollection(formData); var SvcDriver = new CswWebSvcDriver <CswNbtWebServiceReport.ReportReturn, CswNbtWebServiceReport.ReportData>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServiceReport.runReportCSV, ParamObj: Request ); SvcDriver.run(); WebOperationContext.Current.OutgoingResponse.Headers.Set("Content-Disposition", "attachment; filename=\"export.csv\";"); return(Request.stream); }
public CswNbtResource GetResource(string metadataname, string id) { CswNbtAPIGenericRequest Req = new CswNbtAPIGenericRequest(metadataname, id); CswNbtResource Ret = new CswNbtResource(); var SvcDriver = new CswWebSvcDriver <CswNbtResource, CswNbtAPIGenericRequest>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServiceREAD.GetResource, ParamObj: Req ); SvcDriver.run(); WebOperationContext ctx = WebOperationContext.Current; ctx.OutgoingResponse.StatusCode = Ret.Status; if (ctx.OutgoingResponse.StatusCode != HttpStatusCode.OK) { Ret = null; } return(Ret); }
public CswNbtResourceCollection GetCollection(string metadataname) { CswNbtAPIGenericRequest Req = new CswNbtAPIGenericRequest(metadataname, string.Empty); CswNbtResourceCollection Ret = new CswNbtResourceCollection(); Req.PropertyFilters = _Context.Request.QueryString; var SvcDriver = new CswWebSvcDriver <CswNbtResourceCollection, CswNbtAPIGenericRequest>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServiceREAD.GetCollection, ParamObj: Req ); SvcDriver.run(); WebOperationContext ctx = WebOperationContext.Current; ctx.OutgoingResponse.StatusCode = Ret.Status; if (ctx.OutgoingResponse.StatusCode != HttpStatusCode.OK) { Ret = null; } return(Ret); }
public CswNbtResource Create(Collection <CswNbtWcfProperty> Properties, string metadataname) { CswNbtAPIGenericRequest Req = new CswNbtAPIGenericRequest(metadataname, string.Empty); CswNbtResource Ret = new CswNbtResource(); if (null != Properties) { Req.Properties = Properties; } var SvcDriver = new CswWebSvcDriver <CswNbtResource, CswNbtAPIGenericRequest>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServiceCREATE.Create, ParamObj: Req ); SvcDriver.run(); WebOperationContext ctx = WebOperationContext.Current; ctx.OutgoingResponse.StatusCode = Ret.Status; if (ctx.OutgoingResponse.StatusCode != HttpStatusCode.Created) { Ret = null; } return(Ret); }
public void createNTViews() { var GetViewDriverType = new CswWebSvcDriver <string, string>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: string.Empty, WebSvcMethodPtr: CswNbtWebServiceDesign.createNTViews, ParamObj: string.Empty ); GetViewDriverType.run(); }
public CswNbtWebServiceSession.LoginDataReturn getLoginData(LoginData.LoginDataRequest Request) { CswNbtWebServiceSession.LoginDataReturn Ret = new CswNbtWebServiceSession.LoginDataReturn(); var SvcDriver = new CswWebSvcDriver <CswNbtWebServiceSession.LoginDataReturn, LoginData.LoginDataRequest>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServiceSession.getLoginData, ParamObj: Request ); SvcDriver.run(); return(Ret); }
public CswNbtPrintJobReturn newPrintJob(NbtPrintLabel.Request.printJob Request) { CswNbtPrintJobReturn Ret = new CswNbtPrintJobReturn(); var SvcDriver = new CswWebSvcDriver <CswNbtPrintJobReturn, NbtPrintLabel.Request.printJob>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServicePrintLabels.newPrintJob, ParamObj: Request ); SvcDriver.run(); return(Ret); }
public CswNbtWebServiceRegulatoryReporting.TierIIDataReturn DuplicateMaterialsReport() { CswNbtWebServiceRegulatoryReporting.TierIIDataReturn Ret = new CswNbtWebServiceRegulatoryReporting.TierIIDataReturn(); var SvcDriver = new CswWebSvcDriver <CswNbtWebServiceRegulatoryReporting.TierIIDataReturn, object>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServiceRegulatoryReporting.getDuplicateMaterialsReport, ParamObj: null ); SvcDriver.run(); return(Ret); }
public CswNbtWebServiceCISProNbtMobile.CswNbtMobileReturn RLSaveData(RapidLoaderData.RapidLoaderDataRequest Request) { CswNbtWebServiceCISProNbtMobile.CswNbtMobileReturn Ret = new CswNbtWebServiceCISProNbtMobile.CswNbtMobileReturn(); var SvcDriver = new CswWebSvcDriver <CswNbtWebServiceCISProNbtMobile.CswNbtMobileReturn, RapidLoaderData.RapidLoaderDataRequest>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServiceCISProNbtMobile.RLSaveData, ParamObj: Request ); SvcDriver.run(); return(Ret); }
public void resetCartCounts(string CartId) { //delegate has to be static because you can't create an instance yet: you don't have resources until the delegate is actually called CswNbtRequestDataModel.CswRequestReturn Ret = new CswNbtRequestDataModel.CswRequestReturn(); var InitDriverType = new CswWebSvcDriver <CswNbtRequestDataModel.CswRequestReturn, string>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: (Resources, Obj, ParamObj) => CswNbtActRequesting.resetCartCounts(Resources), ParamObj: null ); InitDriverType.run(); }
public CswNbtWebServiceReceiving.CswNbtContainerBarcodeCheckReturn CheckContainerBarcodes(Collection <CswNbtAmountsGridQuantity> Request) { CswNbtWebServiceReceiving.CswNbtContainerBarcodeCheckReturn Ret = new CswNbtWebServiceReceiving.CswNbtContainerBarcodeCheckReturn(); var GetViewDriverType = new CswWebSvcDriver <CswNbtWebServiceReceiving.CswNbtContainerBarcodeCheckReturn, Collection <CswNbtAmountsGridQuantity> >( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServiceReceiving.CheckContainerBarcodes, ParamObj: Request ); GetViewDriverType.run(); return(Ret); }
public CswNbtWebServiceReceiving.CswNbtReceivingDefinitionReturn Receive(CswNbtReceivingDefinition Request) { CswNbtWebServiceReceiving.CswNbtReceivingDefinitionReturn Ret = new CswNbtWebServiceReceiving.CswNbtReceivingDefinitionReturn(); var GetViewDriverType = new CswWebSvcDriver <CswNbtWebServiceReceiving.CswNbtReceivingDefinitionReturn, CswNbtReceivingDefinition>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServiceReceiving.ReceiveMaterial, ParamObj: Request ); GetViewDriverType.run(); return(Ret); }
public CswNbtWebServiceContainer.ReceivingDataReturn updateExpirationDate(ContainerData.ReceiptLotRequest Request) { CswNbtWebServiceContainer.ReceivingDataReturn Ret = new CswNbtWebServiceContainer.ReceivingDataReturn(); var GetViewDriverType = new CswWebSvcDriver <CswNbtWebServiceContainer.ReceivingDataReturn, ContainerData.ReceiptLotRequest>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServiceContainer.updateExpirationDate, ParamObj: Request ); GetViewDriverType.run(); return(Ret); }
public CswNbtModulesPageReturn HandleModule(CswNbtDataContractModule Module) { CswNbtModulesPageReturn ret = new CswNbtModulesPageReturn(); var SvcDriver = new CswWebSvcDriver <CswNbtModulesPageReturn, CswNbtDataContractModule>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: ret, WebSvcMethodPtr: CswNbtWebServiceModules.HandleModule, ParamObj: Module ); SvcDriver.run(); return(ret); }
public CswNbtWebServiceKioskMode.KioskModeDataReturn KioskModeBarcodeReport() { CswNbtWebServiceKioskMode.KioskModeDataReturn Ret = new CswNbtWebServiceKioskMode.KioskModeDataReturn(); var SvcDriver = new CswWebSvcDriver <CswNbtWebServiceKioskMode.KioskModeDataReturn, object>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServiceKioskMode.getKioskModeBarcodeReport, ParamObj: null ); SvcDriver.run(); return(Ret); }
public CswNbtModulesPageReturn Initialize() { CswNbtModulesPageReturn ret = new CswNbtModulesPageReturn(); var SvcDriver = new CswWebSvcDriver <CswNbtModulesPageReturn, object>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: ret, WebSvcMethodPtr: CswNbtWebServiceModules.Initialize, ParamObj: null ); SvcDriver.run(); return(ret); }
public MaterialResponse saveMaterialProps(string PropsObject) { //delegate has to be static because you can't create an instance yet: you don't have resources until the delegate is actually called MaterialResponse Ret = new MaterialResponse(); var GetViewDriverType = new CswWebSvcDriver <MaterialResponse, string>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServiceCreateMaterial.saveMaterialProps, ParamObj: PropsObject ); GetViewDriverType.run(); return(Ret); }
public CswNbtWebServiceKioskMode.KioskModeDataReturn DetermineDisplayProps(KioskModeData RequestData) { CswNbtWebServiceKioskMode.KioskModeDataReturn Ret = new CswNbtWebServiceKioskMode.KioskModeDataReturn(); var SvcDriver = new CswWebSvcDriver <CswNbtWebServiceKioskMode.KioskModeDataReturn, KioskModeData>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServiceKioskMode.HandleScan, ParamObj: RequestData ); SvcDriver.run(); return(Ret); }
public CswNbtWebServiceKioskMode.KioskModeDataReturn CommitOperation(KioskModeData RequestData) { CswNbtWebServiceKioskMode.KioskModeDataReturn Ret = new CswNbtWebServiceKioskMode.KioskModeDataReturn(); var SvcDriver = new CswWebSvcDriver <CswNbtWebServiceKioskMode.KioskModeDataReturn, KioskModeData>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServiceKioskMode.CommitOperation, ParamObj: RequestData ); SvcDriver.run(); return(Ret); }
public CswNbtWebServiceKioskMode.KioskModeDataReturn GetAvailableModes() { CswNbtWebServiceKioskMode.KioskModeDataReturn Ret = new CswNbtWebServiceKioskMode.KioskModeDataReturn(); var SvcDriver = new CswWebSvcDriver <CswNbtWebServiceKioskMode.KioskModeDataReturn, KioskModeData>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServiceKioskMode.GetAvailableModes, ParamObj: null ); SvcDriver.run(); return(Ret); }
public CswNbtLabelJobResponse LpcGetNextJob(CswNbtLabelJobRequest Request) { //delegate has to be static because you can't create an instance yet: you don't have resources until the delegate is actually called CswNbtLabelJobResponse Ret = new CswNbtLabelJobResponse(); var SvcDriver = new CswWebSvcDriver <CswNbtLabelJobResponse, CswNbtLabelJobRequest>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServicePrintLabels.nextLabelJob, ParamObj: Request ); SvcDriver.run(); return(Ret); }
public CswNbtLabelPrinterReg LpcRegister(LabelPrinter Request) { //delegate has to be static because you can't create an instance yet: you don't have resources until the delegate is actually called CswNbtLabelPrinterReg Ret = new CswNbtLabelPrinterReg(); var SvcDriver = new CswWebSvcDriver <CswNbtLabelPrinterReg, LabelPrinter>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServicePrintLabels.registerLpc, ParamObj: Request ); SvcDriver.run(); return(Ret); }
public CswNbtLabelEpl LpcGetLabel(NbtPrintLabel.Request.Get Request) { //delegate has to be static because you can't create an instance yet: you don't have resources until the delegate is actually called CswNbtLabelEpl Ret = new CswNbtLabelEpl(); var SvcDriver = new CswWebSvcDriver <CswNbtLabelEpl, NbtPrintLabel.Request.Get>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServicePrintLabels.getEPLText, ParamObj: Request ); SvcDriver.run(); return(Ret); }
public CswWebSvcReturn exception() { //delegate has to be static because you can't create an instance yet: you don't have resources until the delegate is actually called CswWebSvcReturn Ret = new CswWebSvcReturn(); var GetViewDriverType = new CswWebSvcDriver <CswWebSvcReturn, object>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: throwException, ParamObj: null ); GetViewDriverType.run(); return(Ret); }