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) { 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 }
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 }