Пример #1
0
        protected void rptlstCategory_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }
            DataRowView curData      = (DataRowView)e.Item.DataItem;
            HyperLink   lnkTitle     = (HyperLink)e.Item.FindControl("lnkTitle");
            Label       lblCreatedOn = (Label)e.Item.FindControl("lblCreatedOn");
            Image       imgAvatar    = (Image)e.Item.FindControl("imgAvatar");

            if (lang == 1)
            {
                lnkTitle.Text = "<span class=\"bold\">" + curData["Content_Headline"].ToString() + "</span>";
            }
            else
            {
                lnkTitle.Text = "<span class=\"bold\">" + curData["Content_HeadlineKD"].ToString() + "</span>";
            }
            if (string.IsNullOrEmpty(ConvertUtility.ToString(curData["Content_Avatar"])))
            {
                imgAvatar.ImageUrl = "/Images/icon_app52.png";
            }
            else
            {
                WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver();
                ws.GenerateAvatarThumnail(curData["Content_Avatar"].ToString(), 60, 60);
                imgAvatar.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(curData["Content_Avatar"].ToString(), 60, 60).Replace("~", "");
            }
            lnkTitle.NavigateUrl = UrlProcess.GetMusicNewsDetailUrl(lang.ToString(), width, curData["Distribution_ID"].ToString());
            lblCreatedOn.Text    = ConvertUtility.ToDateTime(curData["Content_CreateDate"]).ToString("dd/MM/yyyy");
        }
Пример #2
0
        protected void rptNewLastest_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }
            DataRowView curData      = (DataRowView)e.Item.DataItem;
            HyperLink   lnkTitlelist = (HyperLink)e.Item.FindControl("lnkTitlelist");
            Image       imglist      = (Image)e.Item.FindControl("imglist");
            Panel       pn           = (Panel)e.Item.FindControl("othernews");

            if (e.Item.ItemIndex == 0)
            {
                if (lang == 1)
                {
                    lnkTitle.Text = curData["Content_Headline"].ToString();
                    //ltrTeaser.Text = curData["Content_Teaser"].ToString();
                }
                else
                {
                    lnkTitle.Text = curData["Content_HeadlineKD"].ToString();
                    //ltrTeaser.Text = curData["Content_TeaserKD"].ToString();
                }
                //Ảnh đại diện
                if (string.IsNullOrEmpty(ConvertUtility.ToString(curData["Content_Avatar"])))
                {
                    imgAvatar.ImageUrl = "/Images/icon_app52.png";
                }
                else
                {
                    WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver();
                    ws.GenerateAvatarThumnail(curData["Content_Avatar"].ToString(), 51, 51);
                    imgAvatar.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(curData["Content_Avatar"].ToString(), 51, 51).Replace("~", "");
                }

                //lnkTitle.NavigateUrl = UrlProcess.GetNewsDetailUrl(lang.ToString(), "detail", width, curData["Distribution_ID"].ToString());
                lnkTitle.NavigateUrl = UrlProcess.TinTucChiTiet(ConvertUtility.ToInt32(curData["Distribution_ID"].ToString()), curData["Content_Headline"].ToString());

                ltrTime.Text = ConvertUtility.ToDateTime(curData["Content_CreateDate"]).ToString("dd/MM/yyyy HH:mm");
                pn.Visible   = false;
            }
            else
            {
                if (lang == 1)
                {
                    lnkTitlelist.Text = curData["Content_Headline"].ToString();
                }
                else
                {
                    lnkTitlelist.Text = curData["Content_HeadlineKD"].ToString();
                }


                //lnkTitlelist.NavigateUrl = UrlProcess.GetNewsDetailUrl(lang.ToString(), "detail", width, curData["Distribution_ID"].ToString());
                lnkTitlelist.NavigateUrl = UrlProcess.TinTucChiTiet(ConvertUtility.ToInt32(curData["Distribution_ID"].ToString()), curData["Content_Headline"].ToString());


                pn.Visible = true;
            }
        }
Пример #3
0
        protected void rptResult_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }
            DataRowView curData   = (DataRowView)e.Item.DataItem;
            HyperLink   lnkTitle  = (HyperLink)e.Item.FindControl("lnkTitle");
            Image       imgAvatar = (Image)e.Item.FindControl("imgAvatar");

            if (lang == 1)
            {
                lnkTitle.Text = curData["Content_Headline"].ToString();
            }
            else
            {
                lnkTitle.Text = curData["Content_HeadlineKD"].ToString();
            }
            if (string.IsNullOrEmpty(ConvertUtility.ToString(curData["Content_Avatar"])))
            {
                imgAvatar.ImageUrl = "/Images/vnm_vnmicon.jpg";
            }
            else
            {
                WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver();
                ws.GenerateAvatarThumnail(curData["Content_Avatar"].ToString(), 60, 60);
                imgAvatar.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(curData["Content_Avatar"].ToString(), 60, 60).Replace("~", "");
            }
            lnkTitle.NavigateUrl = UrlProcess.GetNewsDetailUrl(lang.ToString(), "detail", width, curData["Distribution_ID"].ToString());
        }
Пример #4
0
        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 rptlstResult_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }

            if (e.Item.ItemIndex < pagesize - 1)
            {
                Literal lit = (Literal)e.Item.FindControl("litBlank");
                lit.Text = "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#FFFFFF\"><tr><td align=\"left\" valign=\"top\"><img alt=\"\" src=\"/imagesnew/blank.gif\" width=\"5\" height=\"9\" /></td></tr></table>";
            }

            DataRowView curData = (DataRowView)e.Item.DataItem;

            System.Web.UI.WebControls.Image imgAvatar = (Image)e.Item.FindControl("imgAvatar");
            HyperLink lnkAvatar  = (HyperLink)e.Item.FindControl("lnkAvatar");
            HyperLink lnkTenAnh  = (HyperLink)e.Item.FindControl("lnkTenAnh");
            Literal   ltrTheloai = (Literal)e.Item.FindControl("ltrTheloai");
            Literal   ltrLuottai = (Literal)e.Item.FindControl("ltrLuottai");
            HyperLink lnkTai     = (HyperLink)e.Item.FindControl("lnkTai");

            if (lang == 1)
            {
                lnkTenAnh.Text  = curData["WTitle_Unicode"].ToString();
                ltrTheloai.Text = Resources.Resource.wTheLoai + curData["Web_Name"];
                ltrLuottai.Text = Resources.Resource.wLuotTai + curData["Download"];
                lnkTai.Text     = Resources.Resource.wTai;
            }
            else
            {
                lnkTenAnh.Text  = curData["WTitle"].ToString();
                ltrTheloai.Text = Resources.Resource.wTheLoai_KD + UnicodeUtility.UnicodeToKoDau(curData["Web_Name"].ToString());
                ltrLuottai.Text = Resources.Resource.wLuotTai_KD + curData["Download"];
                lnkTai.Text     = Resources.Resource.wTai_KD;
            }
            lnkAvatar.NavigateUrl = lnkTenAnh.NavigateUrl = UrlProcess.GetWallpaperDetailUrlNew(lang.ToString(), "detail", width, curData["W_WItemID"].ToString());
            lnkTai.NavigateUrl    = UrlProcess.GetWallpaperDownloadUrlNew(lang.ToString(), width, curData["W_WItemID"].ToString(), curData["W_CategoryID"].ToString());
            if (curData["WThumnail"].ToString().LastIndexOf(".gif") > 0)
            {
                WapXzone_VNM.CreateGIFAvatar.Ws_Process ws = new WapXzone_VNM.CreateGIFAvatar.Ws_Process();
                imgAvatar.ImageUrl = preurl + ws.GetAvatarGif(curData["WThumnail"].ToString().Replace("~", "").Replace("thumb_", ""), 82, 66);
            }
            else
            {
                WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver();
                ws.GenerateAvatarThumnail(curData["WThumnail"].ToString(), 82, 66);
                imgAvatar.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(curData["WThumnail"].ToString(), 82, 66).Replace("~", "");
            }
        }
Пример #6
0
        protected void rptlastest_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }
            DataRowView curData = (DataRowView)e.Item.DataItem;

            System.Web.UI.WebControls.Image imgAvatar = (System.Web.UI.WebControls.Image)e.Item.FindControl("imgAvatar");
            HyperLink lnkAvatar  = (HyperLink)e.Item.FindControl("lnkAvatar");
            HyperLink lnkTenAnh  = (HyperLink)e.Item.FindControl("lnkTenAnh");
            Literal   ltrTheloai = (Literal)e.Item.FindControl("ltrTheloai");
            Literal   ltrLuottai = (Literal)e.Item.FindControl("ltrLuottai");
            HyperLink lnkTai     = (HyperLink)e.Item.FindControl("lnkTai");
            HyperLink lnkTang    = (HyperLink)e.Item.FindControl("lnkTang");

            if (lang == 1)
            {
                lnkTenAnh.Text  = "<span class=\"bold\">" + curData["WTitle_Unicode"].ToString() + "</span>";
                ltrTheloai.Text = Resources.Resource.wTheLoai + curData["Web_Name"].ToString();
                ltrLuottai.Text = Resources.Resource.wLuotTai + curData["Download"].ToString();
                lnkTai.Text     = "<span class=\"orange bold\">" + Resources.Resource.wTai + "</span>";
                lnkTang.Text    = "<span class=\"orange bold\">" + Resources.Resource.wTang + "</span>";
            }
            else
            {
                lnkTenAnh.Text  = "<span class=\"bold\">" + curData["WTitle"].ToString() + "</span>";
                ltrTheloai.Text = Resources.Resource.wTheLoai_KD + UnicodeUtility.UnicodeToKoDau(curData["Web_Name"].ToString());
                ltrLuottai.Text = Resources.Resource.wLuotTai_KD + curData["Download"].ToString();
                lnkTai.Text     = "<span class=\"orange bold\">" + Resources.Resource.wTai_KD + "</span>";
                lnkTang.Text    = "<span class=\"orange bold\">" + Resources.Resource.wTang_KD + "</span>";
            }
            lnkAvatar.NavigateUrl = lnkTenAnh.NavigateUrl = UrlProcess.GetWallpaperDetailUrl(lang.ToString(), "detail", width, curData["W_WItemID"].ToString()) + "&catid=" + curData["W_CategoryID"].ToString();
            //lnkTai.NavigateUrl = "../Download.aspx?id=" + curData["W_WItemID"].ToString() + "&catid=" + curData["W_CategoryID"].ToString() + "&lang=" + lang + "&w=" + width;
            lnkTai.NavigateUrl  = UrlProcess.GetWallpaperDownloadUrl(lang.ToString(), width, curData["W_WItemID"].ToString(), curData["W_CategoryID"].ToString());
            lnkTang.NavigateUrl = UrlProcess.GetWallpaperDetailUrl(lang.ToString(), "detail", width, curData["W_WItemID"].ToString()) + "&g=1&catid=" + curData["W_CategoryID"].ToString();
            if (curData["WThumnail"].ToString().LastIndexOf(".gif") > 0)
            {
                WapXzone_VNM.CreateGIFAvatar.Ws_Process ws = new WapXzone_VNM.CreateGIFAvatar.Ws_Process();
                imgAvatar.ImageUrl = preurl + ws.GetAvatarGif(curData["WThumnail"].ToString().Replace("~", "").Replace("thumb_", ""), 60, 60);
            }
            else
            {
                WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver();
                ws.GenerateAvatarThumnail(curData["WThumnail"].ToString(), 60, 60);
                imgAvatar.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(curData["WThumnail"].ToString(), 60, 60).Replace("~", "");
            }
        }
Пример #7
0
        protected void rptlstCategory_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }
            DataRowView curData    = (DataRowView)e.Item.DataItem;
            Literal     ltrAlbum   = (Literal)e.Item.FindControl("ltrAlbum");
            Literal     ltrAvatar  = (Literal)e.Item.FindControl("ltrAvatar");
            Literal     ltrMota    = (Literal)e.Item.FindControl("ltrMota");
            Literal     ltrLuottai = (Literal)e.Item.FindControl("ltrLuottai");
            Literal     ltrSobai   = (Literal)e.Item.FindControl("ltrSobai");

            if (lang == "1")
            {
                ltrAlbum.Text = "<a href=\"" + UrlProcess.GetMusicByAlbumUrl(lang, width, curData["W_MAlbumID"].ToString()) + "\"><span class=\"bold\">" + curData["AlbumNameUnicode"].ToString() + "</span></a>";
                if (!string.IsNullOrEmpty(curData["DescriptionUnicode"].ToString()))
                {
                    ltrMota.Text = curData["DescriptionUnicode"].ToString() + "<br />";
                }
                ltrLuottai.Text = Resources.Resource.wLuotTai + curData["Download"].ToString();
                ltrSobai.Text   = Resources.Resource.wSoBai + curData["ItemCount"].ToString();
            }
            else
            {
                ltrAlbum.Text = "<a href=\"" + UrlProcess.GetMusicByAlbumUrl(lang, width, curData["W_MAlbumID"].ToString()) + "\"><span class=\"bold\">" + curData["AlbumName"].ToString() + "</span></a>";
                if (!string.IsNullOrEmpty(curData["Description"].ToString()))
                {
                    ltrMota.Text = curData["Description"].ToString() + "<br />";
                }
                ltrLuottai.Text = Resources.Resource.wLuotTai_KD + curData["Download"].ToString();
                ltrSobai.Text   = Resources.Resource.wSoBai_KD + curData["ItemCount"].ToString();
            }

            if (curData["Avatar"].ToString().LastIndexOf(".gif") > 0)
            {
                WapXzone_VNM.CreateGIFAvatar.Ws_Process ws = new WapXzone_VNM.CreateGIFAvatar.Ws_Process();
                ltrAvatar.Text = "<a href=\"" + UrlProcess.GetMusicByAlbumUrl(lang, width, curData["W_MAlbumID"].ToString()) + "\"><img class=\"thumb-b\" src=\"" + preurl + ws.GetAvatarGif(curData["Avatar"].ToString().Replace("~", "").Replace("thumb_", ""), 60, 60) + "\" alt=\"thumb\"></a>";
            }
            else
            {
                WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver();
                ws.GenerateAvatarThumnail(curData["Avatar"].ToString(), 60, 60);
                ltrAvatar.Text = "<a href=\"" + UrlProcess.GetMusicByAlbumUrl(lang, width, curData["W_MAlbumID"].ToString()) + "\"><img class=\"thumb-b\" src=\"" + preurl + MultimediaUtility.GetAvatarThumnail(curData["Avatar"].ToString(), 60, 60).Replace("~", "") + "\" alt=\"thumb\"></a>";
            }
        }
