private void f_update_hedgeem_control_buttons_with_info_from_server()
    {
        log.Debug("f_update_hedgeem_control_buttons_with_info_from_server called");
        // Determine the new state of the game and display the appropriate buttons
        try
        {
            switch (_game_state)
            {
                case enum_game_state.STATUS_START:
                    //btnDealHole.Visible = true;
                    //btnDealFlop.Visible = false;
                    //btnDealTurn.Visible = false;
                    //btnDealRiver.Visible = false;
                    //btnNextGame.Visible = false;
                    f_clear_players_bets_lablels();
                    break;

                case enum_game_state.STATUS_HOLE:
                    //btnDealHole.Visible = false;
                    //btnDealFlop.Visible = true;
                    //btnDealTurn.Visible = false;
                    //btnDealRiver.Visible = false;
                    //btnNextGame.Visible = false;
                    break;

                case enum_game_state.STATUS_FLOP:
                    //btnDealHole.Visible = false;
                    //btnDealFlop.Visible = false;
                    //btnDealTurn.Visible = true;
                    //btnDealRiver.Visible = false;
                    //btnNextGame.Visible = false;
                    break;

                case enum_game_state.STATUS_TURN:
                    //btnDealHole.Visible = false;
                    //btnDealFlop.Visible = false;
                    //btnDealTurn.Visible = false;
                    //btnDealRiver.Visible = true;
                    //btnNextGame.Visible = false;
                    break;

                case enum_game_state.STATUS_RIVER:
                    //btnDealHole.Visible = false;
                    //btnDealFlop.Visible = false;
                    //btnDealTurn.Visible = false;
                    //btnDealRiver.Visible = false;
                    //btnNextGame.Visible = true;
                    hedgeem_control_winner_message my_winner_message = new hedgeem_control_winner_message();
                    my_winner_message.p_winner_message_str = f_calculate_winnings();
                    if (my_winner_message.p_winner_message_str != "")
                    {
                        Place_Holder_Winner_Message.Controls.Add(my_winner_message);
                    }
                    break;

                default:
                    //btnDealHole.Visible = false;
                    //btnDealFlop.Visible = false;
                    //btnDealTurn.Visible = false;
                    //btnDealRiver.Visible = false;
                    //btnNextGame.Visible = true;
                    break;
            }



        }
        catch (Exception ex)
        {
            string my_error_popup = "alert('Error in f_update_hedgeem_control_buttons_with_info_from_server" + ex.Message.ToString() + "');";
            ClientScript.RegisterClientScriptBlock(this.GetType(), "Alert", my_error_popup, true);
            HedgeEmLogEvent my_log = new HedgeEmLogEvent();
            my_log.p_message = "Exception caught in f_update_hedgeem_control_buttons_with_info_from_server function " + ex.Message;
            my_log.p_method_name = "f_update_hedgeem_control_buttons_with_info_from_server";
            my_log.p_player_id = f_get_player_id();
            my_log.p_game_id = game_id;
            my_log.p_table_id = _table_id;
            log.Error(my_log.ToString());
        }

    }
    private void f_update_hedgeem_control_buttons_with_info_from_server()
    {
        // Create a 'log event' object to audit execution
        HedgeEmLogEvent my_log_event = new HedgeEmLogEvent();
        my_log_event.p_method_name = System.Reflection.MethodBase.GetCurrentMethod().ToString();
        my_log_event.p_message = "Method Entered.";
        my_log_event.p_player_id = p_session_player_id;
        my_log_event.p_table_id = p_session_personal_table_id;
        log.Debug(my_log_event.ToString());

        // Determine the new state of the game and display the appropriate buttons
        try
        {
                switch (_game_state)
                {
                    case enum_game_state.STATUS_START:
                        btnDealHole.Visible = true;
                        btnDealFlop.Visible = false;
                        btnDealTurn.Visible = false;
                        btnDealRiver.Visible = false;
                        btnNextGame.Visible = false;
                        f_clear_players_bets_lablels();
                        break;

                    case enum_game_state.STATUS_HOLE:
                        btnDealHole.Visible = false;
                        btnDealFlop.Visible = true;
                        btnDealTurn.Visible = false;
                        btnDealRiver.Visible = false;
                        btnNextGame.Visible = false;
                        break;

                    case enum_game_state.STATUS_FLOP:
                        btnDealHole.Visible = false;
                        btnDealFlop.Visible = false;
                        btnDealTurn.Visible = true;
                        btnDealRiver.Visible = false;
                        btnNextGame.Visible = false;
                        break;

                    case enum_game_state.STATUS_TURN:
                        btnDealHole.Visible = false;
                        btnDealFlop.Visible = false;
                        btnDealTurn.Visible = false;
                        btnDealRiver.Visible = true;
                        btnNextGame.Visible = false;
                        break;

                    case enum_game_state.STATUS_RIVER:
                        btnDealHole.Visible = false;
                        btnDealFlop.Visible = false;
                        btnDealTurn.Visible = false;
                        btnDealRiver.Visible = false;
                        btnNextGame.Visible = true;
                        hedgeem_control_winner_message my_winner_message = new hedgeem_control_winner_message();
                        my_winner_message.p_winner_message_str = f_calculate_winnings();
                        if (my_winner_message.p_winner_message_str != "")
                        {
                            Place_Holder_Winner_Message.Controls.Add(my_winner_message);
                        }
                        break;

                    default:
                        btnDealHole.Visible = false;
                        btnDealFlop.Visible = false;
                        btnDealTurn.Visible = false;
                        btnDealRiver.Visible = false;
                        btnNextGame.Visible = true;
                        break;
                }

            

        }
        catch (Exception ex)
        {
            string my_error_popup = "Error in f_update_hedgeem_control_buttons_with_info_from_server" + ex.Message.ToString();
            //ClientScript.RegisterClientScriptBlock(this.GetType(), "Alert", my_error_popup, true);
            my_log_event.p_message = "Exception caught in f_update_hedgeem_control_buttons_with_info_from_server function " + ex.Message;
            my_log_event.p_method_name = "f_update_hedgeem_control_buttons_with_info_from_server";
            my_log_event.p_player_id = Convert.ToInt32(Session["p_session_player_id"]);
            my_log_event.p_game_id = game_id;
            my_log_event.p_table_id = p_session_personal_table_id;
            log.Error(my_log_event.ToString());
            HedgeemerrorPopup my_popup_message = new HedgeemerrorPopup();
            my_popup_message.p_detailed_message_str = "";
            my_popup_message.p_is_visible = false;

            //ClientScript.RegisterClientScriptBlock(this.GetType(), "Alert", my_error_popup, true);
            my_popup_message.p_detailed_message_str = my_error_popup;
            my_popup_message.p_is_visible = true;
            Place_Holder_Popup_Message.Controls.Add(my_popup_message);
        }

    }