Exemplo n.º 1
0
 public InformationSet GetFullInformationSet(string code)
 {
     InformationSet result = new InformationSet();
     Core.Functions client = new Core.Functions();
     result = client.GetFullInformationSet(code);
     return result;
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            string barcode = "";

            barcode = "+J123AQ3451/$$3231231BC34567/S4012R";

            Core.Functions     client = new Core.Functions();
            DAO.InformationSet result;
            result = client.GetFullInformationSet(barcode);
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            string barcode = "";

            barcode = "]C0+$$0311D023/L13RJ";

            Core.Functions     client = new Core.Functions();
            DAO.InformationSet result;
            result = client.GetFullInformationSet(barcode);
        }
Exemplo n.º 4
0
        static void Main(string[] args)
        {
            string barcode = "";

            barcode = "58562152ANTL0294122012";

            Core.Functions     client = new Core.Functions();
            DAO.InformationSet result;
            result = client.GetFullInformationSet(barcode);
        }
Exemplo n.º 5
0
        public InformationSet GetFullInformationSet(string code)
        {
            InformationSet result = new InformationSet();

            if (false) //WebAPI
            {
                // To do : problème
            }
            else //DLL
            {
                Core.Functions client = new Core.Functions();
                result = client.GetFullInformationSet(code);
            }
            return(result);
        }
Exemplo n.º 6
0
        private void Parse(object sender, EventArgs e)
        {
            Core.Functions client  = new Core.Functions();
            string         Barcode = textBoxBarcode.Text;

            DAO.InformationSet result = client.GetFullInformationSet(Barcode);
            textBoxExecuteResult.Text         = result.executeResult.ToString();
            textBoxAdditionalInformation.Text = result.AdditionalInformation;
            textBoxACL.Text                    = result.ACL;
            textBoxADDITIONALID.Text           = result.ADDITIONALID;
            textBoxBESTBEFORE.Text             = result.BESTBEFORE;
            textBoxCIP.Text                    = result.CIP;
            textBoxcontainsOrMayContainId.Text = result.ContainsOrMayContainId.ToString(); //check type
            textBoxCONTENT.Text                = result.CONTENT;
            textBoxCOUNT.Text                  = result.COUNT;
            textBoxExpiry.Text                 = result.Expiry;
            textBoxFamily.Text                 = result.Family;
            textBoxGTIN.Text                   = result.GTIN;
            textBoxLIC.Text                    = result.LIC;
            textBoxLot.Text                    = result.Lot;
            textBoxLPP.Text                    = result.LPP;
            textBoxNaS7.Text                   = result.NaS7;
            textBoxNormalizedBESTBEFORE.Text   = result.NormalizedBESTBEFORE;
            textBoxNormalizedExpiry.Text       = result.NormalizedExpiry;
            textBoxNormalizedPRODDATE.Text     = result.NormalizedPRODDATE;
            textBoxPCN.Text                    = result.PCN;
            textBoxPRODDATE.Text               = result.PRODDATE;
            textBoxQuantity.Text               = result.Quantity;
            textBoxReference.Text              = result.Reference;
            textBoxNaSIdParamName.Text         = result.NaSIdParamName;
            textBoxSerial.Text                 = result.Serial;
            textBoxSSCC.Text                   = result.SSCC;
            textBoxSymbologyID.Text            = result.SymbologyID;
            textBoxType.Text                   = result.Type;
            textBoxUoM.Text                    = result.UoM;
            textBoxUPN.Text                    = result.UPN;
            textBoxVARCOUNT.Text               = result.VARCOUNT;
            textBoxVARIANT.Text                = result.VARIANT;
            textBoxVariante.Text               = result.SubType;
            textBoxUDI.Text                    = result.UDI;
        }
