简体   繁体   English

动态GP eConnect-创建新的PMClassMaster

[英]Dynamic GP eConnect - Creating a new PMClassMaster

I am finding my self looking in front of a wall right now. 我发现自己现在正看着墙前。 I've started working with eConnect to communicate with Dynamic GP in order to access information. 我已经开始使用eConnect与Dynamic GP进行通信以访问信息。

I've come accross a questions that I have yet to see answered and I'm tired of searching all over the web and all over the bunch of documents I have. 我遇到了一个我尚未看到答案的问题,我已经厌倦了在整个网络和我拥有的所有文档中进行搜索。 In case someone reads this I'll give you a few sources after my question so you can guide your self even if this post doesn't help you. 万一有人读了这个,我会在我的问题后面给你一些资料,即使这篇文章没有帮助您,您也可以自已。

My question is how can I create a new PMClassMaster through C#? 我的问题是如何通过C#创建新的PMClassMaster? In the end its an XML file that you need to generate but I wonder if there is a method that does that for me? 最后,您需要生成一个XML文件,但我想知道是否有一种方法可以帮我实现? For example, to create a new Vendor you can do the following: 例如,要创建新的供应商,您可以执行以下操作:

PMVendorMasterType vendorMasterType = new PMVendorMasterType();

vendorMasterType.eConnectProcessInfo = new eConnectProcessInfo();
vendorMasterType.eConnectProcessInfo.ConnectionString = dynamicGPcs;


vendorMasterType.taUpdateCreateVendorRcd = new taUpdateCreateVendorRcd();

vendorMasterType.taUpdateCreateVendorRcd.VENDORID = vendorGP.VENDORID;
vendorMasterType.taUpdateCreateVendorRcd.VENDNAME = vendorGP.VENDNAME;
vendorMasterType.taUpdateCreateVendorRcd.VENDSHNM = vendorGP.VENDSHNM;

//... etc...

PMVendorMasterType[] vendors = { vendorMasterType };

eConnect.PMVendorMasterType = vendors;

This will pretty much create an XML for you, because thats what GP recevies through eConnect's "CreateEntity" and "UpdateEntity" methods. 这几乎可以为您创建XML,因为这就是GP通过eConnect的“ CreateEntity”和“ UpdateEntity”方法来解决的问题。

I can't seem to find the same for PMClassMaster which is the table that has all the Vendor Class IDs. 对于PMClassMaster,我似乎找不到相同的表,它是具有所有供应商类别ID的表。 Does anyone know the answer? 有人知道答案吗? For reference: https://www.gptablereference.com/2010/Table/PM00100 供参考: https : //www.gptablereference.com/2010/Table/PM00100

----- Sources for GP ----- ----- GP的来源-----

http://mbsguru.blogspot.pt/ http://mbsguru.blogspot.pt/

http://victoriayudin.com/ http://victoriayudin.com/

http://www.gptablereference.com http://www.gptablereference.com

There is no eConnect node for the PM Class Master. PM Class Master没有eConnect节点。 Not everything that can be done in GP can be done via eConnect. 并非GP中可以完成的所有操作都可以通过eConnect完成。

For this you will have to manually insert records into the relevant SQL table in the desired database. 为此,您将必须手动将记录插入所需数据库中的相关SQL表中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM