예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            width = Request.QueryString["w"];
            lang  = ConvertUtility.ToInt32(Request.QueryString["lang"]);
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);
            if (!IsPostBack)
            {
                //Detail
                DataTable dtDetail = VideoController.GetVideoDetailByIDHasCache(Session["telco"].ToString(), id);
                //end detail
                if (dtDetail.Rows.Count > 0)
                {
                    lnkCateChannel.NavigateUrl = UrlProcess.GetVideoCategoryUrlNew(lang.ToString(), width, dtDetail.Rows[0]["W_VCategoryID"].ToString());
                    lnkHomeChannel.NavigateUrl = UrlProcess.GetVideoHomeUrlNew(lang.ToString(), width);

                    if (lang == 1)
                    {
                        litGia.Text         = "(Giá: " + AppEnv.GetSetting("videoprice") + " đ/video)";
                        lnkCateChannel.Text = dtDetail.Rows[0]["Title_Unicode"].ToString().ToUpper();
                    }
                    else
                    {
                        litGia.Text         = "(Gia: " + AppEnv.GetSetting("videoprice") + " d/video)";
                        lnkCateChannel.Text = dtDetail.Rows[0]["Title"].ToString().ToUpper();
                    }

                    rptDetail.DataSource = dtDetail;
                    rptDetail.DataBind();

                    int       totaltopdownload = 0;
                    DataTable dtltopdownload   = VideoController.GetAllVideoByCategoryAndDisplayType(Session["telco"].ToString(), ConvertUtility.ToInt32(dtDetail.Rows[0]["W_VCategoryID"]), id, 0, pagesize, tpage, out totaltopdownload);
                    foreach (DataRow iRow in dtltopdownload.Rows)
                    {
                        if ((int)iRow["W_VItemID"] == id)
                        {
                            iRow.Delete();
                            dtltopdownload.AcceptChanges();
                            break;
                        }
                    }

                    if (dtltopdownload.Rows.Count > 0)
                    {
                        rptVideoCungLoai.DataSource     = dtltopdownload;
                        rptVideoCungLoai.ItemDataBound += rptVideoCungLoai_ItemDataBound;
                        rptVideoCungLoai.DataBind();
                    }
                }
            }
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            width = Request.QueryString["w"];
            lang  = ConvertUtility.ToInt32(Request.QueryString["lang"]);
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);

            if (!Page.IsPostBack)
            {
                if (Request.UrlReferrer != null)
                {
                    hplBack.NavigateUrl = Request.UrlReferrer.ToString();
                }

                //Detail
                DataTable dtDetail = VideoController.GetVideoDetailByIDHasCache(Session["telco"].ToString(), id);
                if (dtDetail != null && dtDetail.Rows.Count > 0)
                {
                    rptDetail.DataSource = dtDetail;
                    rptDetail.DataBind();

                    Description = dtDetail.Rows[0]["VDescription_Unicode"].ToString();

                    int       totaltopdownload = 0;
                    DataTable dtltopdownload   = VideoController.GetAllVideoByCategoryAndDisplayType(Session["telco"].ToString(), ConvertUtility.ToInt32(dtDetail.Rows[0]["W_VCategoryID"]), id, 0, 6, 1, out totaltopdownload);
                    foreach (DataRow iRow in dtltopdownload.Rows)
                    {
                        if ((int)iRow["W_VItemID"] == id)
                        {
                            iRow.Delete();
                            dtltopdownload.AcceptChanges();
                            break;
                        }
                    }

                    rptCungTheLoai.DataSource = dtltopdownload;
                    rptCungTheLoai.DataBind();

                    lblDownPrice.Text = AppEnv.GetSetting("TaiMacDinh") + "đ";
                    lblViewPrice.Text = AppEnv.GetSetting("XemMacDinh") + "đ";
                }
            }
        }
예제 #3
0
        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();
                }
            }
        }
