//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"]); //catID = ConvertUtility.ToInt32(Request.QueryString["catid"]); if (!IsPostBack) { if (lang == 0) { ltrTitle.Text = "CLIP bong da 24h"; } } if (!string.IsNullOrEmpty(Request.QueryString["tpage"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["tpage"]); } //start category list int totalrecord = 0; DataTable dtCat = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), catID, -1, (int)Constant.Video.Category, pagesize, curpage, out totalrecord); rptlstCategory.DataSource = dtCat; rptlstCategory.ItemDataBound += new RepeaterItemEventHandler(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"] + "&cpage=" + Request.QueryString["cpage"]; Paging1.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&catid=" + Request.QueryString["catid"] + "&cpage=" + Request.QueryString["cpage"] + "&tpage="; //end category list }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { int totalrecord = 0; DataTable dtVideo = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(AppEnv.CheckSessionTelco(), catID, -1, (int)Constant.Video.Category, 4, 1, out totalrecord); if (dtVideo != null && dtVideo.Rows.Count > 0) { rptVideo.DataSource = dtVideo; rptVideo.DataBind(); } DataTable dtlatest = ThethaoController.GetHomeNewsHasCache(); if (dtlatest != null && dtlatest.Rows.Count > 0) { IList <DataRow> contentTop = dtlatest.Select().Skip(0).Take(1).ToList(); IList <DataRow> contentList = dtlatest.Select().Skip(1).Take(4).ToList(); rptTopNews.DataSource = contentTop.CopyToDataTable(); rptTopNews.DataBind(); if (contentList.Count > 0) { rptListNews.DataSource = contentList.CopyToDataTable(); rptListNews.DataBind(); } } } }
protected void Page_Load(object sender, EventArgs e) { preurl = AppEnv.GetSetting("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) { litGia.Text = "(Gia: " + AppEnv.GetSetting("videoprice") + " d/video)"; //ltrTaiNhieuNhat.Text = Resources.Resource.wTaiNhieuNhat_KD; //ltrMoiNhat.Text = Resources.Resource.wMoiCapNhat_KD; } else { litGia.Text = "(Giá: " + AppEnv.GetSetting("videoprice") + " đ/video)"; //ltrTaiNhieuNhat.Text = Resources.Resource.wTaiNhieuNhat; //ltrMoiNhat.Text = Resources.Resource.wMoiCapNhat; } #region Tai Nhieu Nhat DataTable dtHottest = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 3, -1, (int)Constant.Video.Topdownload, pagesize, curpage, out totalrecord); rptTaiNhieuNhat.DataSource = dtHottest; rptTaiNhieuNhat.ItemDataBound += rptTaiNhieuNhat_ItemDataBound; rptTaiNhieuNhat.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="; #endregion #region Moi Cap Nhat DataTable dtLatest = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 1, -1, (int)Constant.Video.Lastest, pagesize, tpage, out totalrecord); rptMoiCapNhat.DataSource = dtLatest; rptMoiCapNhat.ItemDataBound += rptMoiCapNhat_ItemDataBound; rptMoiCapNhat.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="; #endregion }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { int totalrecord = 0; string cateName = string.Empty; catID = ConvertUtility.ToInt32(Request.QueryString["catid"]); DataTable catInfo = VideoController.GetCategoryByCatIDHasCache(catID); if (catInfo != null && catInfo.Rows.Count > 0) { cateName = catInfo.Rows[0]["Title_Unicode"].ToString(); lblCategorryName.Text = cateName; } if (!string.IsNullOrEmpty(Request.QueryString["cpage"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]); } var dt = new DataTable(); if (catID == 1) { cateName = "tai-nhieu-nhat"; dt = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(AppEnv.CheckSessionTelco(), 3, -1, (int)Constant.Video.Topdownload, pagesize, curpage, out totalrecord); } else if (catID == 2) { cateName = "moi-cap-nhat"; dt = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(AppEnv.CheckSessionTelco(), 1, -1, (int)Constant.Video.Lastest, pagesize, curpage, out totalrecord); } else { dt = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(AppEnv.CheckSessionTelco(), catID, -1, (int)Constant.Video.Category, pagesize, curpage, out totalrecord); } if (dt.Rows.Count > 0) { rptList.DataSource = dt; rptList.DataBind(); Paging1.totalrecord = totalrecord; Paging1.pagesize = pagesize; Paging1.numberpage = pagenumber; Paging1.defaultparam = UrlProcess.VideoChuyenMuc(catID, curpage, cateName); Paging1.queryparam = UrlProcess.VideoChuyenMuc(catID, curpage, cateName); } } }
protected void Page_Load(object sender, EventArgs e) { preurl = ConfigurationSettings.AppSettings.Get("urldata"); width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); if (!IsPostBack) { //DataTable catInfo = VideoController.GetCategoryByCatIDHasCache(catID); if (lang == 0) { ltrTieude.Text = "Khoanh khac Olympic 2012"; lnkXemthem.Text = "Xem them » "; //ltrGia.Text = "(" + Resources.Resource.wThongBaoGia_KD + ConfigurationSettings.AppSettings.Get("videoprice") + Resources.Resource.wDonViTien_KD + "/video)"; } else { ltrTieude.Text = "Khoảnh khắc Olympic 2012"; lnkXemthem.Text = "Xem thêm » "; //ltrGia.Text = "(" + Resources.Resource.wThongBaoGia + ConfigurationSettings.AppSettings.Get("videoprice") + Resources.Resource.wDonViTien + "/video)"; } } lnkXemthem.NavigateUrl = UrlProcess.GetVideoCategoryUrl(lang.ToString(), width, catID.ToString()); if (!string.IsNullOrEmpty(Request.QueryString["c"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["c"]); } else { Random rnd = new Random(); curpage = rnd.Next(1, 4); } //start category list int totalrecord = 0; DataTable dtCat = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache("vietnamobile", catID, -1, (int)Constant.Video.Category, pagesize, curpage, out totalrecord); rptlstCategory.DataSource = dtCat; rptlstCategory.ItemDataBound += new RepeaterItemEventHandler(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"] + "&a=" + Request.QueryString["a"] + "&b=" + Request.QueryString["b"] + "&e=" + Request.QueryString["e"] + "&d=" + Request.QueryString["d"] + "&f=" + Request.QueryString["f"]; //Paging1.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&a=" + Request.QueryString["a"] + "&b=" + Request.QueryString["b"] + "&e=" + Request.QueryString["e"] + "&d=" + Request.QueryString["d"] + "&f=" + Request.QueryString["f"] + "&c="; //end category list }
protected void Page_Load(object sender, EventArgs e) { width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); catID = ConvertUtility.ToInt32(Request.QueryString["catid"]); if (!IsPostBack) { DataTable catInfo = VideoController.GetCategoryByCatIDHasCache(catID); if (lang == 1) { litGia.Text = "(Giá: " + AppEnv.GetSetting("videoprice") + " đ/video)"; lnkCateChannel.Text = catInfo.Rows[0]["Title_Unicode"].ToString().ToUpper(); } else { litGia.Text = "(Gia: " + AppEnv.GetSetting("videoprice") + " d/video)"; lnkCateChannel.Text = catInfo.Rows[0]["Title"].ToString().ToUpper(); } lnkCateChannel.NavigateUrl = UrlProcess.GetVideoCategoryUrlNew(lang.ToString(), width, catID.ToString()); lnkHomeChannel.NavigateUrl = UrlProcess.GetVideoHomeUrlNew(lang.ToString(), width); } if (!string.IsNullOrEmpty(Request.QueryString["cpage"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]); } //start category list int totalrecord = 0; DataTable dtCat = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), catID, -1, (int)Constant.Video.Category, pagesize, curpage, out totalrecord); if (dtCat.Rows.Count > 0) { rptlstCategory.DataSource = dtCat; 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"]; Paging1.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&catid=" + Request.QueryString["catid"] + "&cpage="; } //end category list }
//private static string preurl; protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { int totalrecord = 0; //Tải nhiều nhất DataTable dtHottest = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(AppEnv.CheckSessionTelco(), 3, -1, (int)Constant.Video.Topdownload, pagesize, curpage, out totalrecord); if (dtHottest != null && dtHottest.Rows.Count > 0) { rptTaiNhieuNhat.DataSource = dtHottest; rptTaiNhieuNhat.DataBind(); } //Mới nhất DataTable dtLatest = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(AppEnv.CheckSessionTelco(), 1, -1, (int)Constant.Video.Lastest, pagesize, tpage, out totalrecord); if (dtLatest != null && dtLatest.Rows.Count > 0) { rptMoiCapNhat.DataSource = dtLatest; rptMoiCapNhat.DataBind(); } //Nong Trong ngay DataTable dtNong = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(AppEnv.CheckSessionTelco(), 4, -1, (int)Constant.Video.Category, pagesize, curpage, out totalrecord); if (dtNong != null && dtNong.Rows.Count > 0) { rptNongTrongNgay.DataSource = dtNong; rptNongTrongNgay.DataBind(); } //Shock DataTable dtShock = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(AppEnv.CheckSessionTelco(), 21, -1, (int)Constant.Video.Category, pagesize, curpage, out totalrecord); if (dtShock != null && dtShock.Rows.Count > 0) { rptShock.DataSource = dtShock; rptShock.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { id = ConvertUtility.ToInt32(Request.QueryString["id"]); //Detail DataTable dtDetail = VideoController.GetVideoDetailByIDHasCache(AppEnv.CheckSessionTelco(), id); //end detail if (dtDetail.Rows.Count > 0) { rptDetail.DataSource = dtDetail; rptDetail.DataBind(); CatId = dtDetail.Rows[0]["W_VCategoryID"].ToString(); CatName = dtDetail.Rows[0]["Title"].ToString(); int totalrecord = 0; DataTable dtList = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(AppEnv.CheckSessionTelco(), ConvertUtility.ToInt32(CatId), -1, (int)Constant.Video.Category, 5, 1, out totalrecord); if (dtList.Rows.Count == 0) { dtList = VideoController.GetAllVideoByCategoryAndDisplayType(AppEnv.CheckSessionTelco(), ConvertUtility.ToInt32(CatId), id, 0, 5, 1, out totalrecord); } foreach (DataRow iRow in dtList.Rows) { if ((int)iRow["W_VItemID"] == id) { iRow.Delete(); dtList.AcceptChanges(); break; } } rptList.DataSource = dtList; rptList.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); int totalrecord = 0; if (Session["telco"] == null) { Session["telco"] = Constant.T_Undefined; } if (!string.IsNullOrEmpty(Request.QueryString["cpage"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]); } catID = ConvertUtility.ToInt32(Request.QueryString["catid"]); DataTable dtCat = null; if (!IsPostBack) { if (catID == 1) { lnkCateChannel.Text = "Mới cập nhât"; dtCat = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 1, 0, (int)Constant.Video.Lastest, pagesize, curpage, out totalrecord); } else if (catID == 2) { lnkCateChannel.Text = "Tải nhiều nhất"; dtCat = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 3, 0, (int)Constant.Video.Topdownload, pagesize, curpage, out totalrecord); } else { if (catID == 0) { lnkCateChannel.Text = "Mới cập nhât"; dtCat = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 1, 0, (int)Constant.Video.Lastest, pagesize, curpage, out totalrecord); } else { DataTable catInfo = VideoController.GetCategoryByCatIDHasCache(catID); if (catInfo != null && catInfo.Rows.Count > 0) { lnkCateChannel.Text = catInfo.Rows[0]["Title_Unicode"].ToString().ToUpper(); } lnkCateChannel.NavigateUrl = UrlProcess.GetVideoCategoryUrl(lang.ToString(), width, catID.ToString()); dtCat = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), catID, 0, (int)Constant.Video.Category, pagesize, curpage, out totalrecord); } } lnkHomeChannel.NavigateUrl = UrlProcess.GetVideoHomeUrl(lang.ToString(), width); } //DataTable dtCat = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), catID, 0, (int)Constant.Video.Category, pagesize, curpage, out totalrecord); if (dtCat != null && dtCat.Rows.Count > 0) { rptList.DataSource = dtCat; rptList.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"]; Paging1.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&catid=" + Request.QueryString["catid"] + "&cpage="; //end category list }