示例#1
0
         /// <summary>
        /// Get the player Information
        /// </summary>
        /// <param name="strConnect"></param>
        /// <returns>dictionary</returns>
        public PlayerInfoDTO GetPlayerInfoDTO(string AccountNumber)
        {
            Dictionary<string, string> CMPDetails = playerInformationDataAccess.GetCMPCredentials(CommonDataAccess.ExchangeConnectionString);


            if (CMPDetails.Count > 0)
            {
                kioskService = new KioskService(CMPDetails["CMPURL"].ToString());
            }

            playerInfo = kioskService.RetrievePlayerInfo(AccountNumber);

            PlayerInfoDTO PlayerInfo = new PlayerInfoDTO();
            PlayerInfo.AccountNumber = playerInfo.AccountNumber;
            PlayerInfo.ClubState = playerInfo.ClubState;
            PlayerInfo.ClubStatus = playerInfo.ClubStatus;
            PlayerInfo.DisplayName = playerInfo.DisplayName;
            PlayerInfo.FirstName = playerInfo.FirstName;
            PlayerInfo.LastName = playerInfo.LastName;
            PlayerInfo.PlayerID = playerInfo.PlayerId;
            PlayerInfo.PointsBalance = playerInfo.PointsBalance;

            return PlayerInfo;
        }
示例#2
0
        /// <summary>
        /// Redeem Points for Player.
        /// </summary>
        /// <param name="AccountNumber"></param>
        /// 
        /// <returns>List of prizes available</returns>
        public bool UpdateRedeempoints(string AcctNumber, string PrizeID, int PrizeQty, int redeempoints,LoginInfoDTO loginInfo,PlayerInfoDTO playerInfo)
        {
            bool IsReedemed = false;
            try
            {
                Dictionary<string, string> CMPDetails = playerInformationDataAccess.GetCMPCredentials(CommonDataAccess.ExchangeConnectionString);

                if (CMPDetails.Count > 0)
                {
                    kioskService = new KioskService(CMPDetails["CMPURL"].ToString());
                }

                RedeemPrizeInfo redeemPrizeInfo = new RedeemPrizeInfo();
                redeemPrizeInfo.AccountNumber = AcctNumber;
                redeemPrizeInfo.ComputerName = Environment.MachineName;
                redeemPrizeInfo.GamingDate = new DateTime(2001,1,1);
                redeemPrizeInfo.LocationCode = loginInfo.LocationCode;
                redeemPrizeInfo.PrintedRemarks = null;
                redeemPrizeInfo.PrivateRemarks = null;
                redeemPrizeInfo.PlayerId = playerInfo.PlayerID;
                redeemPrizeInfo.Password = CMPDetails["CMPPWD"];
                redeemPrizeInfo.Shift = 1;

                redeemPrizeInfo.UserName = CMPDetails["CMPUSER"];

                if (!String.IsNullOrEmpty(PrizeID))
                {
                    redeemPrizeInfo.PrizeId = PrizeID;
                }
                redeemPrizeInfo.PrizeQty = PrizeQty;
                redeemPrizeInfo.RedeemPoints = redeempoints * redeemPrizeInfo.PrizeQty;

                ServiceResult objServiceResult = (ServiceResult)kioskService.RedeemPoints(redeemPrizeInfo);

                if (MethodResult.Success == objServiceResult.Result)
                    IsReedemed = true;
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
                IsReedemed = false;
            }
            return IsReedemed;
        }
 /// <summary>
 /// Update the current balance with points redeemed.
 /// </summary>
 /// <param name="PrizeID"></param>
 /// <param name="PrizeQty"></param>
 /// <param name="strAcctNumber"></param>
 /// <returns >success or failure</returns>       
 public bool UpdateRedeempoints(string AcctNumber, string PrizeID, int PrizeQty, int RedeemPoints,LoginInfoDTO loginInfo,PlayerInfoDTO playerInfo)
 {
     return kiosk.UpdateRedeempoints(AcctNumber, PrizeID, PrizeQty, RedeemPoints,loginInfo,playerInfo);
 }