/// <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); }
/// <summary> /// Get Login Information for the player /// </summary> /// /// <returns>Login information for the player</returns> /// public LoginInfoDTO GetLoginInformation() { Dictionary <string, string> CMPDetails = playerInformationDataAccess.GetCMPCredentials(CommonDataAccess.ExchangeConnectionString); loginInfo = new LoginInfo(); loginInfo.ComputerName = Environment.MachineName; loginInfo.GamingDate = new DateTime(2001, 01, 01, 0, 0, 0); loginInfo.LocationCode = null; loginInfo.Password = CMPDetails["CMPPWD"]; loginInfo.Shift = 1; loginInfo.UserName = CMPDetails["CMPUSER"]; if (CMPDetails.Count > 0) { kioskService = new KioskService(CMPDetails["CMPURL"].ToString()); } serviceResult = kioskService.EmployeeLogin(loginInfo); if (MethodResult.Success == serviceResult.Result) { loginInfo.LocationCode = serviceResult.Data[0].ToString(); DateTime gamingdate = DateTime.Today; if (true == DateTime.TryParse(serviceResult.Data[1].ToString(), out gamingdate)) { loginInfo.GamingDate = gamingdate; } else { loginInfo.GamingDate = DateTime.Today; } loginInfo.Shift = int.Parse(serviceResult.Data[2].ToString()); } List <LoginInfoDTO> LoginInfoList = new List <LoginInfoDTO>(); LoginInfoDTO loginInfoDTO = new LoginInfoDTO(); loginInfoDTO.ComputerName = loginInfo.ComputerName; loginInfoDTO.GamingDate = loginInfo.GamingDate; loginInfoDTO.LocationCode = loginInfo.LocationCode; loginInfoDTO.Password = loginInfo.Password; loginInfoDTO.Shift = loginInfo.Shift; loginInfoDTO.UserName = loginInfo.UserName; return(loginInfoDTO); }
/// <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); }