Exemplo n.º 1
0
        /// <summary>
        /// 读取卡数据
        /// </summary>
        /// <param name="CardNo"></param>
        /// <returns></returns>
        public bool ReadMagCardNo(ref string CardNo)
        {
            MagcardData data = new MagcardData();

            if (Config.HospCode.Equals(HospCode.NcDaXueDIErFuShuYiYuan))
            {
                data.GetTrack1 = true;
            }
            else
            {
                data.GetTrack2 = true;
            }


            if (m_ReadCard.ReadMagcardData(data))
            {
                if (Config.HospCode.Equals(HospCode.NcDaXueDIErFuShuYiYuan))
                {
                    CardNo = data.Track1Data;
                }
                else
                {
                    CardNo = data.Track2Data;
                }

                return(true);
            }
            return(false);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 读取卡数据
        /// </summary>
        /// <param name="CardNo"></param>
        /// <returns></returns>
        public bool ReadMagCardNo(ref string CardNo, int readTrack)
        {
            MagcardData data = new MagcardData();

            if (readTrack == 1)
            {
                data.GetTrack1 = true;
            }
            else if (readTrack == 2)
            {
                data.GetTrack2 = true;
            }
            else if (readTrack == 3)
            {
                data.GetTrack3 = true;
            }
            else
            {
                data.GetTrack2 = true;
            }


            if (m_ReadCard.ReadMagcardData(data))
            {
                if (readTrack == 1)
                {
                    CardNo = data.Track1Data;
                }
                else if (readTrack == 2)
                {
                    CardNo = data.Track2Data;
                }
                else if (readTrack == 3)
                {
                    CardNo = data.Track3Data;
                }
                else
                {
                    CardNo = data.Track2Data;
                }
                //if (Config.HospCode.Equals(HospCode.NcDaXueDIErFuShuYiYuan))
                //{
                //    CardNo = data.Track1Data;
                //}
                //else
                //{
                //    CardNo = data.Track2Data;
                //}

                return(true);
            }
            return(false);
        }