Beispiel #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);
        }
Beispiel #2
0
        /// <summary>
        /// Get the player Information
        /// </summary>
        /// <param name="strConnect"></param>
        /// <returns>dictionary</returns>
        public Dictionary <string, string> GetPlayerInfo(string AccountNumber)
        {
            Dictionary <string, string> dicPlayerInfo = new Dictionary <string, string>();

            try
            {
                PlayerInfoDTO playerInfo = GetPlayerInfoDTO(AccountNumber);
                if (AccountNumber != null)
                {
                    dicPlayerInfo.Add("AccountNumber", AccountNumber);
                    dicPlayerInfo.Add("ClubState", playerInfo.ClubState);
                    dicPlayerInfo.Add("ClubStatus", playerInfo.ClubStatus);
                    dicPlayerInfo.Add("DisplayName", playerInfo.DisplayName);
                    dicPlayerInfo.Add("FirstName", playerInfo.FirstName);
                    dicPlayerInfo.Add("LastName", playerInfo.LastName);
                    dicPlayerInfo.Add("PlayerId", playerInfo.PlayerID.ToString());
                    dicPlayerInfo.Add("PointsBalance", playerInfo.PointsBalance.ToString());
                }

                return(dicPlayerInfo);
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
                return(null);
            }
        }
Beispiel #3
0
 /// <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));
 }
    /// <summary>
    /// 获取角色信息
    /// </summary>
    private void RequestPlayerInfo()
    {
        SocketModel model = new SocketModel();
        model.protocol = SocketProtocol.PLAYERINFO;
        PlayerInfoDTO data = new PlayerInfoDTO(Global.Instance.UUID);
        model.message = JsonCoding<PlayerInfoDTO>.encode(data);

        cardClient.SendMsg(JsonCoding<SocketModel>.encode(model));
    }
Beispiel #5
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);
        }
        private void btnRedeem_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                this.Cursor = Cursors.Wait;
                if (Settings.IsKioskRequired)
                {
                    if (lblUnitPointValue.Content.ToString().Length > 0 && int.Parse(lblUnitPointValue.Content.ToString()) > 0 && txtPrizeQty.Text.Length > 0 && int.Parse(txtPrizeQty.Text) > 0)
                    {
                        LoginInfoDTO       objLoginInfo        = playerInformationBusinessObject.GetLoginInformation();
                        PlayerInfoDTO      objPlayerInfo       = playerInformationBusinessObject.GetPlayerInformation(txtAcctNo.Text);
                        IPlayerInformation objCashDeskOperator = PlayerInformationBusinessObject.CreateInstance();
                        if (objCashDeskOperator.UpdateRedeempoints(txtAcctNo.Text, listReedeem.PrizeId, int.Parse(txtPrizeQty.Text),
                                                                   int.Parse(listReedeem.RedeemPoints), objLoginInfo, objPlayerInfo) == true)
                        {
                            if (objCashDeskOperator.CheckEnableRedeemPrintCDO() == true)
                            {
                                EpsonReceiptPrint();
                            }
                            MessageBox.ShowBox("MessageID90", BMC_Icon.Information);

                            AuditViewerBusiness.InsertAuditData(new Audit.Transport.Audit_History
                            {
                                AuditModuleName    = ModuleName.PlayerClub,
                                Audit_Screen_Name  = "PlayerClub",
                                Audit_Desc         = "Player club points redeemed",
                                AuditOperationType = OperationType.ADD,
                                Audit_Field        = "Reedeem Points",
                                Audit_New_Vl       = listReedeem.RedeemPoints
                            });

                            LoadPlayerInfo();
                            lblUnitPointValue.Content = listReedeem.RedeemPoints;
                            lblCashValue.Content      = listReedeem.AuthAward;
                            txtPrizeQty.Text          = "1";
                        }
                        else
                        {
                            MessageBox.ShowBox("MessageID91", BMC_Icon.Information);

                            AuditViewerBusiness.InsertAuditData(new Audit.Transport.Audit_History
                            {
                                AuditModuleName    = ModuleName.PlayerClub,
                                Audit_Screen_Name  = "PlayerClub",
                                Audit_Desc         = "Unable to redeem points",
                                AuditOperationType = OperationType.ADD,
                            });
                        }
                    }
                    else if (txtAcctNo.Text == "0" || txtAcctNo.Text == "")
                    {
                        MessageBox.ShowBox("MessageID92", BMC_Icon.Information);
                    }
                    else if (txtPrizeQty.Text.Length <= 0)
                    {
                        MessageBox.ShowBox("MessageID93", BMC_Icon.Information);
                        txtPrizeQty.Text = "1";
                    }
                    else if (int.Parse(txtPrizeQty.Text) <= 0)
                    {
                        MessageBox.ShowBox("MessageID93", BMC_Icon.Information);
                        txtPrizeQty.Text = "1";
                    }
                    else if (txtAcctNo.Text != "")
                    {
                        LoadPlayerInfo();
                    }
                }

                else
                {
                    MessageBox.ShowBox("MessageID376", BMC_Icon.Information);
                    return;
                }
            }
            catch (Exception ex)
            {
                MessageBox.ShowBox("MessageID94", BMC_Icon.Information);
                txtPrizeQty.Text = "1";
                ExceptionManager.Publish(ex);
            }
            finally
            {
                this.Cursor = Cursors.Arrow;
            }
        }