protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { DataSet ds = TintucController.GetTruyenAudioHomeCache(); if (ds != null) { DataTable dtMoi = ds.Tables[0]; DataTable dtHot = ds.Tables[1]; rptTruyenMoi.DataSource = dtMoi; rptTruyenMoi.DataBind(); rptTruyenHot.DataSource = dtHot; rptTruyenHot.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(); } }