Пример #8
0
        protected void rptVideo_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }
            DataRowView curData = (DataRowView)e.Item.DataItem;

            System.Web.UI.WebControls.Image imgAvatar = (System.Web.UI.WebControls.Image)e.Item.FindControl("imgAvatar");
            HyperLink lnkAvatar  = (HyperLink)e.Item.FindControl("lnkAvatar");
            HyperLink lnkTenAnh  = (HyperLink)e.Item.FindControl("lnkTenAnh");
            Literal   ltrTheloai = (Literal)e.Item.FindControl("ltrTheloai");
            Literal   ltrLuottai = (Literal)e.Item.FindControl("ltrLuottai");
            HyperLink lnkTai     = (HyperLink)e.Item.FindControl("lnkTai");
            HyperLink lnkXem     = (HyperLink)e.Item.FindControl("lnkXem");
            HyperLink lnkTang    = (HyperLink)e.Item.FindControl("lnkTang");

            if (lang == "1")
            {
                lnkTenAnh.Text  = "<span class=\"black bold\">" + curData["VTitle_Unicode"].ToString() + "</span>";
                ltrTheloai.Text = Resources.Resource.wTheLoai + curData["Web_Name"].ToString();
                ltrLuottai.Text = Resources.Resource.wLuotTai + curData["Download"].ToString();
                lnkTai.Text     = "<span class=\"black bold\">" + Resources.Resource.wTai + "</span>";
                lnkTang.Text    = "<span class=\"black bold\">" + Resources.Resource.wTang + "</span>";
            }
            else
            {
                lnkTenAnh.Text  = "<span class=\"black bold\">" + curData["VTitle"].ToString() + "</span>";
                ltrTheloai.Text = Resources.Resource.wTheLoai_KD + UnicodeUtility.UnicodeToKoDau(curData["Web_Name"].ToString());
                ltrLuottai.Text = Resources.Resource.wLuotTai_KD + curData["Download"].ToString();
                lnkTai.Text     = "<span class=\"black bold\">" + Resources.Resource.wTai_KD + "</span>";
                lnkTang.Text    = "<span class=\"black bold\">" + Resources.Resource.wTang_KD + "</span>";
            }
            lnkAvatar.NavigateUrl = lnkTenAnh.NavigateUrl = UrlProcess.GetVideoDetailUrl(lang.ToString(), "detail", width, curData["W_VItemID"].ToString());
            lnkTai.NavigateUrl    = "../../Video/Download.aspx?id=" + curData["W_VItemID"].ToString() + "&lang=" + lang + "&w=" + width;
            lnkXem.NavigateUrl    = "../../Video/View.aspx?id=" + curData["W_VItemID"].ToString() + "&lang=" + lang + "&w=" + width;
            lnkTang.NavigateUrl   = UrlProcess.GetVideoDetailUrl(lang.ToString(), "detail", width, curData["W_VItemID"].ToString()) + "&g=1";
            WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver();
            ws.GenerateAvatarThumnail(curData["VThumnail"].ToString(), 60, 45);
            imgAvatar.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(curData["VThumnail"].ToString(), 60, 45).Replace("~", "");
            //imgAvatar.ImageUrl = preurl + curData["VThumnail"].ToString().Replace("~", "");
        }
Пример #9
0
        protected void rptlstCategory_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }

            if (e.Item.ItemIndex < 2)
            {
                Literal litBlank = (Literal)e.Item.FindControl("litBlank");
                litBlank.Text = "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#FFFFFF\"><tr><td align=\"left\" valign=\"top\"><img alt=\"\" src=\"/imagesnew/blank.gif\" width=\"5\" height=\"9\" /></td></tr></table>";
            }

            DataRowView curData    = (DataRowView)e.Item.DataItem;
            Image       imgAvatar  = (Image)e.Item.FindControl("imgAvatar");
            HyperLink   lnkAvatar  = (HyperLink)e.Item.FindControl("lnkAvatar");
            HyperLink   lnkTenAnh  = (HyperLink)e.Item.FindControl("lnkTenAnh");
            Literal     ltrTheloai = (Literal)e.Item.FindControl("ltrTheloai");

            HyperLink lnkTai = (HyperLink)e.Item.FindControl("lnkTai");
            HyperLink lnkXem = (HyperLink)e.Item.FindControl("lnkXem");

            if (lang == 1)
            {
                lnkTenAnh.Text  = curData["VTitle_Unicode"].ToString();
                ltrTheloai.Text = Resources.Resource.wTheLoai + curData["Web_Name"];
                lnkTai.Text     = Resources.Resource.wTai;
            }
            else
            {
                lnkTenAnh.Text  = curData["VTitle"].ToString();
                ltrTheloai.Text = Resources.Resource.wTheLoai_KD + UnicodeUtility.UnicodeToKoDau(curData["Web_Name"].ToString());
                lnkTai.Text     = Resources.Resource.wTai_KD;
            }
            lnkAvatar.NavigateUrl = lnkTenAnh.NavigateUrl = UrlProcess.GetVideoDetailUrlNew(lang.ToString(), "detail", width, curData["W_VItemID"].ToString());
            lnkTai.NavigateUrl    = "../DownloadNew.aspx?id=" + curData["W_VItemID"].ToString() + "&lang=" + lang + "&w=" + width;
            lnkXem.NavigateUrl    = "../ViewNew.aspx?id=" + curData["W_VItemID"].ToString() + "&lang=" + lang + "&w=" + width;
            WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver();
            ws.GenerateAvatarThumnail(curData["VThumnail"].ToString(), 82, 66);
            imgAvatar.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(curData["VThumnail"].ToString(), 82, 66).Replace("~", "");
        }
