public void LoadGame(int mgid, int difficulty) { var mg = MGOnlineBook.FetchObjectByParent(mgid); OBID.Text = mg.OBID.ToString(); CurrPage.Text = "1"; Difficulty.Text = difficulty.ToString(); LoadPage(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { SetPageRibbon(StandardModuleRibbons.SetupRibbon()); if (Request["MGID"] != null) { lblMGID.Text = Request["MGID"]; var o = Minigame.FetchObject(int.Parse(lblMGID.Text)); AdminName.Text = o.AdminName; var o2 = MGOnlineBook.FetchObjectByParent(int.Parse(lblMGID.Text)); lblOBID.Text = o2.OBID.ToString(); } else { Response.Redirect("MiniGameList.aspx"); } } //MasterPage.RequiredPermission = PERMISSIONID; MasterPage.IsSecure = true; MasterPage.PageTitle = string.Format("{0}", "Online Book Pages"); _mStrSortExp = String.Empty; if (!IsPostBack) { _mStrSortExp = String.Empty; } else { if (null != ViewState["_SortExp_"]) { _mStrSortExp = ViewState["_SortExp_"] as String; } if (null != ViewState["_Direction_"]) { _mSortDirection = (SortDirection)ViewState["_Direction_"]; } } }
public void LoadGame(int mgid, int difficulty) { var mg = MGOnlineBook.FetchObjectByParent(mgid); OBID.Text = mg.OBID.ToString(); CurrPage.Text = "1"; Difficulty.Text = difficulty.ToString(); if (difficulty == 2) { lblMedium.Visible = pnlAudioMedium.Visible = true; lblEasy.Visible = lblHard.Visible = pnlAudioEasy.Visible = pnlAudioHard.Visible = false; } if (difficulty == 3) { pnlAudioHard.Visible = lblHard.Visible = true; lblEasy.Visible = lblMedium.Visible = pnlAudioEasy.Visible = pnlAudioMedium.Visible = false; } LoadPage(); }