public ActionResult DeleteNotice(string id) { NoticeBL n = NoticeBL.CreateNotice(id); n.DeleteBy = "1"; n.DeleteNotice(); return(Json(new { rescode = 200, msg = "" })); }
public ActionResult ShowNoticeReg(string id) { string code = Request.QueryString["code"]; QYConfig.RegistWX(); var accessToken = AccessTokenContainer.GetToken(QYConfig.CorpId); GetUserIdResult user = OAuth2Api.GetUserId(accessToken, code, QYConfig.VoteAgenID); QYMemberBL member = QYMemberBL.GetMemberByWXID(user.UserId); NoticeBL n = NoticeBL.CreateNotice(id); if (n != null && member != null) { member.ReadNotice(id); } return(View(n)); }
public ActionResult GetNoticeMember(string id) { NoticeBL n = NoticeBL.CreateNotice(id); NoticeMembersVM ms = new NoticeMembersVM(); NoticeMember m; ms.total = n.Members.Count; ms.rows = new List <NoticeMember>(); for (int i = 0; i < n.Members.Count; i++) { m = new NoticeMember(); m.name = "<img style='width:30px' src='" + n.Members[i].Avatar + "' />" + n.Members[i].Name; m.createdate = n.Members[i].CreateDate.ToString("yyyy-MM-dd HH:mm:ss"); m.alreadyread = n.Members[i].Status.Trim() == "1" ? "已閱讀" : ""; ms.rows.Add(m); } return(Json(ms)); }
public ActionResult ShowNotice(string id) { NoticeBL n = NoticeBL.CreateNotice(id); return(View(n)); }