protected void Page_Load(object sender, EventArgs e) { catID = ConvertUtility.ToInt32(Request.QueryString["catid"]); if (!Page.IsPostBack) { string catName = string.Empty; DataTable catInfo = TintucController.GetCategoryByCatIDHasCache(catID); if (catInfo != null && catInfo.Rows.Count > 0) { catName = catInfo.Rows[0]["Zone_Name"].ToString().ToUpper(); lblCatetoryName.Text = catName; } if (!string.IsNullOrEmpty(Request.QueryString["cpage"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]); } int totalrecord = 0; DataTable dtCat = TintucController.GetAllNewsByCategoryHasCache(catID, pagesize, curpage, out totalrecord); if (dtCat != null && dtCat.Rows.Count > 0) { rptCategory.DataSource = dtCat; rptCategory.DataBind(); Paging1.totalrecord = totalrecord; Paging1.pagesize = pagesize; Paging1.numberpage = pagenumber; Paging1.defaultparam = UrlProcess.ThuGianChuyenMuc(catID, curpage, catName); Paging1.queryparam = UrlProcess.ThuGianChuyenMuc(catID, curpage, catName); } } }
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"]); } //lastest News int totalrecord = 0; DataTable dtlatest = TintucController.GetTopNewsWithPaggingHasCache(ConvertUtility.ToInt32(AppEnv.GetSetting("news_zoneid")), pagesize, curpage, 60, out totalrecord); if (dtlatest.Rows.Count > 0) { CurrentRow = dtlatest.Rows.Count; rptlastest.DataSource = dtlatest; rptlastest.ItemDataBound += rptlastest_ItemDataBound; rptlastest.DataBind(); Paging1.totalrecord = totalrecord; Paging1.pagesize = pagesize; Paging1.numberpage = pagenumber; Paging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"]; Paging1.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&cpage="; } }
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) { //lastest News DataTable dtlatest = TintucController.GetTopNewsHasCache(ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("news_zoneid")), 6); count = dtlatest.Rows.Count - 1; rptNewLastest.DataSource = dtlatest; rptNewLastest.ItemDataBound += new RepeaterItemEventHandler(rptNewLastest_ItemDataBound); rptNewLastest.DataBind(); //end lastest News //lnkTintuc.NavigateUrl = lnkCacTinKhac.NavigateUrl = UrlProcess.GetNewsHomeUrl(lang.ToString(), width); lnkTintuc.NavigateUrl = lnkCacTinKhac.NavigateUrl = UrlProcess.TinTucHome(); if (lang != 1) { lnkCacTinKhac.Text = "Cac tin khac »"; lnkTintuc.Text = "Tin tuc"; } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { catID = Request.QueryString["catid"]; width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); if (!string.IsNullOrEmpty(Request.QueryString["cpage"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]); } DataSet ds = TintucController.GetAudioBookByCategoryCache(catID, curpage, pagesize); if (ds != null && ds.Tables[0].Rows.Count > 0) { CatName = ds.Tables[2].Rows[0]["StyleName"].ToString(); rptList.DataSource = ds.Tables[0]; rptList.DataBind(); Paging1.totalrecord = ConvertUtility.ToInt32(ds.Tables[1].Rows[0]["totalRows"]); Paging1.pagesize = pagesize; Paging1.numberpage = pagenumber; Paging1.defaultparam = UrlProcess.TruyenAudioChuyenMuc(catID, curpage, CatName); Paging1.queryparam = UrlProcess.TruyenAudioChuyenMuc(catID, curpage, CatName); } } }
protected void rptZoneList_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemIndex < 0) { return; } string curData = (string)e.Item.DataItem; Label lblCatetoryName = (Label)e.Item.FindControl("lblCatetoryName"); Repeater rptCategory = (Repeater)e.Item.FindControl("rptCategory"); DataTable catInfo = TintucController.GetCategoryByCatIDHasCache(ConvertUtility.ToInt32(curData)); if (lang == 1) { lblCatetoryName.Text = catInfo.Rows[0]["Zone_Name"].ToString().ToUpper(); } else { lblCatetoryName.Text = catInfo.Rows[0]["Zone_Alias"].ToString().ToUpper(); } DataTable dt = TintucController.GetAllCategoryExeptCatIDHasCache(ConvertUtility.ToInt32(curData), catid); rptCategory.DataSource = dt; rptCategory.ItemDataBound += rptCategory_ItemDataBound; rptCategory.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { preurl = ConfigurationSettings.AppSettings.Get("urldata"); width = Request.QueryString["w"]; catID = ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("news_showbizid")); if (!IsPostBack) { lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); } if (!string.IsNullOrEmpty(Request.QueryString["cpage"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]); } //start category list int totalrecord = 0; DataTable dtCat = TintucController.GetAllNewsByCategoryHasCache(catID, 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"]; Paging1.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&catid=" + Request.QueryString["catid"] + "&cpage="; //end category list }
protected void HienThiNoiDung(Boolean thuchien, Boolean log) { //pnlNoiDung.Visible = true; id = ConvertUtility.ToInt32(Request.QueryString["id"]); DataTable dtDetail = TintucController.GetNewsDetail(id); catID = ConvertUtility.ToInt32(dtDetail.Rows[0]["Distribution_ZoneID"]); DataTable catInfo = TintucController.GetCategoryByCatIDHasCache(catID); if (thuchien) { //if (lang == "1") //{ //ltrTieuDe.Text = linkStr + " » " + "THƯ GIÃN"; lblItemName.Text = dtDetail.Rows[0]["Content_Headline"].ToString(); if (dtDetail.Rows.Count > 0) { litContent.Text = dtDetail.Rows[0]["Content_Body"].ToString().Replace("href=\"Upload", "href=\"" + AppEnv.GetSetting("urldata") + "/Upload"); } //} if (log) { Transaction.Success(AppEnv.CheckSessionTelco(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 13); } } else { //Thông báo lỗi thanh toán //if (lang == "1") //{ //ltrTieuDe.Text = linkStr + " » " + Resources.Resource.wThongBao; litContent.Text = Resources.Resource.wThongBaoLoiThanhToan; //} //else //{ // ltrTieuDe.Text = linkStr_KD + " » " + Resources.Resource.wThongBao_KD; // ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan_KD; //} //--Thông báo lỗi thanh toán if (log) { Transaction.Failure(AppEnv.CheckSessionTelco(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 13, messageReturn); } } if (log) { //log charging ILog logger = log4net.LogManager.GetLogger(Session["telco"].ToString()); logger.Debug("--------------------------------------------------"); logger.Debug("MSISDN:" + Session["msisdn"].ToString()); logger.Debug("Dich vu: Thu gian - parameter: " + price + " - Ten: " + dtDetail.Rows[0]["Content_HeadlineKD"].ToString() + " - id: " + id); logger.Debug("IP:" + HttpContext.Current.Request.UserHostAddress); logger.Debug("Error:" + messageReturn); logger.Debug("Current Url:" + Request.RawUrl); //end log } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { catid = ConvertUtility.ToInt32(Request.QueryString["catid"]); DataTable dt = TintucController.GetAllCategoryExeptCatIDHasCache(258, catid); rptCategory.DataSource = dt; rptCategory.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (Session["msisdn"] == null) { int is3g = 0; string msisdn = MobileUtils.GetMSISDN(out is3g); if (!string.IsNullOrEmpty(msisdn) && MobileUtils.CheckOperator(msisdn, "vietnammobile")) { Session["telco"] = Constant.T_Vietnamobile; Session["msisdn"] = msisdn; ltrXinChao.Text = msisdn; } else { Session["msisdn"] = null; Session["telco"] = Constant.T_Undefined; ltrXinChao.Text = "Khách"; } } else { ltrXinChao.Text = Session["msisdn"].ToString(); } DataTable dtlatest = TintucController.GetTopNewsHasCache(ConvertUtility.ToInt32(System.Configuration.ConfigurationSettings.AppSettings.Get("vnm_zoneid")), 3); count = dtlatest.Rows.Count; rptHotNews.DataSource = dtlatest; rptHotNews.ItemDataBound += rptHotnews_ItemDataBound; rptHotNews.DataBind(); DataTable dtAdv = WapController.WapVnmGetAdvByPosId(ConvertUtility.ToInt32(AppEnv.GetSetting("WapVnm_Top"))); if (dtAdv != null && dtAdv.Rows.Count > 0) { string url = AppEnv.GetSetting("urldata") + dtAdv.Rows[0]["Advertise_Path"]; string str = "<a class=\"noelbanner\" href=\"" + dtAdv.Rows[0]["Advertise_RedirectUrl"] + "\">"; if (AppEnv.isMobileBrowser()) { str += "<img width=\"" + "99%" + "\" height=\"" + dtAdv.Rows[0]["Advertise_Height"] + "\" src=\"" + url + "\" border=\"0\" /></a>"; } else { str += "<img width=\"" + dtAdv.Rows[0]["Advertise_Width"] + "\" height=\"" + dtAdv.Rows[0]["Advertise_Height"] + "\" src=\"" + url + "\" border=\"0\" /></a>"; } litAdvTop.Text = str; } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { DataSet ds = TintucController.WebGetNewsCategoryCache(); if (ds != null && ds.Tables[0].Rows.Count > 0) { rptCategory.DataSource = ds.Tables[0]; rptCategory.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { catID = ConvertUtility.ToInt32(Request.QueryString["catid"]); width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); if (!string.IsNullOrEmpty(Request.QueryString["cpage"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]); } DataTable catInfo = TintucController.GetCategoryByCatIDHasCache(catID); if (catInfo != null && catInfo.Rows.Count > 0) { CatName = catInfo.Rows[0]["Zone_Name"].ToString(); } int totalrecord = 0; DataTable dtCat = new DataTable(); //DataTable dtCat = TintucController.GetAllNewsByCategoryHasCache(catID, pagesize, curpage, out totalrecord); if (catID == 129) { dtCat = ThethaoController.GetLastestNewsFromTheThaoSoHasCache(curpage, pagesize, out totalrecord); } else { dtCat = TintucController.GetAllNewsByCategoryHasCache(catID, 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 = UrlProcess.TinTucChuyenMuc(catID, curpage, CatName); Paging1.queryparam = UrlProcess.TinTucChuyenMuc(catID, curpage, CatName); //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="; } } }
protected void Page_Load(object sender, EventArgs e) { preurl = ConfigurationSettings.AppSettings.Get("urldata"); width = Request.QueryString["w"]; id = ConvertUtility.ToInt32(Request.QueryString["id"]); if (!IsPostBack) { lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); //Detail DataTable dtDetail = TintucController.GetNewsDetailHasCache(id); catID = ConvertUtility.ToInt32(dtDetail.Rows[0]["Distribution_ZoneID"]); DataTable catInfo = TintucController.GetCategoryByCatIDHasCache(catID); //end detail if (lang == 1) { lnkCatName.Text = catInfo.Rows[0]["Zone_Name"].ToString().ToUpper(); lblCat.Text = "TIN ĐÃ ĐĂNG"; lblHeadline.Text = dtDetail.Rows[0]["Content_Headline"].ToString(); ltrBody.Text = ReplaceImageLink(dtDetail.Rows[0]["Content_Body"].ToString()); lnkHomeChannel.Text = "TIN TỨC"; } else { lblHeadline.Text = dtDetail.Rows[0]["Content_HeadlineKD"].ToString(); ltrBody.Text = ReplaceImageLink(dtDetail.Rows[0]["Content_BodyKD"].ToString()); lnkCatName.Text = catInfo.Rows[0]["Zone_Alias"].ToString().ToUpper(); } if (!string.IsNullOrEmpty(dtDetail.Rows[0]["Content_Avatar"].ToString())) { WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver(); ws.GenerateAvatarThumnail(dtDetail.Rows[0]["Content_Avatar"].ToString(), 60, 60); imgAvatar.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(dtDetail.Rows[0]["Content_Avatar"].ToString(), 60, 60).Replace("~", ""); } else { imgAvatar.Visible = false; } lblCreatedOn.Text = ConvertUtility.ToDateTime(dtDetail.Rows[0]["Content_CreateDate"]).ToString("dd/MM/yyyy"); lnkCatName.NavigateUrl = UrlProcess.GetNewsCategoryUrl(lang.ToString(), width, catID.ToString()); lnkHomeChannel.NavigateUrl = UrlProcess.GetNewsHomeUrl(lang.ToString(), width); } //start Older News DataTable dtCat = TintucController.GetTopNewsOlderByCategoryHasCache(catID, id, 4); rptlstCategory.DataSource = dtCat; rptlstCategory.ItemDataBound += new RepeaterItemEventHandler(rptlstCategory_ItemDataBound); rptlstCategory.DataBind(); //start Older News }
protected void HienThiNoiDung(Boolean thuchien, Boolean log) { id = ConvertUtility.ToString(Request.QueryString["id"]); DataTable dtDetail = TintucController.GetAudioBookDetailCache(id); chitietGiaodich = "Nghe truyen Audio id : " + id; if (dtDetail != null && dtDetail.Rows.Count > 0) { if (thuchien) { pnlContent.Visible = true; if (dtDetail.Rows.Count > 0) { string url = "<p><a href=\"" + AppEnv.GetSetting("urldata") + dtDetail.Rows[0]["SongPathFile"].ToString().Replace("~/Upload/", "/Upload/") + "\" >Nghe chất lượng cao</a></p>"; //litContent.Text = dtDetail.Rows[0]["Content_Body"].ToString().Replace("href=\"Upload", "href=\"" + AppEnv.GetSetting("urldata") + "/Upload"); litContent.Text = url; } if (log) { Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 24); } } else { pnlContentError.Visible = true; //Thông báo lỗi thanh toán litContentError.Text = Resources.Resource.wThongBaoLoiThanhToan; //--Thông báo lỗi thanh toán if (log) { Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 24, messageReturn); } } if (log) { //log charging ILog logger = LogManager.GetLogger(Session["telco"].ToString()); logger.Debug("--------------------------------------------------"); logger.Debug("MSISDN:" + Session["msisdn"]); logger.Debug("Dich vu: Audio - parameter: " + price + " - Ten: " + UnicodeUtility.UnicodeToKoDau(dtDetail.Rows[0]["SongName"].ToString()) + " - id: " + id); logger.Debug("IP:" + HttpContext.Current.Request.UserHostAddress); logger.Debug("Error:" + messageReturn); logger.Debug("Current Url:" + Request.RawUrl); //end log } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { id = ConvertUtility.ToInt32(Request.QueryString["id"]); DataTable dtDetail = TintucController.GetNewsDetailHasCache(id); catID = ConvertUtility.ToInt32(dtDetail.Rows[0]["Distribution_ZoneID"]); DataTable catInfo = TintucController.GetCategoryByCatIDHasCache(catID); parentCatID = ConvertUtility.ToInt32(catInfo.Rows[0]["Zone_ParentID"]); chitietGiaodich = "Thu gian: " + catInfo.Rows[0]["Zone_Name"].ToString() + " -- id: " + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]); HienThiNoiDung(true, false); } }
protected void Page_Load(object sender, EventArgs e) { width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); if (!Page.IsPostBack) { DataTable dt = TintucController.GetCategoryForHotNewsHomeCache(); if (dt != null && dt.Rows.Count > 0) { rptCategory.DataSource = dt; rptCategory.ItemDataBound += rptCategory_ItemDataBound; rptCategory.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { DataTable dtCat = TintucController.GetGioiTinhHomeCache(); IList <DataRow> contentTop = dtCat.Select().Skip(0).Take(1).ToList(); IList <DataRow> contentBottom = dtCat.Select().Skip(1).Take(4).ToList(); rptTop.DataSource = contentTop.CopyToDataTable(); rptTop.DataBind(); rptBottom.DataSource = contentBottom.CopyToDataTable(); rptBottom.DataBind(); } }
protected void HienThiNoiDung(Boolean thuchien, Boolean log) { id = ConvertUtility.ToInt32(Request.QueryString["id"]); DataTable dtDetail = TintucController.GetNewsDetailHasCache(id); catID = ConvertUtility.ToInt32(dtDetail.Rows[0]["Distribution_ZoneID"]); //DataTable catInfo = TintucController.GetCategoryByCatIDHasCache(catID); if (thuchien) { pnlContent.Visible = true; if (dtDetail.Rows.Count > 0) { litContent.Text = ReplaceImageLink(dtDetail.Rows[0]["Content_Body"].ToString()); } if (log) { Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 23); } } else { pnlContentError.Visible = true; //Thông báo lỗi thanh toán litContentError.Text = Resources.Resource.wThongBaoLoiThanhToan; //--Thông báo lỗi thanh toán if (log) { Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 23, messageReturn); } } if (log) { //log charging ILog logger = LogManager.GetLogger(Session["telco"].ToString()); logger.Debug("--------------------------------------------------"); logger.Debug("MSISDN:" + Session["msisdn"]); logger.Debug("Dich vu: Thu gian - parameter: " + price + " - Ten: " + dtDetail.Rows[0]["Content_HeadlineKD"] + " - id: " + id); logger.Debug("IP:" + HttpContext.Current.Request.UserHostAddress); logger.Debug("Error:" + messageReturn); logger.Debug("Current Url:" + Request.RawUrl); //end log } }
protected void Page_Load(object sender, EventArgs e) { preurl = ConfigurationSettings.AppSettings.Get("urldata"); width = Request.QueryString["w"]; catid = ConvertUtility.ToInt32(Request.QueryString["catid"]); parentid = ConvertUtility.ToInt32(AppEnv.GetSetting("news_zoneid")); if (!IsPostBack) { lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); //if (lang == 1)ltrTitle.Text = "CÁC CHUYÊN MỤC"; DataTable dt = TintucController.GetAllCategoryExeptCatIDHasCache(parentid, catid); totalcat = dt.Rows.Count; rptCategory.DataSource = dt; rptCategory.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { DataSet ds = TintucController.GetTruyenOnlineHomeCache(); if (ds != null) { DataTable dtMoiNhat = ds.Tables[0]; DataTable dtHot = ds.Tables[1]; rptTruyenMoi.DataSource = dtMoiNhat; rptTruyenMoi.DataBind(); rptTruyenHot.DataSource = dtHot; rptTruyenHot.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); if (!IsPostBack) { //lastest News DataTable dtlatest = TintucController.GetTopNewsHasCache(ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("news_zoneid")), 3); DataSet ds = ConvertUtility.SplitDataTable(dtlatest, 1); rptTopNews.DataSource = ds.Tables[0]; rptTopNews.DataBind(); rptNews.DataSource = ds.Tables[1]; rptNews.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { id = ConvertUtility.ToInt32(Request.QueryString["id"]); if (id > 0) { DataSet ds = TintucController.WebGetNewsInfoCache(id); if (ds != null && ds.Tables[0].Rows.Count > 0) { CatName = ds.Tables[0].Rows[0]["ParentName"].ToString(); catID = ConvertUtility.ToInt32(ds.Tables[0].Rows[0]["ParentId"].ToString()); DetailName = ds.Tables[0].Rows[0]["Title"].ToString(); rptDetail.DataSource = ds.Tables[0]; rptDetail.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { CatID = ConvertUtility.ToInt32(Request.QueryString["catid"]); if (CatID > 0) { DataSet ds = TintucController.WebGetNewsByCatIdCache(CatID); if (ds != null && ds.Tables[0].Rows.Count > 0) { rptList.DataSource = ds.Tables[0]; rptList.DataBind(); } if (ds != null && ds.Tables[1].Rows.Count > 0) { CatName = ds.Tables[1].Rows[0]["Name"].ToString(); } } }
protected void Page_Load(object sender, EventArgs e) { price = ConfigurationSettings.AppSettings.Get("relaxprice"); lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); width = Request.QueryString["w"]; if (!IsPostBack) { if (lang == 0) { ltrTieude.Text = "Loi chuc 8/3 hay nhat"; lnkXemthem.Text = "Xem them » "; //ltrGia.Text = "(" + Resources.Resource.wThongBaoGia_KD + ConfigurationSettings.AppSettings.Get("relaxtuvanprice") + Resources.Resource.wDonViTien_KD + "/tu van)"; } else { ltrTieude.Text = "Lời chúc 8/3 hay nhất"; lnkXemthem.Text = "Xem thêm » "; //ltrGia.Text = "(" + Resources.Resource.wThongBaoGia + ConfigurationSettings.AppSettings.Get("relaxtuvanprice") + Resources.Resource.wDonViTien + "/tư vấn)"; } lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); } lnkXemthem.NavigateUrl = UrlProcess.GetRelaxNewsCategoryUrl(lang.ToString(), "list", width, catID.ToString()); if (!string.IsNullOrEmpty(Request.QueryString["d"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["d"]); } else { Random rnd = new Random(); curpage = rnd.Next(1, 12); } //start category list int totalrecord = 0; DataTable dtCat = TintucController.GetAllNewsByCategory(catID, 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"] + "&e=" + Request.QueryString["e"] + "&c=" + Request.QueryString["c"] + "&b=" + Request.QueryString["b"] + "&f=" + Request.QueryString["f"]; //Paging1.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&a=" + Request.QueryString["a"] + "&e=" + Request.QueryString["e"] + "&c=" + Request.QueryString["c"] + "&b=" + Request.QueryString["b"] + "&f=" + Request.QueryString["f"] + "&d="; }
protected void Page_Load(object sender, EventArgs e) { preurl = AppEnv.GetSetting("urldata"); width = Request.QueryString["w"]; id = ConvertUtility.ToInt32(Request.QueryString["id"]); if (!IsPostBack) { lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); //Detail DataTable dtDetail = TintucController.GetNewsDetailHasCache(id); catID = ConvertUtility.ToInt32(dtDetail.Rows[0]["Distribution_ZoneID"]); DataTable catInfo = TintucController.GetCategoryByCatIDHasCache(catID); //end detail if (lang == 1) { lnkCatName.Text = catInfo.Rows[0]["Zone_Name"].ToString().ToUpper(); //lblCat.Text = "TIN ĐÃ ĐĂNG"; lblHeadline.Text = dtDetail.Rows[0]["Content_Headline"].ToString(); ltrBody.Text = ReplaceImageLink(dtDetail.Rows[0]["Content_Body"].ToString()); lnkHomeChannel.Text = "TIN TỨC"; } else { lblHeadline.Text = dtDetail.Rows[0]["Content_HeadlineKD"].ToString(); ltrBody.Text = ReplaceImageLink(dtDetail.Rows[0]["Content_BodyKD"].ToString()); lnkCatName.Text = catInfo.Rows[0]["Zone_Alias"].ToString().ToUpper(); } lblCreatedOn.Text = ConvertUtility.ToDateTime(dtDetail.Rows[0]["Content_CreateDate"]).ToString("dd/MM/yyyy"); lnkCatName.NavigateUrl = UrlProcess.GetNewsCategoryUrlNew(lang.ToString(), width, catID.ToString()); lnkHomeChannel.NavigateUrl = UrlProcess.GetNewsHomeUrlNew(lang.ToString(), width); } //start Older News DataTable dtCat = TintucController.GetTopNewsOlderByCategoryHasCache(catID, id, 4); rptlstCategory.DataSource = dtCat; rptlstCategory.ItemDataBound += rptlstCategory_ItemDataBound; rptlstCategory.DataBind(); //start Older News }
protected void Page_Load(object sender, EventArgs e) { preurl = ConfigurationSettings.AppSettings.Get("urldata"); width = Request.QueryString["w"]; key = Request.QueryString["key"]; parentid = ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("relax_zoneiddefaut")); price = ConfigurationSettings.AppSettings.Get("relaxprice"); cipher = Request.QueryString["link"]; MobileUtils.GetDetailUrl(EAS.DecryptData(cipher, ConfigurationSettings.AppSettings.Get("vmskey")), ref msisdn, ref cpid, ref vmstransactionid); if (!IsPostBack) { lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); if (lang == 1) { lblTitle.Text = "Kết quả tìm kiếm"; } } if (!string.IsNullOrEmpty(Request.QueryString["cpage"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]); } //start category list int totalrecord = 0; DataTable dtCat = TintucController.GetAllNewsByKey(key, pagesize, curpage, out totalrecord, parentid); rptResult.DataSource = dtCat; rptResult.ItemDataBound += new RepeaterItemEventHandler(rptResult_ItemDataBound); rptResult.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"] + "&key=" + Request.QueryString["key"] + "&id=" + Request.QueryString["id"]; Paging1.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&catid=" + Request.QueryString["catid"] + "&key=" + Request.QueryString["key"] + "&id=" + Request.QueryString["id"] + "&cpage="; //end category list if (lang == 1) { ltrCount.Text = "Tìm thấy " + totalrecord + " bài"; } else { ltrCount.Text = "Tim thay " + totalrecord + " bai"; } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { int totalrecord = 0; DataTable dtCat = TintucController.GetAllNewsByCategoryHasCacheVnm(380, 5, 1, out totalrecord); if (dtCat != null && dtCat.Rows.Count > 0) { IList <DataRow> contentTop = dtCat.Select().Skip(0).Take(1).ToList(); IList <DataRow> contentBottom = dtCat.Select().Skip(1).Take(5).ToList(); rptTop.DataSource = contentTop.CopyToDataTable(); rptTop.DataBind(); rptBottom.DataSource = contentBottom.CopyToDataTable(); rptBottom.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { DataSet ds = TintucController.GetTruyenOnlineHomeCache(); if (ds != null) { DataTable dtMoiNhat = ds.Tables[0]; IList <DataRow> contentTop = dtMoiNhat.Select().Skip(0).Take(1).ToList(); IList <DataRow> contentBottom = dtMoiNhat.Select().Skip(1).Take(4).ToList(); rptTop.DataSource = contentTop.CopyToDataTable(); rptTop.DataBind(); rptBottom.DataSource = contentBottom.CopyToDataTable(); rptBottom.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); hotro = ConvertUtility.ToInt32(Request.QueryString["hotro"]); DataTable dt = TintucController.GetTopNewsHasCache(ConvertUtility.ToInt32(AppEnv.GetSetting("news_zoneid")), 2); if (dt != null && dt.Rows.Count > 0) { string newsLink = UrlProcess.GetNewsHomeUrlNew(lang.ToString(), width); lnkXemThem.NavigateUrl = newsLink; rptTinTuc.DataSource = dt; rptTinTuc.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { preurl = AppEnv.GetSetting("urldata"); width = Request.QueryString["w"]; catID = ConvertUtility.ToInt32(Request.QueryString["catid"]); if (!IsPostBack) { lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); DataTable catInfo = TintucController.GetCategoryByCatIDHasCache(catID); if (lang == 1) { lnkCatName.Text = catInfo.Rows[0]["Zone_Name"].ToString().ToUpper(); } else { lnkCatName.Text = catInfo.Rows[0]["Zone_Alias"].ToString().ToUpper(); } lnkCatName.NavigateUrl = UrlProcess.GetNewsCategoryUrlNew(lang.ToString(), width, catID.ToString()); } if (!string.IsNullOrEmpty(Request.QueryString["cpage"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]); } //start category list int totalrecord = 0; DataTable dtCat = TintucController.GetAllNewsByCategoryHasCache(catID, pagesize, curpage, out totalrecord); if (dtCat.Rows.Count > 0) { CurrentRow = dtCat.Rows.Count; 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 }
void rptCategory_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { var rptTop = (Repeater)e.Item.FindControl("rptTop"); var rptBottom = (Repeater)e.Item.FindControl("rptBottom"); var currData = (DataRowView)e.Item.DataItem; int totalrecord = 0; DataTable dtCat = new DataTable(); ZoneId = ConvertUtility.ToInt32(currData["Zone_ID"]); if (ConvertUtility.ToInt32(currData["Zone_ID"]) == 129)// THE THAO SO { dtCat = ThethaoController.GetLastestNewsFromTheThaoSoHasCache(1, 10, out totalrecord); } else { dtCat = TintucController.GetAllNewsByCategoryHasCache(ConvertUtility.ToInt32(currData["Zone_ID"]), 10, 1, out totalrecord); } IList <DataRow> contentTop = dtCat.Select().Skip(0).Take(5).ToList(); IList <DataRow> contentBottom = dtCat.Select().Skip(5).Take(9).ToList(); if (contentTop.Count > 0) { rptTop.DataSource = contentTop.CopyToDataTable(); rptTop.DataBind(); } if (contentBottom.Count > 0) { rptBottom.DataSource = contentBottom.CopyToDataTable(); rptBottom.DataBind(); } } }