Exemple #1
0
        public EntityShipment SimpleVoidMethod(EntityShipment objRequest)
        {
            switch (objRequest.ToolKit.ID.ToUpper())
            {
            case "LEXIS":
                LexisInterface objLexis = new LexisInterface();
                objRequest = objLexis.Void(objRequest);
                break;

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

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

            case "SAP":
                SAPInterface objSAP = new SAPInterface();
                objRequest = objSAP.Void(objRequest);
                break;
            }
            return(objRequest);
        }
Exemple #2
0
        private void Button3_Click(object sender, EventArgs e)
        {
            string         strInterface = lstInterface.SelectedItem.ToString().Trim();
            EntityShipment objES        = new EntityShipment();
            //This to debug the code through xml
            XmlSerializer serializer = new XmlSerializer(typeof(EntityShipment));

            //objEIShipment = (EntityShipment)serializer.Deserialize(new XmlTextReader(txtXML.Text));

            using (TextReader reader = new StringReader(txtXML.Text))
            {
                objES = (EntityShipment)serializer.Deserialize(reader);
            }
            switch (strInterface.ToUpper())
            {
            case "CMS":
                CMSInterface objCMS = new CMSInterface();
                objCMS.Void(objES);
                break;

            case "LEXIS":
                LexisInterface objLexis = new LexisInterface();
                objLexis.Void(objES);
                break;

            case "LEXISGLOBAL":
                LexisGlobalInterface objLexisGlobal = new LexisGlobalInterface();
                objLexisGlobal.Void(objES);
                break;

            case "SAP":
                SAPInterface objSAP = new SAPInterface();
                objSAP.Void(objES);
                break;

            default:
                MessageBox.Show("Interface was not selected");
                break;
            }
        }
Exemple #3
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;
            }
        }