Example #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);
        }
Example #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;
            }
        }