Пример #10
0
        protected void rptlastest_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }
            DataRowView curData = (DataRowView)e.Item.DataItem;

            System.Web.UI.WebControls.Image imgAvatar = (System.Web.UI.WebControls.Image)e.Item.FindControl("imgAvatar");
            HyperLink lnkAvatar  = (HyperLink)e.Item.FindControl("lnkAvatar");
            HyperLink lnkTenAnh  = (HyperLink)e.Item.FindControl("lnkTenAnh");
            Literal   ltrTheloai = (Literal)e.Item.FindControl("ltrTheloai");
            Literal   ltrLuottai = (Literal)e.Item.FindControl("ltrLuottai");
            HyperLink lnkTai     = (HyperLink)e.Item.FindControl("lnkTai");
            HyperLink lnkTang    = (HyperLink)e.Item.FindControl("lnkTang");
            string    sGioiThieu;

            if (lang == 1)
            {
                lnkTenAnh.Text  = "<span class=\"bold\">" + curData["AppNameUnicode"].ToString() + "</span>";
                ltrTheloai.Text = Resources.Resource.wTheLoai + curData["Web_Name"].ToString();
                sGioiThieu      = curData["DescriptionUnicode"].ToString();
                if (sGioiThieu.Length > 120)
                {
                    sGioiThieu = sGioiThieu.Substring(0, sGioiThieu.LastIndexOf(" ", 110)) + "...";
                }
                ltrLuottai.Text = Resources.Resource.wGioiThieu + sGioiThieu;
                lnkTai.Text     = "<span class=\"orange bold\">" + Resources.Resource.wTai + "</span>";
                lnkTang.Text    = "<span class=\"orange bold\">" + Resources.Resource.wTang + "</span>";
            }
            else
            {
                lnkTenAnh.Text  = "<span class=\"bold\">" + curData["AppName"].ToString() + "</span>";
                ltrTheloai.Text = Resources.Resource.wTheLoai_KD + UnicodeUtility.UnicodeToKoDau(curData["Web_Name"].ToString());
                sGioiThieu      = curData["Description"].ToString();
                if (sGioiThieu.Length > 120)
                {
                    sGioiThieu = sGioiThieu.Substring(0, sGioiThieu.LastIndexOf(" ", 110)) + "...";
                }
                ltrLuottai.Text = Resources.Resource.wGioiThieu_KD + sGioiThieu;
                lnkTai.Text     = "<span class=\"orange bold\">" + Resources.Resource.wTai_KD + "</span>";
                lnkTang.Text    = "<span class=\"orange bold\">" + Resources.Resource.wTang_KD + "</span>";
            }
            lnkTang.NavigateUrl = UrlProcess.GetAppDetailUrl(lang.ToString(), "detail", width, curData["W_AppItemID"].ToString(), hotro.ToString()) + "&g=1";

            if (MobileUtils.CheckValidModel(curData["ModelSupport"].ToString(), _info))
            {
                //lnkTai.NavigateUrl = "../Download.aspx?id=" + curData["W_AppItemID"].ToString() + "&lang=" + lang + "&w=" + width;
                lnkTai.NavigateUrl = UrlProcess.GetAppDownloadUrl(lang.ToString(), width, curData["W_AppItemID"].ToString(), hotro.ToString());
            }
            else
            {
                lnkTai.NavigateUrl = "";
                if (lang == 1)
                {
                    lnkTai.Text = Resources.Resource.wKhongHoTro;
                }
                else
                {
                    lnkTai.Text = Resources.Resource.wKhongHoTro_KD;
                }
            }
            lnkAvatar.NavigateUrl = lnkTenAnh.NavigateUrl = UrlProcess.GetAppDetailUrl(lang.ToString(), "detail", width, curData["W_AppItemID"].ToString(), hotro.ToString());
            WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver();
            ws.GenerateAvatarThumnail(curData["Avatar"].ToString(), 60, 70);
            imgAvatar.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(curData["Avatar"].ToString(), 60, 70).Replace("~", "");
            //imgAvatar.ImageUrl = preurl + curData["Avatar"].ToString().Replace("~", "");
        }
Пример #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            preurl  = ConfigurationSettings.AppSettings.Get("urldata");
            width   = Request.QueryString["w"];
            lang    = ConvertUtility.ToInt32(Request.QueryString["lang"]).ToString();
            albumID = ConvertUtility.ToInt32(Request.QueryString["id"]);

            if (!string.IsNullOrEmpty(Request.QueryString["cpage"]))
            {
                curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]);
            }

            if (!IsPostBack)
            {
                //start category list
                int       totalrecord = 0;
                DataTable dtCat       = MusicController.GetItemByAlbumWithPagingHasCache(albumID, Session["telco"].ToString(), curpage, pagesize, 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"] + "&id=" + Request.QueryString["id"];
                Paging1.queryparam   = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&id=" + Request.QueryString["id"] + "&cpage=";

                DataTable albumInfo = MusicController.GetAlbumByIDHasCache(albumID);
                if (albumInfo.Rows.Count > 0)
                {
                    if (albumInfo.Rows[0]["Avatar"].ToString().LastIndexOf(".gif") > 0)
                    {
                        WapXzone_VNM.CreateGIFAvatar.Ws_Process ws = new WapXzone_VNM.CreateGIFAvatar.Ws_Process();
                        albumAvatar.ImageUrl = preurl + ws.GetAvatarGif(albumInfo.Rows[0]["Avatar"].ToString().Replace("~", "").Replace("thumb_", ""), 51, 51);
                    }
                    else
                    {
                        WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver();
                        ws.GenerateAvatarThumnail(albumInfo.Rows[0]["Avatar"].ToString(), 51, 51);
                        albumAvatar.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(albumInfo.Rows[0]["Avatar"].ToString(), 51, 51).Replace("~", "");
                    }
                    if (lang == "1")
                    {
                        ltrAlbumName.Text = "<span class=\"bold\" style=\"color:#B200B2;\">" + albumInfo.Rows[0]["AlbumNameUnicode"].ToString() + "</span>";
                        if (!string.IsNullOrEmpty(albumInfo.Rows[0]["DescriptionUnicode"].ToString()))
                        {
                            ltrMota.Text = albumInfo.Rows[0]["DescriptionUnicode"].ToString() + "<br />";
                        }
                        ltrSobai.Text   = Resources.Resource.wSoBai + totalrecord.ToString();
                        ltrLuottai.Text = Resources.Resource.wLuotTai + albumInfo.Rows[0]["Download"].ToString();
                    }
                    else
                    {
                        ltrAlbumName.Text = "<span class=\"bold\" style=\"color:#B200B2;\">" + albumInfo.Rows[0]["AlbumName"].ToString() + "</span>";
                        if (!string.IsNullOrEmpty(albumInfo.Rows[0]["Description"].ToString()))
                        {
                            ltrMota.Text = albumInfo.Rows[0]["Description"].ToString() + "<br />";
                        }
                        ltrSobai.Text   = Resources.Resource.wSoBai_KD + totalrecord.ToString();
                        ltrLuottai.Text = Resources.Resource.wLuotTai_KD + albumInfo.Rows[0]["Download"].ToString();
                    }
                }
            }
        }
