protected void Page_Load(object sender, EventArgs e) { if (this.Request.QueryString["aid"] != null) { aid = this.Request.QueryString["aid"].ToString(); } this.txtcid.Value = cid; this.txtaid.Value = aid; this.lb_type.Text = "手摄一族"; StringBuilder stringBuilder = new StringBuilder(); JpPhotography jpPhotography = new JpPhotography(); DataTable dt = jpPhotography.Getdocbyid(Convert.ToInt32(aid)); if (dt.Rows.Count > 0) { this.lb_time.Text = Convert.ToDateTime(dt.Rows[0]["hy_addtime"].ToString()).ToString("yyyy年MM月dd日"); this.lb_title.Text = dt.Rows[0]["hy_content"].ToString(); HyFileatt hyFileatt = new HyFileatt(); DataTable dt_img = hyFileatt.Getdocs(dt.Rows[0]["docid"].ToString(), 8); for (int i = 0; i < dt_img.Rows.Count; i++) { imgPath += "<img src=\"" + dt_img.Rows[i]["hy_filepath"].ToString() + "\" width=\"640\" height=\"340\">"; } this.lb_article.Text = dt.Rows[0]["hy_content"].ToString(); } }
protected void Page_Load(object sender, EventArgs e) { string strFatherid = ""; if (this.Request.QueryString["strFatherid"] != null) { strFatherid = this.Request.QueryString["strFatherid"].ToString(); } HyFileatt hyFileatt = new HyFileatt(); DataTable dt = hyFileatt.Getdocs(strFatherid,6); string json = JsonConvert.SerializeObject(dt); Response.Write(json); }
//加载图片 protected string LoadingPictures() { string ls_return = ""; //预览图片 TPortalClass.HyFileatt HyFileatt = new TPortalClass.HyFileatt(); DataTable dt = HyFileatt.Getdocs(this.txtdocid.Value,8); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { string ls_id = dt.Rows[i]["id"].ToString(); string ls_name = dt.Rows[i]["hy_filename"].ToString(); string ls_url = dt.Rows[i]["hy_filepath"].ToString(); //string ls_url2 = dt.Rows[i]["hy_filepath"].ToString().Replace("thumbnail", "original"); ls_return += "<table width=\"130\" border=\"0\" cellpadding=\"0\" cellspacing=\"2\" bgcolor=\"#FFFFFF\""; ls_return += "style=\"float: left; margin: 2px 2px 2px 2px;font-size: 12px;\">"; ls_return += "<tr><td align=\"left\" height=\"140\" valign=\"top\">"; //ls_return += "<div class=\"pic01\"><a href='" + ls_url2 + "' onclick=\"szfm('" + ls_id + "');\" target='_blank'>"; ls_return += "<div class=\"pic01\"><a href='#' onclick=\"szfm('" + ls_id + "');\" >"; ls_return += "<img src=\"" + ls_url + "\" border=\"0\" width=\"126\" height=\"126\" alt=\"" + ls_name + "(点击设置封面)\" /></a></div>"; ls_return += "<div class=\"photo_fm\">"; if (HyFileatt.IsExistByID(ls_id)) { ls_return += "<img src=\"/images/fm.png\" alt='' />"; } ls_return += "</div>"; ls_return += "<div class=\"option01\"><span style='float:left;text-align:left;'>"; if (ls_name.Length > 6) { ls_return += " " + ls_name.Substring(0, 6) + "..."; } else { ls_return += " " + ls_name; } ls_return += "</span>"; ls_return += "<span style='float:right;text-align:right;'><a href='#' onclick=\"DelInfo('" + ls_id + "');\">【删除】</a></span>"; ls_return += "</div>"; ls_return += "</td>"; ls_return += "</tr>"; ls_return += "</table>"; } } return ls_return; }
protected void Page_Load(object sender, EventArgs e) { if (this.txtUid.Value != "") { this.Session["hyuid"] = this.txtUid.Value; } if (this.Request.QueryString["id"] != null) { try { id = Convert.ToInt32(this.Request.QueryString["id"].ToString()); } catch { id = 1; } } this.txtaid.Value = id.ToString(); this.txtcid.Value = "008"; this.lb_type.Text = "金点活动"; StringBuilder stringBuilder = new StringBuilder(); JpActivity jpActivity = new JpActivity(); DataTable dt = jpActivity.Getdocbyid(id); HyFileatt HyFileatt = new HyFileatt(); if (dt.Rows.Count > 0) { this.lb_time.Text = Convert.ToDateTime(dt.Rows[0]["hy_addtime"].ToString()).ToString("yyyy年MM月dd日"); this.lb_title.Text = dt.Rows[0]["hy_bt"].ToString(); DataTable dt_img = HyFileatt.Getdocs(dt.Rows[0]["docid"].ToString(), 1); if (dt_img.Rows.Count > 0) { imgPath = dt_img.Rows[0]["hy_filepath"].ToString(); } this.lb_article.Text = dt.Rows[0]["hy_content"].ToString(); } }