Exemplo n.º 7
0
        private void Parse(object sender, EventArgs e)
        {
            Core.Functions client  = new Core.Functions();
            string         Barcode = textBoxBarcode.Text;

            DAO.InformationSet result = client.GetFullInformationSet(Barcode);
            textBoxParserIOVersion.Text       = result.ParserIOVersion;
            textBoxExecuteResult.Text         = result.executeResult.ToString();
            textBoxAdditionalInformation.Text = result.AdditionalInformation;
            textBoxACL.Text                    = result.ACL;
            textBoxADDITIONALID.Text           = result.ADDITIONALID;
            textBoxBESTBEFORE.Text             = result.BESTBEFORE;
            textBoxCIP.Text                    = result.CIP;
            textBoxcontainsOrMayContainId.Text = result.ContainsOrMayContainId.ToString(); //check type

            //Identifiers
            string IdentifiersRawList = string.Empty;
            bool   isFirst            = true;
            string returnCarriageLine = string.Empty;

            foreach (Identifier x in result.Identifiers)
            {
                if (isFirst)
                {
                    isFirst = false;
                }
                else
                {
                    returnCarriageLine = "\r\n";
                }
                textBoxIdentifiers.AppendText(returnCarriageLine + x.Value);
            }

            textBoxCONTENT.Text                = result.CONTENT;
            textBoxCOUNT.Text                  = result.COUNT;
            textBoxCUSTPARTNO.Text             = result.CUSTPARTNO;
            textBoxEAN.Text                    = result.EAN;
            textBoxExpiry.Text                 = result.Expiry;
            textBoxFamily.Text                 = result.Family;
            textBoxGTIN.Text                   = result.GTIN;
            textBoxLIC.Text                    = result.LIC;
            textBoxLot.Text                    = result.Lot;
            textBoxLPP.Text                    = result.LPP;
            textBoxNaS7.Text                   = result.NaS7;
            textBoxNormalizedBESTBEFORE.Text   = result.NormalizedBESTBEFORE;
            textBoxNormalizedExpiry.Text       = result.NormalizedExpiry;
            textBoxNormalizedPRODDATE.Text     = result.NormalizedPRODDATE;
            textBoxPCN.Text                    = result.PCN;
            textBoxPRODDATE.Text               = result.PRODDATE;
            textBoxQuantity.Text               = result.Quantity;
            textBoxReference.Text              = result.Reference;
            textBoxNaSIdParamName.Text         = result.NaSIdParamName;
            textBoxSerial.Text                 = result.Serial;
            textBoxSSCC.Text                   = result.SSCC;
            textBoxStorageLocation.Text        = result.StorageLocation;
            textBoxSymbologyID.Text            = result.SymbologyID;
            textBoxSymbologyIDDesignation.Text = result.SymbologyIDDesignation;
            textBoxType.Text                   = result.Type;
            textBoxUoM.Text                    = result.UoM;
            textBoxUPN.Text                    = result.UPN;
            textBoxVARCOUNT.Text               = result.VARCOUNT;
            textBoxVARIANT.Text                = result.VARIANT;
            textBoxVariante.Text               = result.SubType;
            textBoxUDI.Text                    = result.UDI;
            textBoxINTERNAL_90.Text            = result.INTERNAL_90;
            textBoxINTERNAL_91.Text            = result.INTERNAL_91;
            textBoxINTERNAL_92.Text            = result.INTERNAL_92;
            textBoxINTERNAL_93.Text            = result.INTERNAL_93;
            textBoxINTERNAL_94.Text            = result.INTERNAL_94;
            textBoxINTERNAL_95.Text            = result.INTERNAL_95;
            textBoxINTERNAL_96.Text            = result.INTERNAL_96;
            textBoxINTERNAL_97.Text            = result.INTERNAL_97;
            textBoxINTERNAL_98.Text            = result.INTERNAL_98;
            textBoxINTERNAL_99.Text            = result.INTERNAL_99;

            if (result.Type == "HIBC")
            {
                tabControlOutput.SelectedTab = hibcTabPage;
            }
            else if (result.Type.Contains("GS1") | result.Type == "EAN 13")
            {
                tabControlOutput.SelectedTab = gs1TabPage;
            }
            else if (result.Type == "NaS")
            {
                tabControlOutput.SelectedTab = nasTabPage;
            }
        }
