示例#1
0
        protected void rptlstCategory_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }
            DataRowView curData = (DataRowView)e.Item.DataItem;
            HyperLink   lnkTai  = (HyperLink)e.Item.FindControl("lnkTai");

            if (lnkTai != null)
            {
                if (MobileUtils.CheckValidModel(curData["ModelSupport"].ToString(), _info))
                {
                    lnkTai.Text        = "<img alt=\"\" src=\"/imagesnew/icon/down.png\" /> " + AppEnv.CheckLang("Tải");
                    lnkTai.NavigateUrl = UrlProcess.GetGameDownloadUrlNew(lang.ToString(), width, curData["W_GameItemID"].ToString(), hotro);
                }
                else
                {
                    lnkTai.NavigateUrl = "";
                    lnkTai.Text        = AppEnv.CheckLang("Dòng máy không hỗ trợ");
                }
            }

            if (e.Item.ItemIndex < pagesize - 1)
            {
                Literal lit = (Literal)e.Item.FindControl("litBlank");
                if (lit != null)
                {
                    lit.Text = "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"f5f5f5\"><tr><td align=\"left\" valign=\"top\"><img src=\"/imagesnew/blank.gif\" width=\"5\" height=\"9\" /></td></tr></table>";
                }
            }
        }
示例#2
0
        protected void rptDetail_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }
            DataRowView curData = (DataRowView)e.Item.DataItem;

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

            if (lnkTai != null)
            {
                if (MobileUtils.CheckValidModel(curData["ModelSupport"].ToString(), _info))
                {
                    lnkTai.Text        = "<img alt=\"\" src=\"/imagesnew/icon/down.png\" /> " + AppEnv.CheckLang("Tải");
                    lnkTai.NavigateUrl = UrlProcess.GetGameDownloadUrlNew(lang.ToString(), width, curData["W_GameItemID"].ToString(), hotro);
                }
                else
                {
                    lnkTai.NavigateUrl = "";
                    lnkTai.Text        = AppEnv.CheckLang("Dòng máy không hỗ trợ");
                }
            }
        }
示例#3
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("~", "");
        }