예제 #1
0
        public EntityShipment SimplePullMethod(EntityShipment objRequest)
        {
            switch (objRequest.ToolKit.ID.ToUpper())
            {
            case "LEXIS":
                LexisInterface objLexis = new LexisInterface();
                objRequest = objLexis.Pull(objRequest);
                break;

            case "LEXISGLOBAL":
                LexisGlobalInterface objLexisGlobal = new LexisGlobalInterface();
                objRequest = objLexisGlobal.Pull(objRequest);
                break;

            case "CMS":
                CMSInterface objCMS = new CMSInterface();
                objRequest = objCMS.Pull(objRequest);
                break;

            case "SAP":
                SAPInterface objSAP = new SAPInterface();
                objRequest = objSAP.Pull(objRequest);
                break;
            }
            return(objRequest);
        }
예제 #2
0
        private void Button1_Click(object sender, EventArgs e)
        {
            string         strInterface = lstInterface.SelectedItem.ToString().Trim();
            EntityShipment objES        = new EntityShipment
            {
                objDetails = new EntityShipmentDetails
                {
                    strDeliveryDocNumber = txtOrder.Text
                }
            };

            EntityConnection objConnection = new EntityConnection();

            if (radioButtonDev.Checked == true)
            {
                switch (strInterface.ToUpper())
                {
                case "CMS":
                    objConnection.strDSNName  = "Systema";
                    objConnection.strServer   = "SystemA.cadmus.com";
                    objConnection.strDatabase = "SHLIB";
                    objConnection.strUserID   = "CENPROUSER";
                    objConnection.strPassword = "******";
                    objES.ToolKit             = new EntityToolKit();
                    break;

                case "LEXIS":
                    objConnection.strDSNName  = @"dvsqlmonarch.cenveo.cvo.net";
                    objConnection.strDatabase = "PSIntegration";
                    objConnection.strUserID   = "service.ps";
                    objConnection.strPassword = "******";
                    objES.ToolKit             = new EntityToolKit();
                    break;

                case "LEXISGLOBAL":
                    objConnection.strDSNName  = @"dvsqlmonarch.cenveo.cvo.net";
                    objConnection.strDatabase = "PSIntegration";
                    objConnection.strUserID   = "service.ps";
                    objConnection.strPassword = "******";
                    objES.ToolKit             = new EntityToolKit();
                    break;

                case "SAP":
                    objConnection.strDSNName  = @"dvsqlmonarch.cenveo.cvo.net";
                    objConnection.strDatabase = "PSIntegration";
                    objConnection.strUserID   = "service.ps";
                    objConnection.strPassword = "******";
                    objES.ToolKit             = new EntityToolKit();
                    break;

                default:
                    MessageBox.Show("Interface was not selected");
                    break;
                }
            }
            if (radioButtonQA.Checked == true)
            {
                switch (strInterface.ToUpper())
                {
                case "CMS":
                    objConnection.strDSNName  = "Sysatr";
                    objConnection.strServer   = "Sysatr.cadmus.com";
                    objConnection.strDatabase = "SHLIB";
                    objConnection.strUserID   = "ODBCUSER";
                    objConnection.strPassword = "******";
                    objES.ToolKit             = new EntityToolKit();
                    break;

                case "LEXIS":
                    objConnection.strDSNName  = @"qasqlmonarch.cenveo.cvo.net";
                    objConnection.strDatabase = "PSIntegration";
                    objConnection.strUserID   = "service.ps";
                    objConnection.strPassword = "******";
                    objES.ToolKit             = new EntityToolKit();
                    break;

                case "LEXISGLOBAL":
                    objConnection.strDSNName  = @"qasqlmonarch.cenveo.cvo.net";
                    objConnection.strDatabase = "PSIntegration";
                    objConnection.strUserID   = "service.ps";
                    objConnection.strPassword = "******";
                    objES.ToolKit             = new EntityToolKit();
                    break;

                case "SAP":
                    objConnection.strDSNName  = @"qasqlmonarch.cenveo.cvo.net";
                    objConnection.strDatabase = "PSIntegration";
                    objConnection.strUserID   = "service.ps";
                    objConnection.strPassword = "******";
                    objES.ToolKit             = new EntityToolKit();
                    break;

                default:
                    MessageBox.Show("Interface was not selected");
                    break;
                }
            }
            if (radioButtonPD.Checked == true)
            {
                switch (strInterface.ToUpper())
                {
                case "CMS":
                    objConnection.strDSNName  = "Systemb";
                    objConnection.strServer   = "SystemB.cadmus.com";
                    objConnection.strDatabase = "SHLIB";
                    objConnection.strUserID   = "ODBCUSER";
                    objConnection.strPassword = "******";
                    objES.ToolKit             = new EntityToolKit();
                    break;

                case "LEXIS":
                    objConnection.strDSNName  = @"pdsqlmonarch.cenveo.cvo.net";
                    objConnection.strDatabase = "PSIntegration";
                    objConnection.strUserID   = "service.ps";
                    objConnection.strPassword = "******";
                    objES.ToolKit             = new EntityToolKit();
                    break;

                case "LEXISGLOBAL":
                    objConnection.strDSNName  = @"pdsqlmonarch.cenveo.cvo.net";
                    objConnection.strDatabase = "PSIntegration";
                    objConnection.strUserID   = "service.ps";
                    objConnection.strPassword = "******";
                    objES.ToolKit             = new EntityToolKit();
                    break;

                case "SAP":
                    objConnection.strDSNName  = @"pdsqlmonarch.cenveo.cvo.net";
                    objConnection.strDatabase = "PSIntegration";
                    objConnection.strUserID   = "service.ps";
                    objConnection.strPassword = "******";
                    objES.ToolKit             = new EntityToolKit();
                    break;

                default:
                    MessageBox.Show("Interface was not selected");
                    break;
                }
            }

            objES.ToolKit.objConnection = objConnection;

            switch (strInterface.ToUpper())
            {
            case "CMS":
                break;

            case "LEXIS":
                LexisInterface objSample = new LexisInterface();
                objSample.Pull(objES);
                break;

            case "LEXISGLOBAL":
                LexisGlobalInterface objSampleLG = new LexisGlobalInterface();
                objSampleLG.Pull(objES);
                break;

            case "SAP":
                SAPInterface objSampleSAP = new SAPInterface();
                objSampleSAP.Pull(objES);
                break;

            default:
                MessageBox.Show("Interface was not selected");
                break;
            }
        }