//好友资源更新显示 public string ResourceRefresh(Tz888.Model.GoodFriend model) { string result = ""; DataTable dtResource = dal.ResourceRefresh(model); if (dtResource != null && dtResource.Rows.Count >= 0) { int resourceCnt = dtResource.Rows.Count; if (resourceCnt == 0) { result = "最近无更新"; } else if (resourceCnt == 1) { result = dtResource.Rows[0]["htmlFile"].ToString(); } else { result = resourceCnt.ToString(); } } else { result = "最近无更新"; } return(result); }
public string MemberInfoRefresh(Tz888.Model.GoodFriend model) { string result = ""; DataTable dtInfomation = dal.MemberInfoRefresh(model); if (dtInfomation != null && dtInfomation.Rows.Count >= 0) { int InfomationCnt = dtInfomation.Rows.Count; if (InfomationCnt == 0) { result = "最近无更新"; } else { result = dtInfomation.Rows[0]["remarks"].ToString(); } } else { result = "最近无更新"; } return(result); }
protected void btnOk_Click(object sender, EventArgs e) { Tz888.BLL.GoodFriend friendBll = new Tz888.BLL.GoodFriend(); Tz888.Model.GoodFriend model = new Tz888.Model.GoodFriend(); if (this.tboxName.Text.IndexOf(",") > -1) { string[] names = this.tboxName.Text.Trim().Split(','); for (int i = 0; i < names.Length; i++) { if (names[i].Trim() != "") { Tz888.BLL.Conn dal = new Tz888.BLL.Conn(); string strWhere = ""; strWhere = "nickName='" + names[i].Trim() + "'"; long m = 1; long j = 1; long k = 1; DataTable dt = dal.GetList("loginInfoTab", "loginName", "loginName", strWhere, "loginName", ref m, k, ref j); if (dt != null && dt.Rows.Count > 0) { model.LoginName = Page.User.Identity.Name; //model.LoginName = "kiki"; model.ContactName = dt.Rows[0][0].ToString(); model.GroupId = 3; friendBll.AddFriend(model); } else { Response.Write("<script>alert('用户不存在')</script>"); } } } } else { Tz888.BLL.Conn dal = new Tz888.BLL.Conn(); string strWhere = ""; strWhere = "nickName='" + this.tboxName.Text.Trim() + "'"; long i = 1; long j = 1; long k = 1; DataTable dt = dal.GetList("loginInfoTab", "loginName", "loginName", strWhere, "loginName", ref i, k, ref j); if (dt != null && dt.Rows.Count > 0) { model.LoginName = Page.User.Identity.Name; //model.LoginName = "kiki"; model.ContactName = dt.Rows[0][0].ToString(); model.GroupId = 3; friendBll.AddFriend(model); } else { Response.Write("<script>alert('用户不存在')</script>"); } } getList(); }
public void getList() { Tz888.BLL.GoodFriend friendBll = new Tz888.BLL.GoodFriend(); Tz888.Model.GoodFriend friend = new Tz888.Model.GoodFriend(); friend.LoginName = loginName; //"clandylee"; friend.ContactName = contactName; //"kittycat"; //好友资源更新 DataTable dt = friendBll.ResourceRefreshDT(friend); friendRefreshGridView.DataSource = dt; friendRefreshGridView.DataBind(); }
protected void brnFriend_Click(object sender, EventArgs e) { LinkButton btn = new LinkButton(); btn = (LinkButton)sender; loginname = btn.CommandName.Trim(); Tz888.BLL.GoodFriend friendBll = new Tz888.BLL.GoodFriend(); Tz888.Model.GoodFriend model = new Tz888.Model.GoodFriend(); model.LoginName = Page.User.Identity.Name;//"sunray"; model.ContactName = loginname; model.GroupId = 1; friendBll.AddFriend(model); //string url="../FriendManager/addsuccess.aspx?name="+loginname; Response.Redirect("../FriendManager/addsuccess.aspx?name=" + loginname); }
//添加好友 public void AddFriend(Tz888.Model.GoodFriend model) { dal.AddFriend(model); SendNotice obj = new SendNotice(); Conn con = new Conn(); DataTable dt1 = con.GetList("LoginInfoTab", "NickName", "LoginID", 1, 1, 0, 1, "LoginName='" + model.LoginName + "'"); DataTable dt2 = con.GetList("LoginInfoTab", "NickName", "LoginID", 1, 1, 0, 1, "LoginName='" + model.ContactName + "'"); if (dt1.Rows.Count > 0 && dt2.Rows.Count > 0) { string loginname1 = dt1.Rows[0]["NickName"].ToString().Trim(); //添加人 string loginname2 = dt2.Rows[0]["NickName"].ToString().Trim(); //被添加人 string MobileText = "您已被“" + loginname1 + "”添加为好友,[此条信息免费]"; string EmailText = "尊敬的" + loginname2 + ",您已被“" + loginname1 + "”添加为好友"; string Title = "好友添加通知"; string SiteText = "您已被“" + loginname1 + "”添加为好友,[此条信息免费]"; obj.SendSms(model.ContactName, MobileText, Title, SiteText, EmailText, "FriendAddNotice"); } }
protected void btnOk_Click(object sender, EventArgs e) { bool bR = Page.User.IsInRole("GT1002"); if (bR) { Tz888.BLL.GoodFriend goodFriend = new Tz888.BLL.GoodFriend(); Tz888.Model.GoodFriend set = new Tz888.Model.GoodFriend(); set.LoginName = loginname; set.MemberType = Convert.ToInt32(this.ddlMemberType.SelectedValue); set.MemberGrade = Convert.ToInt32(this.ddlMemberGrade.SelectedValue); set.MemberIntent = Convert.ToInt32(this.ddlMemberIntent.SelectedValue); goodFriend.SetFriendSet(set); Tz888.Common.MessageBox.Show(this.Page, "设置成功!"); } else { Response.Write("<script>window.open('FriendSetClue.htm');</script>"); } }
protected void friendListGridView_RowDataBound(object sender, GridViewRowEventArgs e) { DataRowView view = e.Row.DataItem as DataRowView;//定义一个DataRowView的实例 Image img = new Image(); img = (Image)e.Row.FindControl("imgTofo"); if (view != null) { //2会员类型,3会员周期,6付费状态,7审核状态 switch (view["ManageTypeId"].ToString().Trim()) { case "1001": e.Row.Cells[2].Text = "个人会员"; break; case "1003": e.Row.Cells[2].Text = "企业会员"; break; case "1004": e.Row.Cells[2].Text = "政府会员"; break; } //在线洽谈 long m = 1; long n = 1; long v = 1; string strWhere = ""; string online = ""; Tz888.BLL.Conn dal = new Tz888.BLL.Conn(); System.Web.UI.HtmlControls.HtmlGenericControl divOnline = (HtmlGenericControl)e.Row.FindControl("divOnlineTalk"); strWhere = "loginName='" + view["contactName"].ToString().Trim() + "'"; DataTable dataTable = dal.GetList("loginInfoIMTab", "loginName", "imType,ImAccount,isDisable", strWhere, "loginName", ref m, n, ref v); if (dataTable != null && dataTable.Rows.Count > 0) { if (Convert.ToInt32(dataTable.Rows[0][2]) != 1) { if (dataTable.Rows[0][0] != null && dataTable.Rows[0][0].ToString() != "") { if (dataTable.Rows[0][0].ToString().IndexOf("MSN") > -1) { online = "<a href=\"msnim:chat?contact=" + dataTable.Rows[0][1].ToString().Trim() + "\" title=\"请确保XP版本以上的Windows并安装好MSN,或者手动添加地址。\" target=\"_blank\" ><img src=\"http://Search.topfo.com/Images/icon_member.gif\" border=0></a >"; } if (dataTable.Rows[0][0].ToString().IndexOf("QQ") > -1) { online = "<a target='blank' href='http://wpa.qq.com/msgrd?V=1&Uin=" + dataTable.Rows[0][1].ToString().Trim() + "&Site=中国招商投资网&Menu=yes'><img border='0' SRC=http://wpa.qq.com/pa?p=1:" + dataTable.Rows[0][1].ToString().Trim() + ":6 alt='点击这里给我发消息' align='absmiddle'></a>"; } } } divOnline.InnerHtml = online; } //会员门户或个人信息 long i = 1; long j = 1; long k = 1; string memberGrade = ""; string strWhere1 = ""; Tz888.BLL.Conn dal1 = new Tz888.BLL.Conn(); strWhere1 = "loginName='" + view["contactName"].ToString().Trim() + "'"; DataTable dt = dal1.GetList("loginInfoTab", "loginName", "memberGradeId", strWhere1, "loginName", ref i, k, ref j); if (dt != null && dt.Rows.Count > 0) { memberGrade = dt.Rows[0][0].ToString(); } bool bl = (memberGrade.Trim() == "1002"); //bool bl = true; if (bl) { img.Visible = true; } HyperLink hlk = new HyperLink(); hlk = (HyperLink)e.Row.FindControl("hlkRefresh"); HyperLink hlkPersonRefresh = new HyperLink(); hlkPersonRefresh = (HyperLink)e.Row.FindControl("hlkPersonRefresh"); HyperLink hlkEnRefresh = new HyperLink(); hlkEnRefresh = (HyperLink)e.Row.FindControl("hlkEnRefresh"); Tz888.BLL.GoodFriend friendBll = new Tz888.BLL.GoodFriend(); Tz888.Model.GoodFriend friend = new Tz888.Model.GoodFriend(); friend.LoginName = Page.User.Identity.Name;//"kiki"; friend.ContactName = view["contactName"].ToString().Trim(); //好友资源更新 string strRefresh = friendBll.ResourceRefresh(friend); if (strRefresh.IndexOf("最近无更新") > -1) { hlk.Text = strRefresh; hlk.NavigateUrl = ""; } else if (strRefresh.IndexOf("html") > -1) { hlk.Text = "发布了1条新需求"; hlk.NavigateUrl = "http://www.topfo.com/" + strRefresh.Trim(); } else { hlk.Text = "发布了" + strRefresh.Trim() + "条新需求"; hlk.NavigateUrl = "FriendRefresh.aspx?contact=" + view["contactName"].ToString().Trim(); } //好友资料更新 string strPerRefresh = friendBll.MemberInfoRefresh(friend); if (strPerRefresh.IndexOf("最近无更新") > -1) { hlkPersonRefresh.Text = strRefresh; hlkPersonRefresh.NavigateUrl = ""; } else { hlkPersonRefresh.Text = strPerRefresh; hlkPersonRefresh.NavigateUrl = viewLink(view["contactName"].ToString().Trim()); } // string strEnRefresh = "最近无更新"; bool blRegister = friendBll.EnterpriseResfresh(friend); if (!blRegister) { strEnRefresh = "最近无更新"; } else { strEnRefresh = "登记了公司信息"; } if (strRefresh.IndexOf("最近无更新") > -1 && strPerRefresh.IndexOf("最近无更新") > -1 && strEnRefresh.IndexOf("最近无更新") > -1) { hlkEnRefresh.Visible = false; hlk.Visible = false; hlkPersonRefresh.Visible = true; } else if (strRefresh.IndexOf("最近无更新") > -1) { hlk.Visible = false; } else if (strPerRefresh.IndexOf("最近无更新") > -1) { hlkPersonRefresh.Visible = false; } else if (strEnRefresh.IndexOf("最近无更新") > -1) { hlkEnRefresh.Visible = false; } } }
protected void Page_Load(object sender, EventArgs e) { if (Page.User.Identity.Name == null || Page.User.Identity.Name.Trim() == "") { Response.Redirect("../../Login.aspx?ReturnUrl=" + Server.UrlEncode(Request.RawUrl)); return; } if (Request.QueryString["name"] != null && Request.QueryString["name"].ToString() != "") { long m = 1; long j = 1; long k = 1; string nickName = ""; string strWhere = ""; string memberGrade = ""; string manageType = ""; string intent = ""; string name = ""; bool grade = false; bool type = false; Tz888.BLL.Conn dal = new Tz888.BLL.Conn(); name = Request.QueryString["name"].ToString().Trim(); //name = "kiki"; strWhere = "loginName='" + name + "'"; //strWhere = "nickName='" + name + "'"; DataTable dt = dal.GetList("loginInfoTab", "loginName", "nickName", strWhere, "loginName", ref m, k, ref j); if (dt != null && dt.Rows.Count > 0) { nickName = dt.Rows[0][0].ToString(); } //strWhere = "loginName= ' " + Page.User.Identity.Name + "'"; strWhere = "loginName= ' " + name + "'"; dt = null; dt = dal.GetList("loginInfoTab", "loginName", "MemberGradeId,ManageTypeId,requirInfo", strWhere, "loginName", ref m, k, ref j); if (dt != null && dt.Rows.Count > 0) { memberGrade = dt.Rows[0][0].ToString(); manageType = dt.Rows[0][1].ToString(); intent = dt.Rows[0][2].ToString(); } Tz888.BLL.GoodFriend friendBll = new Tz888.BLL.GoodFriend(); Tz888.Model.GoodFriend set = new Tz888.Model.GoodFriend(); bool IsBlack = friendBll.IsSpecies(name, Page.User.Identity.Name, 3); //bool IsBlack = friendBll.IsSpecies("huangleon", "beckycheng", 3); if (IsBlack) { Response.Write("<script>alert('添加好友失败!您被加入黑名单');window.close();</script>"); return; } bool IsFriend = friendBll.IsSpecies(Page.User.Identity.Name, name, 1); //bool IsFriend = friendBll.IsSpecies("huangleon", "beckycheng", 1); if (IsFriend) { Response.Write("<script>alert('添加好友失败!用户已在好友列表中');window.close();</script>"); return; } if (name.Trim() == Page.User.Identity.Name.Trim()) { Response.Write("<script>alert('添加好友失败!不能添加自己为好友');window.close();</script>"); return; } //loginName = "kittycat"; set = friendBll.GetFriendSet(name); if (set != null) { if (set.MemberGrade == 2) { if (memberGrade == "1001") { grade = true; } } else if (set.MemberGrade == 0) { grade = true; } if (grade) { if (set.MemberType == 0) { type = true; } else if (set.MemberType == 1) { if (manageType.Trim() == "1004") { type = true; } } else if (set.MemberType == 2) { if (manageType.Trim() == "1003") { type = true; } } else if (set.MemberType == 3) { if (manageType.Trim() == "1001") { type = true; } } } } else { type = true; } if (type) { Tz888.Model.GoodFriend model = new Tz888.Model.GoodFriend(); model.LoginName = Page.User.Identity.Name; model.ContactName = name; model.GroupId = 1; friendBll.AddFriend(model); this.hplName.Text = "恭喜,您已经成功添加" + nickName + "为您的好友了!"; this.hplList.Text = "查看您的好友列表"; this.hplList.NavigateUrl = "friendList.aspx"; this.hplSendInfo.Text = "给" + nickName + "发送站内短信"; this.hplSendInfo.NavigateUrl = "../../innerinfo/SendView.aspx?Ac=0&name=" + nickName; } else { this.hplName.Text = "对不起," + name + " 设置只有拓富通会员才能将他加为好友!"; this.hplList.Text = "了解一下拓富通会员服务"; this.hplList.NavigateUrl = "http://www.topfo.com/help/TopfoServer.shtml#a5"; this.hplSendInfo.Text = "立即申请拓富通会员服务"; this.hplSendInfo.NavigateUrl = "http://member.topfo.com/Register/VIPMemberRegister_In.aspx"; } } }
//好友资源更新列表 public DataTable ResourceRefreshDT(Tz888.Model.GoodFriend model) { return(dal.ResourceRefresh(model)); }
public string AddFriend(string ContactName) { string username = ""; string grade = ""; string type = ""; grade = Tz888.BLL.Login.LoginInfoBLL.getCookieNameByCookieType(1); type = Tz888.BLL.Login.LoginInfoBLL.getCookieNameByCookieType(2); bool success = false; try { Tz888.Model.GoodFriend friendSet = new Tz888.Model.GoodFriend(); Tz888.BLL.GoodFriend friendBll = new Tz888.BLL.GoodFriend(); friendSet = friendBll.GetFriendSet(ContactName); if (friendSet != null) { bool res = false; if (friendSet.MemberGrade == 2) { res = (grade == "MG1002"); } if (res) { switch (friendSet.MemberType) { case 0: success = true; break; case 1: success = (type == "GT1004"); break; case 2: success = (type == "GT1003"); break; case 3: success = (type == "GT1001"); break; } } } else { success = true; } if (success) { Tz888.Model.GoodFriend model = new Tz888.Model.GoodFriend(); model.LoginName = Tz888.BLL.Login.LoginInfoBLL.getCookieNameByCookieType(0); model.ContactName = ContactName; model.GroupId = 1; friendBll.AddFriend(model); return("ok"); } else { return("failed"); } } catch (Exception e) { string err = e.Message.ToString(); return(err); } }
//好友资料更新显示 public DataTable MemberInfoRefreshDt(Tz888.Model.GoodFriend model) { return(dal.MemberInfoRefresh(model)); }
//读取设置 public Tz888.Model.GoodFriend GetFriendSet(string loginName) { Tz888.Model.GoodFriend model = new Tz888.Model.GoodFriend(); model = dal.GetFriendSet(loginName); return(model); }
//公司登记 public bool EnterpriseResfresh(Tz888.Model.GoodFriend model) { return(dal.EnterpriseRefresh(model)); }
//设置防骚扰 public void SetFriendSet(Tz888.Model.GoodFriend model) { dal.SetFriendSet(model); }
protected void btnAddFriend_Click(object sender, EventArgs e) { Button btn; btn = (Button)sender; bool blSuccess = false; bool grade = false; bool type = false; string name = btn.CommandName.Substring(0, btn.CommandName.IndexOf("_")); string memberGrade = btn.CommandName.Substring(btn.CommandName.IndexOf("_") + 1, btn.CommandName.IndexOf("%") - btn.CommandName.IndexOf("_") - 1); string manageType = btn.CommandName.Substring(btn.CommandName.IndexOf("%") + 1, btn.CommandName.IndexOf("$") - btn.CommandName.IndexOf("%") - 1); string memberIntent = btn.CommandName.Substring(btn.CommandName.IndexOf("$") + 1); Tz888.BLL.GoodFriend friendBll = new Tz888.BLL.GoodFriend(); Tz888.Model.GoodFriend set = new Tz888.Model.GoodFriend(); bool IsBlack = friendBll.IsSpecies(name, Page.User.Identity.Name, 3); //bool IsBlack = friendBll.IsSpecies("huangleon", "beckycheng", 3); if (IsBlack) { Response.Write("<script>alert('添加好友失败!您被加入黑名单')</script>"); return; } bool IsFriend = friendBll.IsSpecies(Page.User.Identity.Name, name, 1); //bool IsFriend = friendBll.IsSpecies("huangleon", "beckycheng", 1); if (IsFriend) { Response.Write("<script>alert('添加好友失败!用户已在好友列表中')</script>"); return; } if (name.Trim() == Page.User.Identity.Name.Trim()) { Response.Write("<script>alert('添加好友失败!不能添加自己为好友')</script>"); return; } set = friendBll.GetFriendSet(name); if (set != null) { if (set.MemberGrade == 2) { if (memberGrade == "1001") { grade = true; } else if (Page.User.IsInRole("GT1002")) { grade = true; } } else if (set.MemberGrade == 0) { grade = true; } if (grade) { if (set.MemberType == 0) { type = true; } else if (set.MemberType == 1) { if (manageType.Trim() == "1004") { type = true; } } else if (set.MemberType == 2) { if (manageType.Trim() == "1003") { type = true; } } else if (set.MemberType == 3) { if (manageType.Trim() == "1001") { type = true; } } } if (type) { //if (set.MemberIntent == 0) //{ // if (memberIntent == "1001") // { // blSuccess = true; // } //} //else if (set.MemberIntent == 1) //{ // if (memberIntent == "1002") // { // blSuccess = true; // } //} //else //{ blSuccess = true; //测试用 //} } } else { blSuccess = true; } string nickName = ""; Tz888.BLL.Conn dal = new Tz888.BLL.Conn(); string strWhere = ""; strWhere = "loginName='" + name.Trim() + "'"; long i = 1; long j = 1; long k = 1; DataTable dt = dal.GetList("loginInfoTab", "loginName", "nickName", strWhere, "loginName", ref i, k, ref j); if (dt != null && dt.Rows.Count > 0) { nickName = dt.Rows[0][0].ToString(); } if (blSuccess) { Tz888.Model.GoodFriend model = new Tz888.Model.GoodFriend(); model.LoginName = Page.User.Identity.Name; //model.LoginName = "sunray"; model.ContactName = name; model.GroupId = 1; friendBll.AddFriend(model); Response.Write("<script language='JavaScript'>window.open('addsuccess.aspx?name=" + Server.UrlEncode(nickName) + "');</script>"); } else { Response.Write("<script language='JavaScript'>window.open('adderror.aspx?name=" + Server.UrlEncode(nickName) + "');</script>"); } }
protected void Page_Load(object sender, EventArgs e) { loginname = Page.User.Identity.Name; this.lbSetText.Text = ""; bR = Page.User.IsInRole("GT1002"); if (bR) //拓富通会员 { this.panelSet.Visible = true; Tz888.Model.GoodFriend set = new Tz888.Model.GoodFriend(); Tz888.BLL.GoodFriend friend = new Tz888.BLL.GoodFriend(); //set = friend.GetFriendSet("1234"); set = friend.GetFriendSet(loginname); if (set != null) { switch (set.MemberGrade) { case 0: this.lbSetText.Text += "会员身份:不限"; this.ddlMemberGrade.SelectedValue = "0"; break; case 1: this.lbSetText.Text += "会员身份:拓富通会员"; this.ddlMemberGrade.SelectedValue = "1"; break; case 2: this.lbSetText.Text += "会员身份:普通会员"; this.ddlMemberGrade.SelectedValue = "2"; break; } switch (set.MemberType) { case 0: this.lbSetText.Text += " 会员类型:不限"; break; case 1: this.lbSetText.Text += " 会员类型:政府机构"; break; case 2: this.lbSetText.Text += " 会员类型:企业单位"; break; case 3: this.lbSetText.Text += " 会员类型:个人经营"; break; case 4: this.lbSetText.Text += " 会员类型:个人"; break; } switch (set.MemberIntent) { case 0: this.lbSetText.Text += " 会员意向:不限"; this.ddlMemberType.SelectedValue = "0"; break; case 1: this.lbSetText.Text += " 会员意向:政府机构"; this.ddlMemberType.SelectedValue = "1"; break; case 2: this.lbSetText.Text += " 会员意向:企业单位"; this.ddlMemberType.SelectedValue = "2"; break; case 3: this.lbSetText.Text += " 会员意向:个人经营"; this.ddlMemberType.SelectedValue = "3"; break; case 4: this.lbSetText.Text += " 会员意向:个人"; this.ddlMemberType.SelectedValue = "4"; break; } this.lbSetText.Text += " 可以加您为好友"; } } else { linktopf.Visible = true; } }
public string dgGetRefresh() { StringBuilder sb = new StringBuilder(); string LoginName = Tz888.BLL.Login.LoginInfoBLL.GetCookieContentByCookieType(0); int allRefresh = 0; string nickName = ""; if (LoginName.Trim() != "") { Tz888.BLL.Conn bllComm = new Tz888.BLL.Conn(); DataTable dt = new DataTable(); long CurrPage = 1; long AllCount = 0; dt = bllComm.GetList("innerinfocontactTab", "*", "ContactID", 4, 1, 0, 1, "loginName='" + LoginName + "' and groupid = 1"); if (dt.Rows.Count == 0) { sb.Append("<div class='notemsg1'>您还没有添加好友!</div>"); } sb.Append("<table width=100% border=0 cellpadding=0 cellspacing=0 class='none'>"); sb.Append("<tr><td>更新内容</td><td>更新时间</td></tr>"); Tz888.BLL.GoodFriend friendbll = new Tz888.BLL.GoodFriend(); Tz888.Model.GoodFriend friend = new Tz888.Model.GoodFriend(); DataTable dtInfo = new DataTable(); DataTable dtMemberInfo = new DataTable(); #region --获得用户昵称-- #endregion #region for (int i = 0; i < dt.Rows.Count; i++) { friend.LoginName = LoginName; friend.ContactName = dt.Rows[i]["contactName"].ToString().Trim(); dtInfo = friendbll.ResourceRefreshDT(friend); string strWhere1 = "loginName='" + friend.ContactName + "'"; DataTable dt2 = bllComm.GetList("loginInfoTab", "nickName", "nickName", 1, 1, 0, 1, strWhere1); if (dt2.Rows.Count > 0) { nickName = dt2.Rows[0]["NickName"].ToString(); } if (allRefresh > 3) { break; } if (dtInfo.Rows.Count > 0) { allRefresh += dtInfo.Rows.Count; for (int j = 0; j < dtInfo.Rows.Count; j++) { if (allRefresh > 3) { break; } sb.Append("<tr>"); sb.Append("<td width=58%><a target='_blank' title='" + dtInfo.Rows[i]["title"].ToString().Trim() + "' href='http://www.topfo.com/" + dtInfo.Rows[i]["HtmlFile"].ToString().Trim() + "'>" + nickName + "发布了1个需求" + "</a></td>"); sb.Append("<td width=20%>" + dtInfo.Rows[i]["approveTime"].ToString() + "</td>"); sb.Append("</tr>"); } } dtMemberInfo = friendbll.MemberInfoRefreshDt(friend); if (dtMemberInfo.Rows.Count > 0) { allRefresh += dtInfo.Rows.Count; string strLink = ""; #region --查看用户资料页面-- string name = friend.ContactName; string manageType = ""; string result = ""; Tz888.BLL.Conn dal = new Tz888.BLL.Conn(); string strWhere = ""; strWhere = "loginName='" + name.Trim() + "'"; long m = 1; long n = 1; long k = 1; DataTable dt1 = bllComm.GetList("loginInfoTab", "loginName", "manageTypeId", strWhere, "loginName", ref m, k, ref n); if (dt1 != null && dt1.Rows.Count > 0) { manageType = dt1.Rows[0][0].ToString(); } switch (manageType) { case "1001": result = "http://member.topfo.com/Register/MemberMessage_P.aspx?LoginName=" + name; break; case "1003": result = "http://member.topfo.com/Register/MemberMessage_E.aspx?LoginName=" + name; break; case "1004": result = "http://member.topfo.com/Register/MemberMessage_G.aspx?LoginName=" + name; break; default: result = "http://member.topfo.com/Register/MemberMessage_P.aspx?LoginName=" + name; break; } strLink = result; #endregion for (int j = 0; j < dtMemberInfo.Rows.Count; j++) { if (allRefresh > 3) { break; } sb.Append("<tr>"); sb.Append("<td width=58%><a target='_blank' title='" + dtMemberInfo.Rows[i]["Remarks"].ToString().Trim() + "' href='" + strLink + "'>" + nickName + "修改了" + dtMemberInfo.Rows[i]["Remarks"].ToString().Trim() + "</a></td>"); sb.Append("<td width=20%>" + dtMemberInfo.Rows[i]["updated"].ToString() + "</td>"); sb.Append("</tr>"); } } } sb.Append("</table>"); sb.Append("<div class='entermail'><a href='/helper/FriendManager/FriendList.aspx' class='blue'>>>进入好友更新列表</a></div></div>"); if (AllCount == 0) { sb.Insert(0, "<div class='notemsg1'>您没有好友更新信息!</div>"); } #endregion } return(sb.ToString()); }