Пример #12
0
        protected void rptlstResult_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }
            DataRowView curData    = (DataRowView)e.Item.DataItem;
            Image       imgAvatar  = (Image)e.Item.FindControl("imgAvatar");
            HyperLink   lnkAvatar  = (HyperLink)e.Item.FindControl("lnkAvatar");
            HyperLink   lnkTenAnh  = (HyperLink)e.Item.FindControl("lnkTenAnh");
            Literal     ltrTheloai = (Literal)e.Item.FindControl("ltrTheloai");
            Literal     ltrLuottai = (Literal)e.Item.FindControl("ltrLuottai");
            HyperLink   lnkTai     = (HyperLink)e.Item.FindControl("lnkTai");

            string sGioiThieu;

            if (lang == 1)
            {
                lnkTenAnh.Text  = curData["GameNameUnicode"].ToString();
                ltrTheloai.Text = Resources.Resource.wTheLoai + curData["Web_Name"];
                sGioiThieu      = curData["DescriptionUnicode"].ToString();
                if (sGioiThieu.Length > 120)
                {
                    sGioiThieu = sGioiThieu.Substring(0, sGioiThieu.LastIndexOf(" ", 110)) + "...";
                }
                ltrLuottai.Text = Resources.Resource.wGioiThieu + sGioiThieu;
                lnkTai.Text     = Resources.Resource.wTai;
            }
            else
            {
                lnkTenAnh.Text  = curData["GameName"].ToString();
                ltrTheloai.Text = Resources.Resource.wTheLoai_KD + UnicodeUtility.UnicodeToKoDau(curData["Web_Name"].ToString());
                sGioiThieu      = curData["Description"].ToString();
                if (sGioiThieu.Length > 120)
                {
                    sGioiThieu = sGioiThieu.Substring(0, sGioiThieu.LastIndexOf(" ", 110)) + "...";
                }
                ltrLuottai.Text = Resources.Resource.wGioiThieu_KD + sGioiThieu;
                lnkTai.Text     = Resources.Resource.wTai_KD;
            }

            if (MobileUtils.CheckValidModel(curData["ModelSupport"].ToString(), _info))
            {
                lnkTai.NavigateUrl = UrlProcess.GetGameDownloadUrlNew(lang.ToString(), width, curData["W_GameItemID"].ToString(), hotro.ToString());
                validGame         += 1;
            }
            else
            {
                lnkTai.NavigateUrl = "";
                if (lang == 1)
                {
                    lnkTai.Text = Resources.Resource.wKhongHoTro;
                }
                else
                {
                    lnkTai.Text = Resources.Resource.wKhongHoTro_KD;
                }
            }
            lnkAvatar.NavigateUrl = lnkTenAnh.NavigateUrl = UrlProcess.GetGameDetailUrlNew(lang.ToString(), "detail", width, curData["W_GameItemID"].ToString(), hotro.ToString());
            WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver();
            ws.GenerateAvatarThumnail(curData["Avatar"].ToString(), 36, 48);
            imgAvatar.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(curData["Avatar"].ToString(), 36, 48).Replace("~", "");
        }
