protected void Timer1_Tick(object sender, EventArgs e)
        {
            try
            {
                GameMenuDetails aaa = new GameMenuDetails();
                DataTable       dt1 = new DataTable();
                dt1 = aaa.GetPlayRound(Session["UserID"].ToString());

                //if (dt1.Rows[0][0].ToString() == "1")
                //{
                //    bool IsSuccess = aaa.ExecutePCPlayer();

                //}


                NavCountDown.InnerText = "Time Left (Round)- " + (Convert.ToInt32(Session["CountID"]) - 1).ToString() + "s";
                Session["CountID"]     = Convert.ToInt32(Session["CountID"]) - 1;
                if (Convert.ToInt32(Session["CountID"]) == 0)
                {
                    Session["CountID"] = 10;
                    GameMenuDetails gm      = new GameMenuDetails();
                    bool            Ststus1 = gm.UpdatePLayerRound(Session["UserID"].ToString());
                    PlayRoundCheck();

                    if (NavUserChance.InnerText == "Round -11")
                    {
                        //bool Ststus3 = gm.TempCurrentPlayers(Session["UserID"].ToString());
                        Response.Redirect("ScoreBoard.aspx");
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }
Exemple #2
0
        protected void Timer1_Tick(object sender, EventArgs e)
        {
            NavCountDown.InnerText = "Time Left (Round)- " + (Convert.ToInt32(Session["CountID"]) - 1).ToString() + "s";
            Session["CountID"]     = Convert.ToInt32(Session["CountID"]) - 1;
            if (Convert.ToInt32(Session["CountID"]) == 0)
            {
                Session["CountID"] = 30;
                GameMenuDetails gm      = new GameMenuDetails();
                bool            Ststus1 = gm.UpdatePLayerRound(Session["UserID"].ToString());
                PlayRoundCheck();

                if (NavUserChance.InnerText == "Round -11")
                {
                    //bool Ststus3 = gm.TempCurrentPlayers(Session["UserID"].ToString());
                    Response.Redirect("ScoreBoard.aspx");
                }
            }
        }