Exemplo n.º 8
0
        public int Parse_1(string Barcode,
                           out string ACL,                  //1
                           out string ADDITIONALID,         //2
                           out string BESTBEFORE,           //3
                           out string CIP,                  //4
                           out string Company,              //5
                           out bool containsOrMayContainId,
                           out string CONTENT,              //6
                           out string COUNT,                //7
                           out string EAN,
                           out string Expiry,               //8
                           out string Family,               //9
                           out string GTIN,                 //10
                           out string LIC,                  //11
                           out string Lot,                  //12
                           out string LPP,                  //13
                           out string NaS7,                 //14
                           out string NormalizedBESTBEFORE, //15
                           out string NormalizedExpiry,     //16
                           out string NormalizedPRODDATE,   //17
                           out string PCN,                  //18
                           out string PRODDATE,             //19
                           out string Product,              //20
                           out string Quantity,             //21
                           out string Reference,            //22
                           out string NaSIdParamName,
                           out string Serial,               //23
                           out string SSCC,                 //24
                           out string SubType,              //25
                           out string SymbologyID,
                           out string Type,                 //26
                           out string UDI,
                           out string UoM,                  //28
                           out string UPN,
                           out string VARCOUNT,             //29
                           out string VARIANT,              //30
                           out string Errors)
        {
            int executeResult = 0;

            ACL                    = "";    //1
            ADDITIONALID           = "";    //2
            BESTBEFORE             = "";    //3
            CIP                    = "";    //4
            Company                = "";    //5
            containsOrMayContainId = false; //31
            CONTENT                = "";    //6
            COUNT                  = "";    //7
            EAN                    = "";
            Expiry                 = "";    //8
            Family                 = "";    //9
            GTIN                   = "";    //10
            LIC                    = "";    //11
            Lot                    = "";    //12
            LPP                    = "";    //13
            NaS7                   = "";    //14
            NormalizedBESTBEFORE   = "";    //15
            NormalizedExpiry       = "";    //16
            NormalizedPRODDATE     = "";    //17
            PCN                    = "";    //18
            PRODDATE               = "";    //19
            Product                = "";    //20
            Quantity               = "";    //21
            Reference              = "";    //22
            NaSIdParamName         = "";
            Serial                 = "";    //23
            SSCC                   = "";    //24
            SubType                = "";    //25
            SymbologyID            = "";
            Type                   = "";    //26
            UDI                    = "";
            UoM                    = "";    //28
            UPN                    = "";
            VARCOUNT               = "";    //29
            VARIANT                = "";    //30
            Errors                 = "";
            try
            {
                InformationSet result = new InformationSet();
                Core.Functions client = new Core.Functions();
                result                 = client.GetFullInformationSet(Barcode);
                executeResult          = result.executeResult;
                Type                   = result.Type;
                SubType                = result.SubType;
                ACL                    = result.ACL;
                ADDITIONALID           = result.ADDITIONALID;
                BESTBEFORE             = result.BESTBEFORE;
                CIP                    = result.CIP;                  //4
                Company                = "";                          // result.Company;  //5 Obsolete
                containsOrMayContainId = result.ContainsOrMayContainId;
                CONTENT                = result.CONTENT;              //6
                COUNT                  = result.COUNT;                //7
                EAN                    = result.EAN;
                Expiry                 = result.Expiry;               //8
                Family                 = result.Family;               //9
                GTIN                   = result.GTIN;                 //10
                LIC                    = result.LIC;                  //11
                Lot                    = result.Lot;                  //12
                LPP                    = result.LPP;                  //13
                NaS7                   = result.NaS7;                 //14
                NormalizedBESTBEFORE   = result.NormalizedBESTBEFORE; //15
                NormalizedExpiry       = result.NormalizedExpiry;     //16
                NormalizedPRODDATE     = result.NormalizedPRODDATE;   //17
                PCN                    = result.PCN;                  //18
                PRODDATE               = result.PRODDATE;             //19
                Product                = "";                          // result.Product;  //20 //Obsolete
                Quantity               = result.Quantity;             //21
                Reference              = result.Reference;            //22
                NaSIdParamName         = result.NaSIdParamName;
                Serial                 = result.Serial;               //23
                SSCC                   = result.SSCC;                 //24
                SymbologyID            = result.SymbologyID;
                UDI                    = result.UDI;
                UoM                    = result.UoM;      //28
                UPN                    = result.UPN;
                VARCOUNT               = result.VARCOUNT; //29
                VARIANT                = result.VARIANT;  //30
                Errors                 = result.AdditionalInformation;
            }
            catch (Exception e)
            {
                Errors = Errors + e.Message;
            }
            return(executeResult);
        }
