Ejemplo n.º 1
0
        public EntityShipment SimplePutbackMethod(EntityShipment objRequest)
        {
            switch (objRequest.ToolKit.ID.ToUpper())
            {
            case "LEXIS":
                LexisInterface objLexis = new LexisInterface();
                objRequest = objLexis.Putback(objRequest);
                break;

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

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

            case "SAP":
                SAPInterface objSAP = new SAPInterface();
                objRequest = objSAP.Putback(objRequest);
                break;
            }
            return(objRequest);
        }
Ejemplo n.º 2
0
        private void Button2_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));

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

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

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

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

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