示例#1
0
文件: Form1.cs 项目: valiant-tms/PDM
 private SAPConnection getSAPConnection()
 {
     if (sapConnection == null)
     {
         sapConnection = new SAPConnection(sapSystem);
     }
     return(sapConnection);
 }
示例#2
0
        public void process(SAPConnection sapConnection)
        {
            DataTable projects = sapConnection.getJobList();

            serverHost = getPDM()["HOST"].ToString();

            try {
                ClientX.Session session = new ClientX.Session(serverHost);
                User            user    = session.login();
                foreach (DataRow project in projects.Rows)
                {
                    bomItems = session.getObjects(project["ITEMID"].ToString(), project["REVID"].ToString(), getAttributes());
                    sapConnection.send2SAP(project["PSPNR"].ToString(), getAttributes(), bomItems);
                }
            } catch (SystemException e) {
                Console.WriteLine(e.StackTrace);
            }
        }