예제 #1
0
        protected void BindFriend()
        {
            int       total = 0;
            DataTable m_dt  = BLG_AttentionBll.GetInstance().GetUserAttentions(GetSession().CustomerEntity.SysNo, 12, 1, ref total);

            rptFriend.DataSource = m_dt;
            rptFriend.DataBind();
            TotalFriends = total;
        }
예제 #2
0
        protected void BindFans()
        {
            int       total = 0;
            DataTable m_dt  = BLG_AttentionBll.GetInstance().GetUserFans(m_user.SysNo, 12, 1, ref total);

            rptFriend.DataSource = m_dt;
            rptFriend.DataBind();
            TotalFans = total;
        }
예제 #3
0
 protected void Unnamed7_Click(object sender, EventArgs e)
 {
     if (LinkButton1.Text == "添加关注")
     {
         BLG_AttentionBll.GetInstance().AddAttention(GetSession().CustomerEntity.SysNo, m_user.SysNo);
         LinkButton1.Text = "取消关注";
     }
     else
     {
         BLG_AttentionBll.GetInstance().RemoveAttention(GetSession().CustomerEntity.SysNo, m_user.SysNo);
         LinkButton1.Text = "添加关注";
     }
 }
예제 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.QueryString["id"] != null)
                {
                    try
                    {
                        m_user = USR_CustomerBll.GetInstance().GetModel(int.Parse(Request.QueryString["id"]));
                    }
                    catch
                    {
                        Response.Redirect("../Error.aspx");
                    }
                }

                if (Request.QueryString["pn"] != null)
                {
                    try
                    {
                        pageindex = int.Parse(Request.QueryString["pn"]);
                    }
                    catch
                    { }
                }

                BindList();
                BindFriend();
                BindFans();

                if (BLG_AttentionBll.GetInstance().IsFans(GetSession().CustomerEntity.SysNo, m_user.SysNo))
                {
                    LinkButton1.Text = "取消关注";
                }
                else
                {
                    LinkButton1.Text = "添加关注";
                }
            }
        }