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("~", ""); }