Example #1
0
        public static BEID_EIDCard getData()
        {
            try
            {
                BEID_ReaderSet.initSDK();
                BEID_ReaderContext Reader = BEID_ReaderSet.instance().getReader();

                if (Reader.isCardPresent())
                {
                    BEID_EIDCard card = Reader.getEIDCard();

                    if (card.isTestCard())
                    {
                        card.setAllowTestCard(true);
                    }

                    return(card);
                }
                else
                {
                    return(null);
                }
            }

            catch (BEID_Exception ex)
            {
                IDReader.logError(ex);
                BEID_ReaderSet.releaseSDK();
                return(null);
            }
        }
Example #2
0
        private void LoadEid()
        {
            BEID_ReaderSet.initSDK();
            Registrated = false;

            try
            {
                BEID_ReaderSet     readerSet = BEID_ReaderSet.instance();
                BEID_ReaderContext reader    = readerSet.getReader();

                if (reader.isCardPresent())
                {
                    if (reader.getCardType() == BEID_CardType.BEID_CARDTYPE_EID)
                    {
                        BEID_EIDCard card         = reader.getEIDCard();
                        BEID_EId     doc          = card.getID();
                        BEID_Picture picture      = card.getPicture();
                        byte[]       pictureBytes = picture.getData().GetBytes();

                        Customer.CustomerName = doc.getFirstName1() + " " + doc.getSurname();
                        Customer.Address      = doc.getStreet() + ", " + doc.getZipCode() + " " + doc.getMunicipality();
                        Customer.Picture      = pictureBytes;
                        Customer.Balance      = 0;

                        FirstName = doc.getFirstName1();
                        LastName  = doc.getSurname();
                        Address   = doc.getStreet();
                        City      = doc.getZipCode() + " " + doc.getMunicipality();

                        CheckIfCustomerExists();
                    }
                    else
                    {
                        MakeErrorLog("Doesn't support this version", mname, "LoadEid");
                    }
                }
                else
                {
                    MakeErrorLog("No E-ID was found", mname, "LoadEid");
                }

                BEID_ReaderSet.releaseSDK();
            }
            catch (Exception)
            {
                MakeErrorLog("Something went wrond with reading the E-ID", mname, "LoadEid");
            }
        }
Example #3
0
        private void LoadEid()
        {
            BEID_ReaderSet.initSDK();

            try
            {
                BEID_ReaderSet     readerSet = BEID_ReaderSet.instance();
                BEID_ReaderContext reader    = readerSet.getReader();

                if (reader.isCardPresent())
                {
                    if (reader.getCardType() == BEID_CardType.BEID_CARDTYPE_EID)
                    {
                        BEID_EIDCard card = reader.getEIDCard();
                        BEID_EId     doc  = card.getID();

                        Customer = new Customers();
                        Customer.CustomerName = doc.getFirstName1() + " " + doc.getSurname();

                        GetCustomer();
                    }
                    else
                    {
                        MakeErrorLog("doesn't support this version of E-ID ", mname, "LoadEid");
                    }
                }
                else
                {
                    MakeErrorLog("Couldn't find an E-ID", mname, "LoadEid");
                }

                BEID_ReaderSet.releaseSDK();
            }
            catch (Exception)
            {
                MakeErrorLog("There is something wrong with reading the card", mname, "LoadEid");
            }
        }