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; }