protected void Page_Load(object sender, EventArgs e) { width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); hotro = Request.QueryString["hotro"]; id = ConvertUtility.ToInt32(Request.QueryString["id"]); if (!IsPostBack) { _info = Get_User_Agent_Info(); //Detail DataTable dtDetail = GameController.GetGameDetailByIDHasCache(Session["telco"].ToString(), id); //end detail if (dtDetail.Rows.Count > 0) { lnkCateChannel.NavigateUrl = UrlProcess.GetGameCategoryUrlNew(lang.ToString(), width, dtDetail.Rows[0]["W_GameCategoryID"].ToString(), hotro); lnkHomeChannel.NavigateUrl = UrlProcess.GetGameHomeUrlNew(lang.ToString(), width, hotro); rptDetail.DataSource = dtDetail; rptDetail.ItemDataBound += rptDetail_ItemDataBound; rptDetail.DataBind(); Price = ConfigurationSettings.AppSettings.Get("gameprice"); if (id == 1402 || id == 1401) { Price = "5000"; } if (ConfigurationSettings.AppSettings.Get("freecate").IndexOf("," + dtDetail.Rows[0]["W_GameCategoryID"] + ",") > -1) { freecate = true; } if (freecate == true) { Price = "0"; } if (lang == 1) { lnkCateChannel.Text = dtDetail.Rows[0]["Title_Unicode"].ToString().ToUpper(); } else { lnkCateChannel.Text = dtDetail.Rows[0]["Title"].ToString().ToUpper(); } int totaltopdownload = 0; DataTable dtltopdownload = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), ConvertUtility.ToInt32(dtDetail.Rows[0]["W_GameCategoryID"]), 0, pagesize, 1, out totaltopdownload); rptGameCungLoai.DataSource = dtltopdownload; rptGameCungLoai.ItemDataBound += rptlstCategory_ItemDataBound; rptGameCungLoai.DataBind(); } } }
protected void rptTheLoaiGame_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemIndex < 0) { return; } DataRowView curData = (DataRowView)e.Item.DataItem; HyperLink lnkCatLink = (HyperLink)e.Item.FindControl("lnkCatLink"); if (lnkCatLink != null) { lnkCatLink.NavigateUrl = UrlProcess.GetGameCategoryUrlNew(lang, width, curData["W_GameCategoryID"].ToString(), hotro.ToString()); lnkCatLink.CssClass = "link-non-black"; } }
protected void Page_Load(object sender, EventArgs e) { //price = ConfigurationSettings.AppSettings.Get("gameprice"); preurl = AppEnv.GetSetting("urldata"); width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); hotro = ConvertUtility.ToInt32(Request.QueryString["hotro"]); //hotro = 1; catID = ConvertUtility.ToInt32(Request.QueryString["catid"]); if (AppEnv.GetSetting("freecate").IndexOf("," + catID + ",") > -1) { freecate = true; } _info = Get_User_Agent_Info(); if (!IsPostBack) { if (Session["serviceList"] != null) { _arrService = Session["serviceList"] as string[]; } if (_arrService != null) { if (_arrService.Length > 0) { string dkGame = string.Format(AppEnv.GetSetting("S2DK_Game")); foreach (var item in _arrService) { if (item == dkGame) { pnlDkGame.Visible = false; } } } } if (catID == 22) { Price = "0"; } else { Price = AppEnv.GetSetting("gameprice"); } DataTable catInfo = GameController.GetCategoryByCatIDHasCache(catID); if (lang == 1) { lnkCateChannel.Text = catInfo.Rows[0]["Title_Unicode"].ToString().ToUpper(); } else { lnkCateChannel.Text = catInfo.Rows[0]["Title"].ToString().ToUpper(); } lnkCateChannel.NavigateUrl = UrlProcess.GetGameCategoryUrlNew(lang.ToString(), width, catID.ToString(), hotro.ToString()); } if (!string.IsNullOrEmpty(Request.QueryString["cpage"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]); } //start category list int totalrecord = 0; //if (hotro == 1) //{ // rptlstCategory.DataSource = GameController.GetAllGameByCateTypeAndAgent(Session["telco"].ToString(), catID, (int)Constant.Game.Category, _info, pagesize, curpage, out totalrecord); //} //else //{ // rptlstCategory.DataSource = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), catID, (int)Constant.Game.Category, pagesize, curpage, out totalrecord); //} var dt = new DataTable(); dt = GameController.GetAllGameByCateTypeAndAgent(Session["telco"].ToString(), catID, (int)Constant.Game.Category, _info, pagesize, curpage, out totalrecord); if (dt.Rows.Count == 0) { dt = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), catID, (int)Constant.Game.Category, pagesize, curpage, out totalrecord); } rptlstCategory.DataSource = dt; rptlstCategory.ItemDataBound += rptlstCategory_ItemDataBound; rptlstCategory.DataBind(); Paging1.totalrecord = totalrecord; Paging1.pagesize = pagesize; Paging1.numberpage = pagenumber; Paging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&catid=" + Request.QueryString["catid"] + "&hotro=" + Request.QueryString["hotro"]; Paging1.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&catid=" + Request.QueryString["catid"] + "&hotro=" + Request.QueryString["hotro"] + "&cpage="; //end category list }