Пример #1
0
        public BallyCOccupyResponse Occupy()
        {
            BallyCOccupyResponse res = new BallyCOccupyResponse();

            try
            {
                LogManager.WriteLog(DispenserType + "Occupy Device " + UserInformation.Device + " Start", LogManager.enumLogLevel.Info);
                BallyCOccupyRequest req = new BallyCOccupyRequest();

                req.Id         = UserInformation.ID;
                req.SeqNo      = UserInformation.SequenceNumber;
                req.SessionID  = UserInformation.SessionID;
                req.DeviceName = UserInformation.Device;
                res            = _Client.Occupy(req);
                doProcOccupyResponse(res);
                LogManager.WriteLog(DispenserType + "Occupy Device " + UserInformation.Device + " End", LogManager.enumLogLevel.Info);
            }
            catch (Exception x)
            {
                res.Result = _SYS_CODE.SYS_ERROR_COMMUNICATION;
                HeartbeatStop();
                LogManager.WriteLog(DispenserType + "Occupy :" + x.ToString(), LogManager.enumLogLevel.Error);
            }

            return(res);
        }
        _SYS_CODE doOccupy()
        {
            BallyCOccupyResponse res = GloryDeviceHelper.Instance.Occupy();

            if (res != null)
            {
                LogManager.WriteLog(DispenserType + "Occupy result:" + res.Result, LogManager.enumLogLevel.Info);
                return(res.Result);
            }

            return(_SYS_CODE.SYS_ERROR_COMMUNICATION);
        }
 private void doProcOccupyResponse(BallyCOccupyResponse res)
 {
     _IsOccupied = (res.Result == _SYS_CODE.SYS_SUCCESS);
 }
        public BallyCOccupyResponse Occupy()
        {
            BallyCOccupyResponse res = new BallyCOccupyResponse();
            try
            {

                LogManager.WriteLog(DispenserType + "Occupy Device " + UserInformation.Device + " Start", LogManager.enumLogLevel.Info);
                BallyCOccupyRequest req = new BallyCOccupyRequest();

                req.Id = UserInformation.ID;
                req.SeqNo = UserInformation.SequenceNumber;
                req.SessionID = UserInformation.SessionID;
                req.DeviceName = UserInformation.Device;
                res = _Client.Occupy(req);
                doProcOccupyResponse(res);
                LogManager.WriteLog(DispenserType + "Occupy Device " + UserInformation.Device + " End", LogManager.enumLogLevel.Info);

            }
            catch (Exception x)
            {
                res.Result = _SYS_CODE.SYS_ERROR_COMMUNICATION;
                HeartbeatStop();
                LogManager.WriteLog(DispenserType + "Occupy :" + x.ToString(), LogManager.enumLogLevel.Error);
            }

            return res;
        }
Пример #5
0
 private void doProcOccupyResponse(BallyCOccupyResponse res)
 {
     _IsOccupied = (res.Result == _SYS_CODE.SYS_SUCCESS);
 }