Пример #13
0
        protected void rptlstCategory_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }

            if (e.Item.ItemIndex < pagesize - 1)
            {
                Literal lit = (Literal)e.Item.FindControl("litBlank");
                lit.Text = "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"f5f5f5\"><tr><td align=\"left\" valign=\"top\"><img alt=\"\" src=\"/imagesnew/blank.gif\" width=\"5\" height=\"9\" /></td></tr></table>";
            }

            DataRowView curData    = (DataRowView)e.Item.DataItem;
            Image       imgAvatar  = (Image)e.Item.FindControl("imgAvatar");
            HyperLink   lnkAvatar  = (HyperLink)e.Item.FindControl("lnkAvatar");
            HyperLink   lnkTenAnh  = (HyperLink)e.Item.FindControl("lnkTenAnh");
            Literal     ltrTheloai = (Literal)e.Item.FindControl("ltrTheloai");
            HyperLink   lnkTai     = (HyperLink)e.Item.FindControl("lnkTai");
            string      sGioiThieu;

            if (lang == 1)
            {
                lnkTenAnh.Text  = curData["AppNameUnicode"].ToString();
                ltrTheloai.Text = Resources.Resource.wTheLoai + curData["Web_Name"];
                sGioiThieu      = curData["DescriptionUnicode"].ToString();
                if (sGioiThieu.Length > 120)
                {
                    sGioiThieu = sGioiThieu.Substring(0, sGioiThieu.LastIndexOf(" ", 110)) + "...";
                }
                lnkTai.Text = Resources.Resource.wTai;
            }
            else
            {
                lnkTenAnh.Text  = curData["AppName"].ToString();
                ltrTheloai.Text = Resources.Resource.wTheLoai_KD + UnicodeUtility.UnicodeToKoDau(curData["Web_Name"].ToString());
                sGioiThieu      = curData["Description"].ToString();
                if (sGioiThieu.Length > 120)
                {
                    sGioiThieu = sGioiThieu.Substring(0, sGioiThieu.LastIndexOf(" ", 110)) + "...";
                }
                lnkTai.Text = Resources.Resource.wTai_KD;
            }

            if (MobileUtils.CheckValidModel(curData["ModelSupport"].ToString(), _info))
            {
                lnkTai.NavigateUrl = UrlProcess.GetAppDownloadUrlNew(lang.ToString(), width, curData["W_AppItemID"].ToString(), hotro.ToString());
            }
            else
            {
                lnkTai.NavigateUrl = "";
                if (lang == 1)
                {
                    lnkTai.Text = Resources.Resource.wKhongHoTro;
                }
                else
                {
                    lnkTai.Text = Resources.Resource.wKhongHoTro_KD;
                }
            }
            lnkAvatar.NavigateUrl = lnkTenAnh.NavigateUrl = UrlProcess.GetAppDetailUrlNew(lang.ToString(), "detail", width, curData["W_AppItemID"].ToString(), hotro.ToString());
            WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver();
            ws.GenerateAvatarThumnail(curData["Avatar"].ToString(), 36, 48);
            imgAvatar.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(curData["Avatar"].ToString(), 36, 48).Replace("~", "");
        }
Пример #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            preurl = ConfigurationSettings.AppSettings.Get("urldata");
            width  = Request.QueryString["w"];
            hotro  = ConvertUtility.ToInt32(Request.QueryString["hotro"]).ToString();
            lang   = ConvertUtility.ToInt32(Request.QueryString["lang"]);
            id     = ConvertUtility.ToInt32(Request.QueryString["id"]);
            if (!IsPostBack)
            {
                _info = Get_User_Agent_Info();
                if (ConvertUtility.ToInt32(Request.QueryString["g"]) == 1)
                {
                    txtSoDienThoaiTang.Focus();
                }
                //Detail
                DataTable dtDetail = PhanmemController.GetAPPDetailByIDHasCache(Session["telco"].ToString(), id);
                //end detail
                if (dtDetail.Rows.Count > 0)
                {
                    price = ConfigurationSettings.AppSettings.Get("Appprice");
                    if (dtDetail.Rows[0]["Web_Name"].ToString() == "Vmg_zone")
                    {
                        price = "1000";
                    }
                    lnkCateChannel.NavigateUrl = UrlProcess.GetAppCategoryUrl(lang.ToString(), width, dtDetail.Rows[0]["W_AppCategoryID"].ToString(), hotro);
                    lnkHomeChannel.NavigateUrl = UrlProcess.GetAppHomeUrl(lang.ToString(), width, hotro);
                    if (lang == 1)
                    {
                        lnkHomeChannel.Text = "PHẦN MỀM";
                        lnkCateChannel.Text = dtDetail.Rows[0]["Title_Unicode"].ToString().ToUpper();
                        ltrTenAnh.Text      = dtDetail.Rows[0]["AppNameUnicode"].ToString();
                        ltrNhom.Text        = Resources.Resource.wTheLoai + dtDetail.Rows[0]["Web_Name"].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;
                        ltrGioiThieu.Text   = Resources.Resource.wGioiThieu + dtDetail.Rows[0]["DescriptionUnicode"].ToString();
                        lnkTai.Text         = "<span class=\"bold\">" + Resources.Resource.wTaiVe + "</span>";
                        ltrGuiTang.Text     = Resources.Resource.wGuiTang;
                        ltrCungTheLoai.Text = Resources.Resource.pmPhanMemCungTheLoai;
                    }
                    else
                    {
                        lnkCateChannel.Text = dtDetail.Rows[0]["Title"].ToString().ToUpper();
                        ltrTenAnh.Text      = dtDetail.Rows[0]["AppName"].ToString();
                        ltrNhom.Text        = Resources.Resource.wTheLoai_KD + UnicodeUtility.UnicodeToKoDau(dtDetail.Rows[0]["Web_Name"].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;
                        ltrGioiThieu.Text   = Resources.Resource.wGioiThieu_KD + dtDetail.Rows[0]["Description"].ToString();
                        lnkTai.Text         = "<span class=\"bold\">" + Resources.Resource.wTaiVe_KD + "</span>";
                        ltrGuiTang.Text     = Resources.Resource.wGuiTang_KD;
                        ltrCungTheLoai.Text = Resources.Resource.pmPhanMemCungTheLoai_KD;
                    }

                    if (MobileUtils.CheckValidModel(dtDetail.Rows[0]["ModelSupport"].ToString(), _info))
                    {
                        //lnkTai.NavigateUrl = "../Download.aspx?id=" + dtDetail.Rows[0]["W_AppItemID"].ToString() + "&lang=" + lang + "&w=" + width;
                        lnkTai.NavigateUrl = UrlProcess.GetAppDownloadUrl(lang.ToString(), width, dtDetail.Rows[0]["W_AppItemID"].ToString(), hotro);
                    }
                    else
                    {
                        lnkTai.Visible = false;
                    }
                    WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver();
                    ws.GenerateAvatarThumnail(dtDetail.Rows[0]["Avatar"].ToString(), 120, 141);
                    imgDetail.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(dtDetail.Rows[0]["Avatar"].ToString(), 120, 141).Replace("~", "");
                    //imgDetail.ImageUrl = preurl + dtDetail.Rows[0]["Avatar"].ToString().Replace("~", "");
                    //Other
                    if (!string.IsNullOrEmpty(Request.QueryString["tpage"]))
                    {
                        tpage = ConvertUtility.ToInt32(Request.QueryString["tpage"]);
                    }
                    int       totaltopdownload = 0;
                    DataTable dtltopdownload   = PhanmemController.GetAllAppByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), ConvertUtility.ToInt32(dtDetail.Rows[0]["W_AppCategoryID"]), 0, pagesize, tpage, out totaltopdownload);
                    rptCungTheLoai.DataSource     = dtltopdownload;
                    rptCungTheLoai.ItemDataBound += new RepeaterItemEventHandler(rptCungTheLoai_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=";
                }
            }
        }
