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