示例#1
0
 protected void btnConcern_ServerClick(object sender, EventArgs e)
 {
     //判断是否登录
     SomeMethod.IfLogin(this);
     //关注,通过connectCriticism.value获取被关注的会员的id
     if (Session["memberId"] != null)
     {
         Concern con = new Concern()
         {
             ConcernId     = ConcernManagement.CreatConcernId(),
             ConcernMember = Session["memberId"].ToString().Trim(),
             ConcernTo     = Request["memberId"].ToString().Trim()
         };
         SomeMethod.PrintMsgToClient(this.ClientScript, ConcernManagement.AddConcern(con));
     }
 }
示例#2
0
        protected void lvMember_ItemCommand(object sender, ListViewCommandEventArgs e)
        {
            SomeMethod.IfLogin(this);
            string memberId = (lvMember.Items[e.Item.DataItemIndex].FindControl("hidMemberId") as HiddenField).Value.Trim();

            if (e.CommandName == "Concern")
            {
                Concern con = new Concern()
                {
                    ConcernId     = ConcernManagement.CreatConcernId(),
                    ConcernMember = Convert.ToString(Session["memberId"]),
                    ConcernTo     = memberId
                };
                printMsgToClient(ConcernManagement.AddConcern(con));
            }
            else if (e.CommandName == "MsgSend")
            {
                Response.Redirect("~/MyMessage.aspx?recipient=" + memberId);
            }
        }
示例#3
0
        protected void addConcern_ServerClick(object sender, EventArgs e)//关注
        {
            //判断是否登录
            if (Session["role"] == null)
            {
                Response.Redirect("~/Login.aspx");
                return;
            }
            //关注,通过connectCriticism.value获取被关注的会员的id
            if (Session["memberId"] != null)
            {
                Concern con = new Concern()
                {
                    ConcernId     = ConcernManagement.CreatConcernId(),
                    ConcernMember = Session["memberId"].ToString().Trim(),
                    ConcernTo     = connectCriticism.Value.ToString().Trim()
                };

                Msg = ConcernManagement.AddConcern(con);
            }
            printMsgToClient();
        }