Exemplo n.º 9
0
        static void Main(string[] args)
        {
            Provider value          = Provider.dll;
            string   workingFolder  = "C:\\ParserIO\\";
            string   sourceFileName = workingFolder + "Barcodestore_master_20160926155425.xml";

            string outputFileName = workingFolder + "Barcodestore_" + value + "_" + DateTime.Now.ToString("yyyymmddhhmmss") + ".xml";

            StreamReader source;
            XmlDocument  document;
            XmlNodeList  analyses;

            source   = new StreamReader(sourceFileName, Encoding.UTF8);
            document = new XmlDocument();
            document.Load(source);

            DAO.Barcodestore bcs = new DAO.Barcodestore();
            bcs.Version      = DateTime.Now.ToString("yyyymmddhhmm");
            bcs.ProviderName = value.ToString();
            bcs.Analyses     = new List <DAO.Analyse>();

            analyses = document.GetElementsByTagName("Analyse");

            foreach (XmlElement sourceAnalyse in analyses)
            {
                DAO.Analyse        x             = new DAO.Analyse();
                DAO.InformationSet targetAnalyse = new DAO.InformationSet();
                x.AnalyseId  = Convert.ToInt32(sourceAnalyse.GetElementsByTagName("AnalyseId")[0].InnerText);
                x.TimeStamp  = Convert.ToDateTime(sourceAnalyse.GetElementsByTagName("TimeStamp")[0].InnerText);
                x.Barcode    = sourceAnalyse.GetElementsByTagName("Barcode")[0].InnerText;
                x.Commentary = sourceAnalyse.GetElementsByTagName("Commentary")[0].InnerText;

                if (value == Provider.dll)
                {
                    Core.Functions client = new Core.Functions();
                    targetAnalyse = client.GetFullInformationSet(x.Barcode);
                }
                else if (value == Provider.ws)
                {
                    //todo
                }
                else if (value == Provider.wcf)
                {
                    //todo
                }
                else if (value == Provider.webapi)
                {
                    targetAnalyse = Tools.Common.Wrapper(x.Barcode);
                }
                else if (value == Provider.fdagudid)
                {
                    //todo
                }

                x.InformationSet.Type                   = targetAnalyse.Type;
                x.InformationSet.SubType                = targetAnalyse.SubType;
                x.InformationSet.executeResult          = targetAnalyse.executeResult;
                x.InformationSet.ACL                    = targetAnalyse.ACL;
                x.InformationSet.ADDITIONALID           = targetAnalyse.ADDITIONALID;
                x.InformationSet.BESTBEFORE             = targetAnalyse.BESTBEFORE;
                x.InformationSet.CIP                    = targetAnalyse.CIP;
                x.InformationSet.Company                = targetAnalyse.Company;
                x.InformationSet.ContainsOrMayContainId = targetAnalyse.ContainsOrMayContainId;
                x.InformationSet.CONTENT                = targetAnalyse.CONTENT;
                x.InformationSet.COUNT                  = targetAnalyse.COUNT;
                x.InformationSet.EAN                    = targetAnalyse.EAN;
                x.InformationSet.Expiry                 = targetAnalyse.Expiry;
                x.InformationSet.Family                 = targetAnalyse.Family;
                x.InformationSet.GTIN                   = targetAnalyse.GTIN;
                x.InformationSet.INTERNAL_91            = targetAnalyse.INTERNAL_91;
                x.InformationSet.INTERNAL_92            = targetAnalyse.INTERNAL_92;
                x.InformationSet.INTERNAL_93            = targetAnalyse.INTERNAL_93;
                x.InformationSet.INTERNAL_94            = targetAnalyse.INTERNAL_94;
                x.InformationSet.INTERNAL_95            = targetAnalyse.INTERNAL_95;
                x.InformationSet.INTERNAL_96            = targetAnalyse.INTERNAL_96;
                x.InformationSet.INTERNAL_97            = targetAnalyse.INTERNAL_97;
                x.InformationSet.INTERNAL_98            = targetAnalyse.INTERNAL_98;
                x.InformationSet.INTERNAL_99            = targetAnalyse.INTERNAL_99;
                x.InformationSet.LIC                    = targetAnalyse.LIC;
                x.InformationSet.Lot                    = targetAnalyse.Lot;
                x.InformationSet.LPP                    = targetAnalyse.LPP;
                x.InformationSet.NaS7                   = targetAnalyse.NaS7;
                x.InformationSet.NaSIdParamName         = targetAnalyse.NaSIdParamName;
                x.InformationSet.NormalizedBESTBEFORE   = targetAnalyse.NormalizedBESTBEFORE;
                x.InformationSet.NormalizedExpiry       = targetAnalyse.NormalizedExpiry;
                x.InformationSet.NormalizedPRODDATE     = targetAnalyse.NormalizedPRODDATE;
                x.InformationSet.PCN                    = targetAnalyse.PCN;
                x.InformationSet.PRODDATE               = targetAnalyse.PRODDATE;
                x.InformationSet.Product                = targetAnalyse.Product;
                x.InformationSet.Quantity               = targetAnalyse.Quantity;
                x.InformationSet.Reference              = targetAnalyse.Reference;
                x.InformationSet.Serial                 = targetAnalyse.Serial;
                x.InformationSet.SSCC                   = targetAnalyse.SSCC;
                x.InformationSet.SymbologyID            = targetAnalyse.SymbologyID;
                x.InformationSet.UDI                    = targetAnalyse.UDI;
                x.InformationSet.UoM                    = targetAnalyse.UoM;
                x.InformationSet.UPN                    = targetAnalyse.UPN;
                x.InformationSet.VARCOUNT               = targetAnalyse.VARCOUNT;
                x.InformationSet.VARIANT                = targetAnalyse.VARIANT;
                x.InformationSet.AdditionalInformation  = targetAnalyse.AdditionalInformation;

                bcs.Analyses.Add(x);
                Console.WriteLine(x.AnalyseId);
            }


            using (StreamWriter myWriter = new StreamWriter(outputFileName, false))
            {
                XmlSerializer mySerializer = new XmlSerializer(typeof(DAO.Barcodestore), new XmlRootAttribute("Barcodestore"));
                mySerializer.Serialize(myWriter, bcs);
            }
        }