示例#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);
        }
        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;
        }