protected void Page_Load(object sender, EventArgs e) { string recuserid=""; if (this.Request.QueryString["recuserid"] != null) { recuserid = this.Request.QueryString["recuserid"].ToString(); //文档ID } //显示上面部分start HyoaClass.Hyoa_jstx_info Hyoa_jstx_info = new HyoaClass.Hyoa_jstx_info(); DataTable dt_getinfo = Hyoa_jstx_info.GetDocBySenduserid_Receiveuserid_top6(this.Session["hyuid"].ToString(), recuserid); string lsinfo = ""; string lscontent = ""; if (dt_getinfo.Rows.Count > 0) { for (int i = dt_getinfo.Rows.Count - 1; i >= 0; i--) { lsinfo += "<br>" + dt_getinfo.Rows[i]["hy_sendinfo_username"].ToString() + " " + dt_getinfo.Rows[i]["hy_sendinfo_date"].ToString(); lscontent = dt_getinfo.Rows[i]["hy_content"].ToString(); lscontent = lscontent.Replace("|#", "<img src='images_main/qq/"); lscontent = lscontent.Replace("gif#", "gif' />"); if (dt_getinfo.Rows[i]["hy_fileattpath"].ToString() != "") lscontent = "<a href='/" + dt_getinfo.Rows[i]["hy_fileattpath"].ToString() + "' target='_blank'><font color=red>" + lscontent + "</font></a>"; lsinfo += "<br>" + lscontent; } } //this.hy_content_display.Text = lsinfo; this.Response.Write(lsinfo); //显示上面部分end Hyoa_jstx_info.Update_readlist(this.Session["hyuid"].ToString(), recuserid);//置当前用户为已读用户 }
protected void Page_Load(object sender, EventArgs e) { if (this.Session["hyuid"].ToString() =="") this.Response.Redirect("../login.aspx?url="+this.Request.RawUrl); if (this.Request.QueryString["recuserid"] != null) { recuserid = this.Request.QueryString["recuserid"].ToString(); //得到接收人ID this.txtrecuserid.Text = recuserid; } //if (this.Request.QueryString["recusername"] != null) //{ // recusername = this.Request.QueryString["recusername"].ToString(); //得到接收人姓名 // this.txtrecusername.Text = recusername; //} //得到中文名start string[] lv_recuserid; lv_recuserid = recuserid.Split(','); HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user(); for (int j = 0; j < lv_recuserid.Length; j++) { DataTable dtuser = Hyoa_user.Getuserbyloginid(lv_recuserid[j]); for (int m = 0; m < dtuser.Rows.Count; m++) { if (recusername == "") { recusername = dtuser.Rows[m]["hy_username"].ToString(); } else { recusername += "," + dtuser.Rows[m]["hy_username"].ToString(); } } } this.txtrecusername.Text = recusername; //得到中文名end if (!IsPostBack) { this.lbljsrname.Text = recusername; //显示接收人性名 //显示上面部分start HyoaClass.Hyoa_jstx_info Hyoa_jstx_info = new HyoaClass.Hyoa_jstx_info(); DataTable dt_getinfo = Hyoa_jstx_info.GetDocBySenduserid_Receiveuserid_top6(this.Session["hyuid"].ToString(),recuserid); string lsinfo = ""; string lscontent = ""; if (dt_getinfo.Rows.Count > 0) { for (int i = dt_getinfo.Rows.Count-1; i >=0; i--) { lsinfo += "<br>" + dt_getinfo.Rows[i]["hy_sendinfo_username"].ToString() + " " + dt_getinfo.Rows[i]["hy_sendinfo_date"].ToString(); lscontent = dt_getinfo.Rows[i]["hy_content"].ToString(); //lscontent = lscontent.Replace("|#", "<img src='images_main/qq/"); //lscontent = lscontent.Replace("gif#", "gif' />"); if (dt_getinfo.Rows[i]["hy_fileattpath"].ToString() != "") lscontent = "<a href='/" + dt_getinfo.Rows[i]["hy_fileattpath"].ToString() + "' target='_blank'><font color=red>" + lscontent + "</font></a>"; lsinfo += "<br>" + lscontent; } } this.hy_content_display.Text = lsinfo; //显示上面部分end Hyoa_jstx_info.Update_readlist(this.Session["hyuid"].ToString(), recuserid);//置当前用户为已读用户 } }