Пример #1
0
        public ActionResult DeleteNotice(string id)
        {
            NoticeBL n = NoticeBL.CreateNotice(id);

            n.DeleteBy = "1";
            n.DeleteNotice();
            return(Json(new { rescode = 200, msg = "" }));
        }
Пример #2
0
        public ActionResult AddNotice(string title, string context)
        {
            NoticeBL n = new NoticeBL();

            n.Title    = title;
            n.CreateBy = "nick";
            n.Context  = context;
            n.AddNotice();
            return(Json(new { rescode = 200, msg = "" }));
        }
Пример #3
0
        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));
        }
Пример #4
0
        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 IHttpActionResult Notice_Select()
        {
            NoticeBL bl = new NoticeBL();

            return(Ok(bl.NoticeSelect()));
        }
Пример #6
0
        public ActionResult ShowNotice(string id)
        {
            NoticeBL n = NoticeBL.CreateNotice(id);

            return(View(n));
        }