//private int price; protected void Page_Load(object sender, EventArgs e) { //price = ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("wallprice")); preurl = ConfigurationSettings.AppSettings.Get("urldata"); width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); if (!string.IsNullOrEmpty(Request.QueryString["cpage"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]); } if (!string.IsNullOrEmpty(Request.QueryString["tpage"])) { tpage = ConvertUtility.ToInt32(Request.QueryString["tpage"]); } int totalrecord = 0; if (lang == 0) { ltrTaiNhieuNhat.Text = Resources.Resource.wTaiNhieuNhat_KD; ltrMoiNhat.Text = Resources.Resource.wMoiCapNhat_KD; } else { ltrTaiNhieuNhat.Text = Resources.Resource.wTaiNhieuNhat; ltrMoiNhat.Text = Resources.Resource.wMoiCapNhat; } //Tải nhiều nhất DataTable dtHottest = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 3, -1, (int)Constant.Video.Topdownload, pagesize, curpage, out totalrecord); rptHottest.DataSource = dtHottest; rptHottest.ItemDataBound += new RepeaterItemEventHandler(rptlastest_ItemDataBound); rptHottest.DataBind(); Paging1.totalrecord = totalrecord; Paging1.pagesize = pagesize; Paging1.numberpage = pagenumber; Paging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&tpage=" + Request.QueryString["tpage"]; Paging1.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&tpage=" + Request.QueryString["tpage"] + "&cpage="; //Mới nhất DataTable dtLatest = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 1, -1, (int)Constant.Video.Lastest, pagesize, tpage, out totalrecord); rptLastest.DataSource = dtLatest; rptLastest.ItemDataBound += new RepeaterItemEventHandler(rptlastest_ItemDataBound); rptLastest.DataBind(); Paging2.totalrecord = totalrecord; Paging2.pagesize = pagesize; Paging2.numberpage = pagenumber; Paging2.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&cpage=" + Request.QueryString["cpage"]; Paging2.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&cpage=" + Request.QueryString["cpage"] + "&tpage="; //Quảng cáo if (!IsPostBack) { var advertisementLevel2 = new VmgPortal.Modules.Adsvertising.Advertisement { Channel = "Home", Position = "GameVT1", Param = 0, Lang = Request.QueryString["lang"], Width = width.ToString() }; ltrAdvLevel2.Text = advertisementLevel2.GetAds(); } }
protected void Page_Load(object sender, EventArgs e) { preurl = ConfigurationSettings.AppSettings.Get("urldata"); width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); hotro = ConvertUtility.ToInt32(Request.QueryString["hotro"]); if (!string.IsNullOrEmpty(Request.QueryString["cpage"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]); } if (!string.IsNullOrEmpty(Request.QueryString["tpage"])) { tpage = ConvertUtility.ToInt32(Request.QueryString["tpage"]); } _info = Get_User_Agent_Info(); int totalrecord = 0; if (lang == 0) { ltrTaiNhieuNhat.Text = Resources.Resource.wTaiNhieuNhat_KD; ltrMoiNhat.Text = Resources.Resource.wMoiCapNhat_KD; } else { ltrTaiNhieuNhat.Text = Resources.Resource.wTaiNhieuNhat; ltrMoiNhat.Text = Resources.Resource.wMoiCapNhat; } //Tải nhiều nhất if (hotro == 1) { lnkValidModel.NavigateUrl = Request.RawUrl.Replace("hotro=1", "hotro=0").Replace("cpage=" + curpage.ToString(), "cpage=1").Replace("tpage=" + tpage.ToString(), "tpage=1"); rptHottest.DataSource = PhanmemController.GetAllAppByCateTypeAndAgent(Session["telco"].ToString(), 10, (int)Constant.APP.Topdownload, _info, pagesize, curpage, out totalrecord); } else { lnkValidModel.NavigateUrl = Request.RawUrl.Replace("hotro=0", "hotro=1").Replace("cpage=" + curpage.ToString(), "cpage=1").Replace("tpage=" + tpage.ToString(), "tpage=1"); rptHottest.DataSource = PhanmemController.GetAllAppByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 10, (int)Constant.APP.Topdownload, pagesize, curpage, out totalrecord); } //DataTable dtHottest = PhanmemController.GetAllAppByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 10, (int)Constant.APP.Topdownload, pagesize, curpage, out totalrecord); //rptHottest.DataSource = dtHottest; rptHottest.ItemDataBound += new RepeaterItemEventHandler(rptlastest_ItemDataBound); rptHottest.DataBind(); Paging1.totalrecord = totalrecord; Paging1.pagesize = pagesize; Paging1.numberpage = pagenumber; Paging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&tpage=" + Request.QueryString["tpage"] + "&hotro=" + Request.QueryString["hotro"]; Paging1.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&tpage=" + Request.QueryString["tpage"] + "&hotro=" + Request.QueryString["hotro"] + "&cpage="; //Mới nhất if (hotro == 1) { rptLastest.DataSource = PhanmemController.GetAllAppByCateTypeAndAgent(Session["telco"].ToString(), 9, (int)Constant.APP.Lastest, _info, pagesize, tpage, out totalrecord); } else { rptLastest.DataSource = PhanmemController.GetAllAppByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 9, (int)Constant.APP.Lastest, pagesize, tpage, out totalrecord); } //DataTable dtLatest = PhanmemController.GetAllAppByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 9, (int)Constant.APP.Lastest,pagesize, tpage, out totalrecord); //rptLastest.DataSource = dtLatest; rptLastest.ItemDataBound += new RepeaterItemEventHandler(rptlastest_ItemDataBound); rptLastest.DataBind(); Paging2.totalrecord = totalrecord; Paging2.pagesize = pagesize; Paging2.numberpage = pagenumber; Paging2.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&cpage=" + Request.QueryString["cpage"] + "&hotro=" + Request.QueryString["hotro"]; Paging2.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&cpage=" + Request.QueryString["cpage"] + "&hotro=" + Request.QueryString["hotro"] + "&tpage="; if (lang == 1) { if (hotro == 0) { lnkValidModel.Text = "Chỉ hiển thị những phần mềm hỗ trợ"; } else { lnkValidModel.Text = "Hiển thị tất cả các phần mềm"; } } else if (hotro == 0) { lnkValidModel.Text = "Chi hien thi nhung phan mem ho tro"; } else { lnkValidModel.Text = "Hien thi tat ca cac phan mem"; } lnkValidModel.Text = "<span class=\"orange\">" + lnkValidModel.Text + "</span>"; //Quảng cáo if (!IsPostBack) { var advertisementLevel2 = new VmgPortal.Modules.Adsvertising.Advertisement { Channel = "Home", Position = "GameVT1", Param = 0, Lang = Request.QueryString["lang"], Width = width.ToString() }; ltrAdvLevel2.Text = advertisementLevel2.GetAds(); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["SubGame"] != null) { pnlHienThi.Visible = true; Session["SubGame"] = null; } preurl = ConfigurationSettings.AppSettings.Get("urldata"); width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); hotro = ConvertUtility.ToInt32(Request.QueryString["hotro"]); //hotro = 1; if (!string.IsNullOrEmpty(Request.QueryString["cpage"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]); } if (!string.IsNullOrEmpty(Request.QueryString["tpage"])) { tpage = ConvertUtility.ToInt32(Request.QueryString["tpage"]); } _info = Get_User_Agent_Info(); //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) // { // pnlS2DkGame1.Visible = false; // pnlS2DkGame2.Visible = false; // } // } // } //} if (Session["msisdn"] != null) { string value = AppEnv.GetRegisterService(Session["msisdn"].ToString(), AppEnv.GetSetting("S2DK_Game")); if (value == "1") { pnlS2DkGame1.Visible = false; pnlS2DkGame2.Visible = false; } } int totalrecord = 0; if (lang == 0) { ltrTaiNhieuNhat.Text = Resources.Resource.wTaiNhieuNhat_KD; ltrMoiNhat.Text = Resources.Resource.wMoiCapNhat_KD; } else { ltrTaiNhieuNhat.Text = Resources.Resource.wTaiNhieuNhat; ltrMoiNhat.Text = Resources.Resource.wMoiCapNhat; } //Tải nhiều nhất if (hotro == 1) { lnkValidModel.NavigateUrl = Request.RawUrl.Replace("hotro=1", "hotro=0").Replace("cpage=" + curpage.ToString(), "cpage=1").Replace("tpage=" + tpage.ToString(), "tpage=1"); //rptHottest.DataSource = GameController.GetAllGameByCateTypeAndAgent(Session["telco"].ToString(), 15, (int)Constant.Game.Topdownload, _info, pagesize, curpage, out totalrecord); } else { lnkValidModel.NavigateUrl = Request.RawUrl.Replace("hotro=0", "hotro=1").Replace("cpage=" + curpage.ToString(), "cpage=1").Replace("tpage=" + tpage.ToString(), "tpage=1"); //rptHottest.DataSource = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 15, (int)Constant.Game.Topdownload, pagesize, curpage, out totalrecord); } var dtHottest = new DataTable(); dtHottest = GameController.GetAllGameByCateTypeAndAgent(Session["telco"].ToString(), 15, (int)Constant.Game.Topdownload, _info, pagesize, curpage, out totalrecord); if (dtHottest.Rows.Count == 0) { dtHottest = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 15, (int)Constant.Game.Topdownload, pagesize, curpage, out totalrecord); } rptHottest.DataSource = dtHottest; rptHottest.ItemDataBound += rptlastest_ItemDataBound; rptHottest.DataBind(); Paging1.totalrecord = totalrecord; Paging1.pagesize = pagesize; Paging1.numberpage = pagenumber; Paging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&tpage=" + Request.QueryString["tpage"] + "&hotro=" + Request.QueryString["hotro"]; Paging1.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&tpage=" + Request.QueryString["tpage"] + "&hotro=" + Request.QueryString["hotro"] + "&cpage="; //Mới nhất //if (hotro == 1) //{ // rptLastest.DataSource = GameController.GetAllGameByCateTypeAndAgent(Session["telco"].ToString(), 16, (int)Constant.Game.Lastest, _info, pagesize, curpage, out totalrecord); //} //else //{ // rptLastest.DataSource = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 16, (int)Constant.Game.Lastest, pagesize, tpage, out totalrecord); //} var dtLastest = new DataTable(); dtLastest = GameController.GetAllGameByCateTypeAndAgent(Session["telco"].ToString(), 16, (int)Constant.Game.Lastest, _info, pagesize, curpage, out totalrecord); if (dtLastest.Rows.Count == 0) { dtLastest = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 16, (int)Constant.Game.Lastest, pagesize, tpage, out totalrecord); } rptLastest.DataSource = dtLastest; rptLastest.ItemDataBound += rptlastest_ItemDataBound; rptLastest.DataBind(); Paging2.totalrecord = totalrecord; Paging2.pagesize = pagesize; Paging2.numberpage = pagenumber; Paging2.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&cpage=" + Request.QueryString["cpage"] + "&hotro=" + Request.QueryString["hotro"]; Paging2.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&cpage=" + Request.QueryString["cpage"] + "&hotro=" + Request.QueryString["hotro"] + "&tpage="; // if (lang == 1) { if (hotro == 0) { lnkValidModel.Text = "Chỉ hiển thị những game hỗ trợ"; } else { lnkValidModel.Text = "Hiển thị tất cả các game"; } } else if (hotro == 0) { lnkValidModel.Text = "Chi hien thi nhung game ho tro"; } else { lnkValidModel.Text = "Hien thi tat ca cac game"; } lnkValidModel.Text = "<span class=\"orange\">" + lnkValidModel.Text + "</span>"; //Quảng cáo if (!IsPostBack) { var advertisementLevel2 = new VmgPortal.Modules.Adsvertising.Advertisement { Channel = "Home", Position = "GameVT1", Param = 0, Lang = Request.QueryString["lang"], Width = width.ToString() }; ltrAdvLevel2.Text = advertisementLevel2.GetAds(); } }