示例#1
0
        /// <summary>
        /// 读取采集卡数据
        /// </summary>
        /// <param name="p_decWater"></param>
        /// <param name="p_decMachine"></param>
        public void ReadCollectCardInfo(out decimal p_decWater, out decimal p_decMachine)
        {
            p_decWater   = 0;
            p_decMachine = 0;
            string l_strData = JocatDevice.ReadCard(m_intComPort, "9", 1);

            string l_strWater   = l_strData.Substring(0, 8);
            string l_strMachine = l_strData.Substring(16, 2);

            p_decWater   = EquipmentGeneral.HexMoneyToDouble(l_strData.Substring(0, 8));
            p_decMachine = EquipmentGeneral.HexMoneyToDouble(l_strData.Substring(16, 2));
        }
示例#2
0
        /// <summary>
        /// 取得MAC地址
        /// </summary>
        /// <returns></returns>
        public override string GetMacID()
        {
            try
            {
                //string strPwd = this._strWriterPwd;

                //SetWriterPassword(string.Empty.PadLeft(12, 'F'));

                string strMacID = JocatDevice.ReadCard(m_intComPort, "0", 1);

                //SetWriterPassword(strPwd);

                return(strMacID);
            }
            catch
            {
                return(string.Empty);
            }
        }
示例#3
0
        /// <summary>
        /// 读卡资料
        /// </summary>
        /// <returns></returns>
        public override PaymentCard ReadCard()
        {
            try
            {
                byte bSection      = 0;
                var  l_objCardInfo = JocatDevice.ReadCard(m_intComPort, EquipmentGeneral.GetCardSectionPieceList()[bSection][0], this._strWriterPwd);

                //List<string> l_lisPhones = new List<string>();
                //string l_strPhoneInfo = "";

                //ReadFamilyPhones(out l_strPhoneInfo, out l_lisPhones);

                //l_objCardInfo.FamilyPhoneInfo = l_strPhoneInfo;
                //l_objCardInfo.FamilyPhoneNum = l_lisPhones;

                return(l_objCardInfo);
            }
            catch (Exception Ex)
            {
                throw Ex;
            }
        }
示例#4
0
        /// <summary>
        /// 读取亲情电话信息
        /// </summary>
        /// <param name="p_strPhineInfo"></param>
        /// <param name="p_lisPhones"></param>
        private void ReadFamilyPhones(out string p_strPhineInfo, out List <string> p_lisPhones)
        {
            p_strPhineInfo = "";
            p_lisPhones    = new List <string>();
            byte bSection = 10;
            Dictionary <byte, List <byte> > dicSection = EquipmentGeneral.GetCardSectionPieceList();

            try
            {
                string l_strPhoneInfo = JocatDevice.ReadCard(m_intComPort, dicSection[bSection][0].ToString(), 3);

                p_strPhineInfo = ((char)Convert.ToByte(l_strPhoneInfo.Substring(0, 2), 16)).ToString() + l_strPhoneInfo.Substring(2, 8);

                p_lisPhones.Add(CollapsePhoneNo(l_strPhoneInfo.Substring(32, 16).Replace("F", "")));
                p_lisPhones.Add(CollapsePhoneNo(l_strPhoneInfo.Substring(48, 16).Replace("F", "")));
                p_lisPhones.Add(CollapsePhoneNo(l_strPhoneInfo.Substring(64, 16).Replace("F", "")));
                p_lisPhones.Add(CollapsePhoneNo(l_strPhoneInfo.Substring(80, 16).Replace("F", "")));
            }
            catch
            {
                throw new Exception("读取亲情号码信息失败。");
            }
        }