Exemplo n.º 1
0
        //-1 : cannot read citizen card
        // 1 : read sucessfull
        protected int ReadCitizenCard()
        {
            String strTerminal = toolStripMenuItem1.Text;

            IntPtr obj = CRID.selectReader(strTerminal);

            Int32 nInsertCard = CRID.isCardInsert();

            if (nInsertCard != 0)
            {
                //String m;
                //m = String.Format("ไม่ได้เสียบบัตร", nInsertCard);
                //MessageBox.Show(m);

                CRID.deselectReader();
                CID = null;
                loadcr._checkdata = true;
                return(-1);
            }
            else
            {
                if (RID != CID)
                {
                    if (loadcr._checkdata == true)
                    {
                        BindDataToScreen();
                    }
                    return(0);
                }
            }
            return(0);
        }
Exemplo n.º 2
0
        //-1 : cannot read citizen card
        // 1 : read sucessfull
        protected int ReadCitizenCard()
        {
            String strTerminal = toolStripMenuItem1.Text;

            IntPtr obj = CRID.selectReader(strTerminal);

            Int32 nInsertCard = CRID.isCardInsert();

            if (nInsertCard != 0)
            {
                String m;
                m = String.Format("ไม่ได้เสียบบัตร", nInsertCard);
                MessageBox.Show(m);

                CRID.deselectReader();
                return(-1);
            }
            else
            {
                if (nInsertCard == 0)
                {
                    BindDataToScreen();
                }
            }
            //timer1.Enabled = false;
            return(0);
        }