Exemplo n.º 1
0
        void BindDataToScreen()
        {
            try
            {
                String ID      = CRID.getNIDNumber();
                String Data    = CRID.getNIDData();
                String version = CRID.getSoftwareInfoRD();

                string[] fields = Data.Split('#');


                RID = fields[(int)NID_FIELD.NID_CODE];
                CID = RID;

                loadcr._cIDCard = RID;
                loadcr._cTime   = lblDate.Text.Replace("วันที่ : ", "");
                loadcr.loaddsRound();
                loadcr._cIDCard = null;
                loadcr._cTime   = null;
                loaddata();
                if (loadcr._rmess == true)
                {
                    MessageBox.Show("รอบวิ่งของคุณ " + loadcr.rName + " วันที่ " + loadcr.rTime + " ได้เพิ่มขึ้นเป็น " + loadcr.rRound + " รอบ", "ข้อความ");
                    //loadcr._rmess = false;
                }
                //return;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "พบข้อผิดพลาด");
            }
        }
Exemplo n.º 2
0
        void BindDataToScreen()
        {
            try
            {
                String ID      = CRID.getNIDNumber();
                String Data    = CRID.getNIDData();
                String version = CRID.getSoftwareInfoRD();

                string[] fields = Data.Split('#');

                mkIDCard.Text  = fields[(int)NID_FIELD.NID_CODE];
                txtMName.Text  = fields[(int)NID_FIELD.NAME_T];
                txtMLName.Text = fields[(int)NID_FIELD.SURNAME_T];
                dtpM.Text      = _yyyymmdd_(fields[(int)NID_FIELD.BRITH_DATE]);

                txtMAdd.Text = fields[(int)NID_FIELD.HOME_NO] + "" +
                               fields[(int)NID_FIELD.MOO] + " " +
                               fields[(int)NID_FIELD.SOI] + " " +
                               fields[(int)NID_FIELD.ROAD] + " " +
                               fields[(int)NID_FIELD.SUBDIRECT] + " " +
                               fields[(int)NID_FIELD.DIRECT] + " " +
                               fields[(int)NID_FIELD.AMPHAM] + " " +
                               fields[(int)NID_FIELD.PROVICE] + " "
                ;
                cbbMSex.Text = sex_(fields[(int)NID_FIELD.SEX]);

                //return;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "พบข้อผิดพลาด");
            }
            //CRID.disconnectCard();
            //RDNID.CloseNIDLib();
        }