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) { 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) { 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) { preurl = AppEnv.GetSetting("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"]); DataTable dt = TintucController.GetAllCategoryExeptCatIDHasCache(parentid, catid); totalcat = dt.Rows.Count; if (dt.Rows.Count > 0) { rptCategory.DataSource = dt; rptCategory.ItemDataBound += rptCategory_ItemDataBound;; rptCategory.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { lang = Request.QueryString["lang"]; width = ConvertUtility.ToInt32(Request.QueryString["w"]); price = AppEnv.GetSetting("ringtoneprice"); id = ConvertUtility.ToString(Request.QueryString["id"]); telCo = AppEnv.CheckFreeContentTelco(); DataTable dtDetail = TintucController.GetAudioBookDetailCache(id); DataSet ds = TintucController.GetTruyenAudioHomeCache(); if (ds != null) { DataTable dtMoi = ds.Tables[0]; IList <DataRow> contentTop = dtMoi.Select().Skip(0).Take(1).ToList(); IList <DataRow> contentBottom = dtMoi.Select().Skip(1).Take(5).ToList(); rptTop.DataSource = contentTop.CopyToDataTable(); rptTop.DataBind(); rptBottom.DataSource = contentBottom.CopyToDataTable(); rptBottom.DataBind(); } if (dtDetail != null && dtDetail.Rows.Count > 0) { litName.Text = dtDetail.Rows[0]["SongName"].ToString(); catID = dtDetail.Rows[0]["StyleId"].ToString(); catName = dtDetail.Rows[0]["StyleName"].ToString(); } if (!Page.IsPostBack) { #region FREE CONTENT if (AppEnv.GetSetting("FreeContent") == "1") { HienThiNoiDung(true, false); return; } #endregion #region OLD if (AppEnv.GetSetting("TestFlag") == "1") { HienThiNoiDung(true, false); } else { if (Session["msisdn"] != null) { var charging = new Library.VNMCharging.VNMChargingGW(); messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), ProductId, Keyword, price, "D", "RELAX", Request.QueryString["id"]); if (messageReturn == AppEnv.GetSetting("NotEnoughMoney"))//Not Enough Money { messageReturn = AppEnv.VnmChargingOptimizeNotEnoughMoney(Session["msisdn"].ToString(), ProductId, Keyword, price, "D", "RELAX", Request.QueryString["id"], out logPrice); price = logPrice; } if (messageReturn == AppEnv.GetSetting("SystemOverload")) //System Over Load { messageReturn = AppEnv.VnmChargingSystemOverload(Session["msisdn"].ToString(), ProductId, Keyword, price, "D", "RELAX", Request.QueryString["id"]); } if (messageReturn == "1") {// Thanh toán thành công >> trả nội dung HienThiNoiDung(true, true); } else {// Thanh toán không thành công >> thông báo lỗi HienThiNoiDung(false, true); } } else { pnlContentError.Visible = true; litContentError.Text = "Bạn vui lòng lựa chọn kết nối EDGE hay 3G để sử dụng dịch vụ này. Lưu ý, hãy ngắt kết nối wifi bạn nhé"; } } #endregion DataTable dtOnline = TintucController.GetAllCategoryExeptCatIDHasCache(255, 0); DataTable dtAudio = TintucController.GetCategoryTruyenAudioCache(); rptCateOnline.DataSource = dtOnline; rptCateOnline.DataBind(); rptCateAudio.DataSource = dtAudio; rptCateAudio.DataBind(); } }
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"); Panel pnlDangKy = (Panel)e.Item.FindControl("pnlDangKy"); Literal litContent = (Literal)e.Item.FindControl("litContent"); string url = string.Empty; string display = string.Empty; ////Sửa bỏi Bình Trần - 25/11/2016 //if (curData == "118") //TRUYEN CUOI //{ // pnlDangKy.Visible = true; // url = "/ThuGian/Cuoi.aspx?lang=" + lang + "&w=" + width; // display = "Trải nghiệm Truyện Cười cực HOT"; //} //else if(curData == "268") //DIA DIEM AN CHOI //{ // pnlDangKy.Visible = true; // url = "/ThuGian/AnChoi.aspx?lang=" + lang + "&w=" + width; // display = "Trải nghiệm Địa điểm Ăn chơi cực HOT"; //} //else if(curData == "258") //CAM NANG TU VAN //{ // pnlDangKy.Visible = true; // url = "/ThuGian/Sex.aspx?lang=" + lang + "&w=" + width; // display = "Trải nghiệm dịch vụ SEX và Cuộc Sống cực HOT"; //} //else if(curData == "255") //DOC TRUYEN //{ // pnlDangKy.Visible = true; // url = "/ThuGian/DocTruyen.aspx?lang=" + lang + "&w=" + width; // display = "Trải nghiệm dịch vụ Đọc Truyện cực HOT"; //} //else if(curData == "375")//CUNG HOANG DAO //{ // pnlDangKy.Visible = true; // url = "/ThuGian/CungHoangDao.aspx?lang=" + lang + "&w=" + width; // display = "Trải nghiệm dịch vụ Cung hoàng đạo cực HOT"; //} string content = " <a class=\"link-non-orange\" href=\"" + url + "\"><span class=\"orange bold\"> " + AppEnv.CheckLang(display) + " </span></a>"; litContent.Text = content; 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) { lang = Request.QueryString["lang"]; width = ConvertUtility.ToInt32(Request.QueryString["w"]); price = AppEnv.GetSetting("relaxprice"); id = ConvertUtility.ToInt32(Request.QueryString["id"]); telCo = AppEnv.CheckFreeContentTelco(); DataTable dtDetail = TintucController.GetNewsDetailHasCache(id); if (dtDetail != null && dtDetail.Rows.Count > 0) { litName.Text = dtDetail.Rows[0]["Content_Headline"].ToString(); catID = ConvertUtility.ToInt32(dtDetail.Rows[0]["Distribution_ZoneID"]); DataTable catInfo = TintucController.GetCategoryByCatIDHasCache(catID); if (catInfo != null && catInfo.Rows.Count > 0) { catName = catInfo.Rows[0]["Zone_Name"].ToString(); parentCatID = ConvertUtility.ToInt32(catInfo.Rows[0]["Zone_ParentID"]); chitietGiaodich = "Thu gian: " + catInfo.Rows[0]["Zone_Name"] + " -- id: " + id; } int totalrecord = 0; DataTable dtCat = new DataTable(); dtCat = TintucController.GetAllNewsByCategoryHasCache(catID, 8, 1, out totalrecord); if (dtCat != null && dtCat.Rows.Count > 0) { IList <DataRow> contentTop = dtCat.Select().Skip(0).Take(5).ToList(); //IList<DataRow> contentBottom = dtCat.Select().Skip(3).Take(7).ToList(); rptTop.DataSource = contentTop.CopyToDataTable(); rptTop.DataBind(); //rptBottom.DataSource = contentBottom.CopyToDataTable(); //rptBottom.DataBind(); } } switch (parentCatID.ToString()) { case "258": //Cẩm nang tư vấn if (catID == 264) //Sex và cuộc sống { price = ConfigurationSettings.AppSettings.Get("relaxsexprice"); ProductId = "RELAXADVISESEX"; Keyword = "ADVISE_SEX"; } else { price = ConfigurationSettings.AppSettings.Get("relaxtuvanprice"); ProductId = "RELAXADVISEBOOK"; Keyword = "ADVISE_BOOK"; } break; case "121": //Gửi lời yêu thương price = ConfigurationSettings.AppSettings.Get("relaxtuvanprice"); ProductId = "RELAXLOVER"; Keyword = "LOVER"; break; case "268": //Địa điểm ăn chơi price = ConfigurationSettings.AppSettings.Get("relaxanchoiprice"); ProductId = "RELAXPLACE"; Keyword = "PLACE"; break; case "255": //Đọc truyện price = ConfigurationSettings.AppSettings.Get("relaxprice"); //dungnt sua de charge dc ProductId = "LOTOLASTRESULT"; //"RELAXSTORYREAD"; Keyword = "LAST_RESULT"; //"READ"; break; default: price = ConfigurationSettings.AppSettings.Get("relaxprice"); ProductId = "HOROSCOPE"; Keyword = "HOROSCOPE"; break; } if (!Page.IsPostBack) { #region FREE CONTENT if (AppEnv.GetSetting("FreeContent") == "1") { HienThiNoiDung(true, false); return; } #endregion #region OLD if (AppEnv.GetSetting("TestFlag") == "1") { HienThiNoiDung(true, false); } else if (parentCatID.ToString() == "255" && Session["msisdn"] != null && WapController.W4A_Subscriber_IsActive(Session["msisdn"].ToString(), 1)) { HienThiNoiDung(true, false); } else { if (Session["msisdn"] != null) { var charging = new Library.VNMCharging.VNMChargingGW(); messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), ProductId, Keyword, price, "D", "RELAX", Request.QueryString["id"]); if (messageReturn == AppEnv.GetSetting("NotEnoughMoney"))//Not Enough Money { messageReturn = AppEnv.VnmChargingOptimizeNotEnoughMoney(Session["msisdn"].ToString(), ProductId, Keyword, price, "D", "RELAX", Request.QueryString["id"], out logPrice); price = logPrice; } if (messageReturn == AppEnv.GetSetting("SystemOverload")) //System Over Load { messageReturn = AppEnv.VnmChargingSystemOverload(Session["msisdn"].ToString(), ProductId, Keyword, price, "D", "RELAX", Request.QueryString["id"]); } if (messageReturn == "1") {// Thanh toán thành công >> trả nội dung HienThiNoiDung(true, true); } else {// Thanh toán không thành công >> thông báo lỗi HienThiNoiDung(false, true); } } else { pnlContentError.Visible = true; litContentError.Text = "Bạn vui lòng lựa chọn kết nối EDGE hay 3G để sử dụng dịch vụ này. Lưu ý, hãy ngắt kết nối wifi bạn nhé"; } } #endregion //catid = ConvertUtility.ToInt32(Request.QueryString["catid"]); DataTable dtOnline = TintucController.GetAllCategoryExeptCatIDHasCache(255, catID); DataTable dtAudio = TintucController.GetCategoryTruyenAudioCache(); rptCateOnline.DataSource = dtOnline; rptCateOnline.DataBind(); rptCateAudio.DataSource = dtAudio; rptCateAudio.DataBind(); } }