Пример #15
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)
            {
                //Detail
                DataTable dtDetail = HinhNenController.GetWallpaperDetailByIDHasCache(Session["telco"].ToString(), id);
                catid = ConvertUtility.ToInt32(dtDetail.Rows[0]["W_CategoryID"]);
                lnkCateChannel.NavigateUrl = UrlProcess.GetWallpaperCategoryUrlNew(lang.ToString(), width, catid.ToString());
                lnkHomeChannel.NavigateUrl = UrlProcess.GetWallpaperHomeUrlNew(lang.ToString(), width);
                //end detail
                if (dtDetail.Rows.Count > 0)
                {
                    if (catid == ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("thuphapid")))
                    {
                        price = ConfigurationSettings.AppSettings.Get("thuphapprice");
                    }
                    else
                    {
                        price = ConfigurationSettings.AppSettings.Get("wallprice");
                    }
                    if (lang == 1)
                    {
                        lnkCateChannel.Text = dtDetail.Rows[0]["Title_Unicode"].ToString().ToUpper();
                        lnkHomeChannel.Text = "HÌNH NỀN";
                        ltrTenAnh.Text      = dtDetail.Rows[0]["WTitle_Unicode"].ToString();
                        ltrGiaTai.Text      = Resources.Resource.wGiaTai + price + Resources.Resource.wDonViTien;
                        lnkTai.Text         = Resources.Resource.wTaiVe;
                        ltrCungTheLoai.Text = Resources.Resource.hnHinhCungTheLoai;
                    }
                    else
                    {
                        lnkCateChannel.Text = dtDetail.Rows[0]["Title"].ToString().ToUpper();
                        ltrTenAnh.Text      = dtDetail.Rows[0]["WTitle"].ToString();
                        ltrGiaTai.Text      = Resources.Resource.wGiaTai_KD + price + Resources.Resource.wDonViTien_KD;
                        lnkTai.Text         = Resources.Resource.wTaiVe_KD;
                        ltrCungTheLoai.Text = Resources.Resource.hnHinhCungTheLoai_KD;
                    }
                    lnkTai.NavigateUrl = UrlProcess.GetWallpaperDownloadUrlNew(lang.ToString(), width, dtDetail.Rows[0]["W_WItemID"].ToString(), catid.ToString());

                    if (dtDetail.Rows[0]["WThumnail"].ToString().LastIndexOf(".gif") > 0)
                    {
                        WapXzone_VNM.CreateGIFAvatar.Ws_Process ws = new WapXzone_VNM.CreateGIFAvatar.Ws_Process();
                        imgDetail.ImageUrl = preurl + ws.GetAvatarGif(dtDetail.Rows[0]["WThumnail"].ToString().Replace("~", "").Replace("thumb_", ""), 159, 127);
                    }
                    else
                    {
                        WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver();
                        ws.GenerateAvatarThumnail(dtDetail.Rows[0]["WThumnail"].ToString(), 159, 127);
                        imgDetail.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(dtDetail.Rows[0]["WThumnail"].ToString(), 159, 127).Replace("~", "");
                    }

                    //Other wallpaper
                    if (!string.IsNullOrEmpty(Request.QueryString["tpage"]))
                    {
                        tpage = ConvertUtility.ToInt32(Request.QueryString["tpage"]);
                    }
                    int       totaltopdownload = 0;
                    DataTable dtltopdownload   = HinhNenController.GetAllWallpaperByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), catid, 0, pagesize, tpage, out totaltopdownload);
                    rptCungTheLoai.DataSource     = dtltopdownload;
                    rptCungTheLoai.ItemDataBound += 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 wallpaper
                }
            }
        }
Пример #16
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
         }
     }
 }