예제 #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     preurl = ConfigurationSettings.AppSettings.Get("urldata");
     width  = Request.QueryString["w"];
     lang   = ConvertUtility.ToInt32(Request.QueryString["lang"]);
     id     = ConvertUtility.ToInt32(Request.QueryString["id"]);
     if (!IsPostBack)
     {
         if (ConvertUtility.ToInt32(Request.QueryString["g"]) == 1)
         {
             txtSoDienThoaiTang.Focus();
         }
         //Detail
         DataTable dtDetail = VideoController.GetVideoDetailByIDHasCache(Session["telco"].ToString(), id);
         //end detail
         if (dtDetail.Rows.Count > 0)
         {
             price = ConfigurationSettings.AppSettings.Get("videoprice");
             lnkCateChannel.NavigateUrl = UrlProcess.GetVideoCategoryUrl(lang.ToString(), width, dtDetail.Rows[0]["W_VCategoryID"].ToString());
             lnkHomeChannel.NavigateUrl = UrlProcess.GetVideoHomeUrl(lang.ToString(), width);
             if (lang == 1)
             {
                 lnkCateChannel.Text = dtDetail.Rows[0]["Title_Unicode"].ToString().ToUpper();
                 ltrTenAnh.Text      = dtDetail.Rows[0]["VTitle_Unicode"].ToString();
                 ltrLuottai.Text     = Resources.Resource.wLuotTai + dtDetail.Rows[0]["Download"].ToString().ToUpper();
                 //ltrGiaTai.Text = Resources.Resource.wGiaTai + price + Resources.Resource.wDonViTien;
                 //ltrGiaTang.Text = Resources.Resource.wGiaTang + price + Resources.Resource.wDonViTien;
                 lnkTai.Text         = "<span class=\"bold\">" + Resources.Resource.wTaiVe + "</span>";
                 ltrGuiTang.Text     = Resources.Resource.wGuiTang;
                 ltrCungTheLoai.Text = Resources.Resource.vVideoCungTheLoai;
             }
             else
             {
                 lnkCateChannel.Text = dtDetail.Rows[0]["Title"].ToString().ToUpper();
                 ltrTenAnh.Text      = dtDetail.Rows[0]["VTitle"].ToString();
                 ltrLuottai.Text     = Resources.Resource.wLuotTai_KD + dtDetail.Rows[0]["Download"].ToString().ToUpper();
                 //ltrGiaTai.Text = Resources.Resource.wGiaTai_KD + price + Resources.Resource.wDonViTien_KD;
                 //ltrGiaTang.Text = Resources.Resource.wGiaTang_KD + price + Resources.Resource.wDonViTien_KD;
                 lnkTai.Text         = "<span class=\"bold\">" + Resources.Resource.wTaiVe_KD + "</span>";
                 ltrGuiTang.Text     = Resources.Resource.wGuiTang_KD;
                 ltrCungTheLoai.Text = Resources.Resource.vVideoCungTheLoai_KD;
             }
             lnkTai.NavigateUrl = "../Download.aspx?id=" + dtDetail.Rows[0]["W_VItemID"].ToString() + "&lang=" + lang + "&w=" + width;
             lnkXem.NavigateUrl = "../View.aspx?id=" + dtDetail.Rows[0]["W_VItemID"].ToString() + "&lang=" + lang + "&w=" + width;
             WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver();
             ws.GenerateAvatarThumnail(dtDetail.Rows[0]["VThumnail"].ToString(), 120, 90);
             imgDetail.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(dtDetail.Rows[0]["VThumnail"].ToString(), 120, 90).Replace("~", "");
             //imgDetail.ImageUrl = preurl + dtDetail.Rows[0]["VThumnail"].ToString().Replace("~", "");
             //Other
             if (!string.IsNullOrEmpty(Request.QueryString["tpage"]))
             {
                 tpage = ConvertUtility.ToInt32(Request.QueryString["tpage"]);
             }
             int       totaltopdownload = 0;
             DataTable dtltopdownload   = VideoController.GetAllVideoByCategoryAndDisplayType(Session["telco"].ToString(), ConvertUtility.ToInt32(dtDetail.Rows[0]["W_VCategoryID"]), id, 0, pagesize, tpage, out totaltopdownload);
             foreach (DataRow iRow in dtltopdownload.Rows)
             {
                 if ((int)iRow["W_VItemID"] == id)
                 {
                     iRow.Delete();
                     dtltopdownload.AcceptChanges();
                     break;
                 }
             }
             rptCungTheLoai.DataSource     = dtltopdownload;
             rptCungTheLoai.ItemDataBound += new RepeaterItemEventHandler(rptTopdownload_ItemDataBound);
             rptCungTheLoai.DataBind();
             Paging1.totalrecord  = totaltopdownload;
             Paging1.pagesize     = pagesize;
             Paging1.numberpage   = pagenumber;
             Paging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&id=" + Request.QueryString["id"];
             Paging1.queryparam   = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&id=" + Request.QueryString["id"] + "&tpage=";
             //end lastest
         }
     }
 }