Example #1
0
        public static void LklWtSign()
        {
            PasswordBLL pwdBLL = new PasswordBLL();
            bool        ret    = pwdBLL.OpenDevice(SysConfigHelper.readerNode("ZT598Port"), "9600");

            if (ret)
            {
                if (!SysBLL.WantongSign())
                {
                    SysBLL.wangtonSignResult = false;
                    log.Write("警告:万通签到失败");
                }
                else
                {
                    SysBLL.wangtonSignResult = true;
                    log.Write("万通签到成功");
                }
                if (!SysBLL.LakalaSign())
                {
                    SysBLL.lakalaSignResult = false;
                    log.Write("警告:拉卡拉签到失败");
                }
                else
                {
                    SysBLL.lakalaSignResult = true;
                    log.Write("拉卡拉签到成功");
                }
            }
            else
            {
                log.Write("警告:键盘打开失败");
            }
        }
Example #2
0
        public static string MonitorCom()
        {
            //终端号
            string ClientNo = SysConfigHelper.readerNode("ClientNo");

            string strCom = "";
            //电动读卡器
            string        port   = SysConfigHelper.readerNode("CRT310Port");
            StringBuilder info   = new StringBuilder(2048);
            int           handle = CRT310.CommOpen("COM" + port);

            if (handle > 0)
            {
                strCom = strCom + "1";
            }
            else
            {
                strCom = strCom + "0";
            }
            CRT310.CommClose(handle);
            //燃气
            port         = SysConfigHelper.readerNode("CJ201");
            CJ201.handle = CJ201.Open_Com(Int32.Parse(port), 9600, 8, 0, 0);
            if (CJ201.handle > 0)
            {
                strCom = strCom + "1";
            }
            else
            {
                strCom = strCom + "0";
            }
            CJ201.Close_Com(CJ201.handle);
            ////公交读卡器
            //port = SysConfigHelper.readerNode("CRT603Port");
            //int openRet = CRT603.CRT603Vx_OpenConnection(Int32.Parse(port), 19200);
            //if (openRet == 0) strCom = strCom + "1";
            //else strCom = strCom + "0";
            //CRT603.CRT603Vx_CloseConnection();
            //打印机
            handle = Print.TT_OpenDevice(new StringBuilder("COM" + SysConfigHelper.readerNode("PrintPort")), new StringBuilder("38400"), info);
            if (handle == 0)
            {
                strCom = strCom + "1";
            }
            else
            {
                strCom = strCom + "0";
            }
            Print.TT_CloseDevice(info);
            //密码键盘
            PasswordBLL pwdBLL = new PasswordBLL();
            bool        ret    = pwdBLL.OpenDevice(SysConfigHelper.readerNode("ZT598Port"), "9600");

            if (ret)
            {
                strCom = strCom + "1";
            }
            else
            {
                strCom = strCom + "0";
            }

            return(strCom);
        }