public GameCapResult ValidateGameCapDetails(int InstallationNo)
        {
            GameCapResult rsltGameCapResult = null;
            ISingleResult <rsp_ValidateGameCapInformationResult> result = null;

            try
            {
                result = _DAGameCapping.ValidateGameCapInformation(InstallationNo, String.Empty, true);

                rsltGameCapResult = (from o in result
                                     select new GameCapResult()
                {
                    Message = o.Message,
                    ReserveGameAsset = o.ReserveGameAsset,
                    MaxCapNotExceeded = o.MaxCapNotExceeded,
                    SelfReserve = o.SelfReserve,
                    AllowReserve = o.AllowReserve,
                    TimeOption = o.TimeOption,
                    AutoRelease = o.AutoRelease,
                    ExpireMinstoAlert = o.ExpireMinstoAlert
                }).First();
            }
            catch (Exception Ex)
            {
                ExceptionManager.Publish(Ex);
            }

            return(rsltGameCapResult);
        }
        public GameCapResult UpdateGameCapDetails(int GameCappingID, string UserName)
        {
            GameCapResult rsltGameCapResult = null;
            ISingleResult <usp_UpdateGameCapDetailsResult> result = null;

            try
            {
                result = _DAGameCapping.UpdateGameCapDetails(0, GameCappingID, "", UserName);

                rsltGameCapResult = (from o in result
                                     select new GameCapResult()
                {
                    Message = o.Message,
                    ReserveGameAsset = o.ReserveGameAsset,
                    MaxCapNotExceeded = o.MaxCapNotExceeded,
                    SelfReserve = o.SelfReserve,
                    AllowReserve = o.AllowReserve,
                    TimeOption = o.TimeOption,
                    AutoRelease = o.AutoRelease,
                    ExpireMinstoAlert = o.ExpireMinstoAlert
                }).First();
            }
            catch (Exception Ex)
            {
                ExceptionManager.Publish(Ex);
            }

            return(rsltGameCapResult);
        }
        public void ProcessResponse(EnableMachineThreadDataResponse threadData)
        {
            if (_requestCollection.Count <= 0)
            {
                return;
            }

            lock (_lockRes)
            {
                if (_requestCollection.ContainsKey(threadData.MessageID))
                {
                    EnableMachineThreadData Requestitem = _requestCollection[threadData.MessageID];

                    if (threadData.Ack)
                    {
                        LogManager.WriteLog("ProcessResponse_EnableMachine  |   ACK Updated for Installation No " + Requestitem.InstallationNo.ToString()
                                            , LogManager.enumLogLevel.Info);

                        GameCapResult oGameCapResult = oGameCappingBiz.UpdateGameCapDetails(Requestitem.GameCapID, SecurityHelper.CurrentUser.UserName);
                        LogManager.WriteLog("Game capping session closed Status [Installation No : " + Requestitem.InstallationNo.ToString() + "] : " + oGameCapResult.Message, LogManager.enumLogLevel.Info);
                    }
                    else
                    {
                        LogManager.WriteLog("ProcessResponse_EnableMachine  |   NACK received for Installation No " + Requestitem.InstallationNo.ToString()
                                            , LogManager.enumLogLevel.Info);
                    }

                    _requestCollection.Remove(threadData.MessageID);
                }
            }
        }
Exemple #4
0
        public GameCapResult ValidateGameCapDetails(int InstallationNo)
        {
            GameCapResult rsltGameCapResult = null;

            try
            {
                rsltGameCapResult = _GameCappingBiz.ValidateGameCapDetails(InstallationNo);
            }
            catch (Exception Ex)
            {
                ExceptionManager.Publish(Ex);
            }

            return(rsltGameCapResult);
        }
Exemple #5
0
        public GameCapResult UpdateGameCapDetails(int GameCappingID, string UserName)
        {
            GameCapResult rsltGameCapResult = null;

            try
            {
                rsltGameCapResult = _GameCappingBiz.UpdateGameCapDetails(GameCappingID, UserName);
            }
            catch (Exception Ex)
            {
                ExceptionManager.Publish(Ex);
            }

            return(rsltGameCapResult);
        }
Exemple #6
0
        /*private void ReleaseAllGameCap()
         * {
         *  try
         *  {
         *      _RleaseGameCap.PauseRelease.Reset();
         *
         *      iProcCount = _lstGameCapDetails.Where(item => item.IsEnabled == true).Count();
         *
         *      _RleaseGameCap.GameCapRelease = _lstGameCapDetails.Where(item => item.IsEnabled == true).ToList();
         *
         *      _RleaseGameCap.PauseRelease.Set();
         *
         *      //while (iProcCount != _RleaseGameCap.GameCapRelease.Where(item => item.Status == "SEND").Count()) ;
         *
         *      Application.Current.Dispatcher.Invoke(new Action(() =>
         *      {
         *          btnRefresh.Visibility = Visibility.Visible;
         *          pgStatus.Visibility = Visibility.Hidden;
         *      }));
         *
         *  }
         *  catch (Exception Ex)
         *  {
         *      ExceptionManager.Publish(Ex);
         *
         *  }
         * }*/

        /// <summary>
        ///
        /// </summary>
        /// <param name="oGCD"></param>
        private void ReleaseGameCap(object oGCD)
        {
            GameCapDetails GCD = oGCD as GameCapDetails;

            try
            {
                GameCapResult oGameCapResult = _oGameCapping.ValidateGameCapDetails(GCD.InstallationNo);

                if (oGameCapResult != null)
                {
                    if (oGameCapResult.Message == "Success")
                    {
                        //EnableMachine _EnableMachine = new EnableMachine(GCD);
                        _RleaseGameCap.PauseRelease.Reset();
                        _RleaseGameCap.GameCapRelease.Add(GCD);
                        _RleaseGameCap.PauseRelease.Set();
                    }
                }
            }
            catch (Exception Ex)
            {
                ExceptionManager.Publish(Ex);
                GCD.Status    = "Failed";
                GCD.IsEnabled = true;
            }
            finally
            {
                if (--iProcCount == 0)
                {
                    Application.Current.Dispatcher.Invoke(new Action(() =>
                    {
                        btnRefresh.Visibility = Visibility.Visible;
                        pgStatus.Visibility   = Visibility.Hidden;
                    }));
                }
            }
        }