My blog has moved!

You should be automatically redirected in 6 seconds. If not, visit
http://perevoznyk.wordpress.com
and update your bookmarks.

Thursday, October 22, 2009

Read SIS card from .NET application




Here is a simple smaple of reading SIS card data using EIDNative library from .NET application.

using System;
using System.Collections.Generic;
using System.Text;
using EIDNative;

namespace SISCardReader
{
    class Program
    {
        static void Main(string[] args)
        {
            EIDCard eidCard = new EIDCard();

            eidCard.InitReader(false);

            if (eidCard.ReadSisId())
            {
                Console.WriteLine("name: " +  eidCard.SISIdentity.Name);
                Console.WriteLine("first name: " +  eidCard.SISIdentity.FirstName);
                Console.WriteLine("initial: " +  eidCard.SISIdentity.Initial);
                Console.WriteLine("sex: " +  eidCard.SISIdentity.Sex);
                Console.WriteLine("birthdate " +  eidCard.SISIdentity.BirthDate);
                Console.WriteLine("social security number: " +  eidCard.SISIdentity.SocialSecurityNumber);
                Console.WriteLine("capture: " +  eidCard.SISIdentity.CaptureDate);
                Console.WriteLine("begin: " +  eidCard.SISIdentity.ValidityDateBegin);
                Console.WriteLine("end: " +  eidCard.SISIdentity.ValidityDateEnd);
                Console.WriteLine("card number: " +  eidCard.SISIdentity.CardNumber);
                Console.WriteLine("card name: " +  eidCard.SISIdentity.CardName);
            }

            eidCard.DoneReader();
            eidCard.Dispose();
        }
    }
}