protected void UserVote_B_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(Request.Form["vote_" + Mid])) { return; } int opid = DataConvert.CLng(Request.Form["vote_" + Mid]); msgBll.AddUserVote(Mid, opid, buser.GetLogin().UserID); LoadVote(); }
public string PlatAJAX() { int uid = buser.GetLogin().UserID; string action = Request.Form["action"]; string value = Request.Form["value"]; string msg = "", files = ""; int pid = 0, rid = 0, id = 0; switch (action) { case "DeleteMsg": //删除 id = Convert.ToInt32(value); msgBll.DelByUID(id, uid); break; case "AddReply": //回复 GetPostInfo(value, ref pid, ref rid, ref msg, ref files); msgBll.Insert(FillMsg(msg, pid, rid, files)); break; case "AddReply2": //对回复中的某人进行回复 GetPostInfo(value, ref pid, ref rid, ref msg, ref files); msgBll.Insert(FillMsg(msg, pid, rid, files)); break; case "AddColl": //收藏 msgBll.UpdateColled(uid, Convert.ToInt32(value), 1); break; case "ReColl": //后期加入部门与公司校验 msgBll.UpdateColled(uid, Convert.ToInt32(value), 2); break; case "AddLike": id = Convert.ToInt32(value); //msgBll.AddLike(id, UserID); likeBll.AddLike(uid, id, "plat"); break; case "ReLike": id = Convert.ToInt32(value); //msgBll.RemoveLike(id, UserID); likeBll.DelLike(uid, id, "plat"); break; case "UserVote": //用户投票 id = Convert.ToInt32(value.Split(':')[0]); int opid = Convert.ToInt32(value.Split(':')[1]); msgBll.AddUserVote(id, opid, uid); break; } return(M_APIResult.Success.ToString()); }