protected void Page_Load(object sender, EventArgs e)
        {
            //int id = Request.QueryString[Game_ID]
            SC = new Game_ServiceClient();
            Game cls_game = new Game();

            cls_game = SC.GetOneGame(6);

            title.InnerText  = cls_game.Game_Title;
            type.InnerHtml   = cls_game.Game_Type;
            descrp.InnerHtml = cls_game.Game_Descrp;
            price.InnerHtml  = "R" + cls_game.Game_price.ToString();
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["EditGame"] == null)
                {
                    Response.Redirect("AdminPage.aspx");
                    return;
                }
                else
                {
                    gameID = Session["EditGame"].ToString();
                    gameID = gameID.Remove(0, 4);

                    Game clsGame = SC.GetOneGame(Int32.Parse(gameID));

                    Description.Value    = clsGame.Game_Descrp;
                    Type.Value           = clsGame.Game_Type;
                    game_title.Value     = clsGame.Game_Title;
                    Rating.Value         = clsGame.Game_Rating.ToString();
                    Price.Value          = clsGame.Game_price.ToString();
                    Quantity.Value       = clsGame.Game_Quantity.ToString();
                    Trailer_Source.Value = clsGame.Game_Trailer.ToString();
                    Game_Image.Value     = clsGame.Game_Image;
                    Discount.Value       = clsGame.Discount_Percentage.ToString();
                    comments.Value       = clsGame.Game_Num_Comments.ToString();

                    if (clsGame.Game_Status == 0)
                    {
                        rbtnStatusList.SelectedIndex = 1;
                    }
                    rbtnStatusList.SelectedIndex = 0;

                    if (clsGame.Discount_Percentage > 0)
                    {
                        rbtnSpecial.SelectedIndex = 0;
                    }
                    else
                    {
                        rbtnSpecial.SelectedIndex = 1;
                    }
                    rbtnSpecial_SelectedIndexChanged(null, null);
                }
            }
        }