예제 #1
0
        //
        // GET: /Home/

        public ActionResult Index()
        {
            Account account = GetCurrentAccount();

            if (account == null)
            {
                return(Content(" <script type='text/javascript'> window.top.location='Account'; </script>"));
            }
            ViewBag.LogonNum      = account.LogonNum;
            ViewBag.IP            = Common.IP.GetIP();
            ViewBag.LastLogonIP   = account.LastLogonIP;
            ViewBag.LastLogonTime = account.LastLogonTime;
            ViewBag.PersonName    = account.PersonName;

            ISysAnnouncementBLL announcementBLL = new SysAnnouncementBLL();
            SysAnnouncement     announcement    = announcementBLL.GetTop(1);

            if (announcement != null)
            {
                ViewBag.Title        = announcement.Title;
                ViewBag.Announcement = announcement.Message;
            }
            else
            {
                ViewBag.Title        = "暂无公告";
                ViewBag.Announcement = "暂无公告";
            }


            return(View());
        }
예제 #2
0
        //
        // GET: /Home/

        public ActionResult Index()
        {
            Account account = GetCurrentAccount();

            ViewBag.LogonNum      = account.LogonNum;
            ViewBag.IP            = Common.IP.GetIP();
            ViewBag.LastLogonIP   = account.LastLogonIP;
            ViewBag.LastLogonTime = account.LastLogonTime;
            ViewBag.PersonName    = account.PersonName;

            ISysAnnouncementBLL announcementBLL = new SysAnnouncementBLL();
            SysAnnouncement     announcement    = announcementBLL.GetTop(1);

            if (announcement != null)
            {
                ViewBag.Title        = announcement.Title;
                ViewBag.Announcement = announcement.Message;
            }
            else
            {
                ViewBag.Title        = "暂无公告";
                ViewBag.Announcement = "暂无公告";
            }


            return(View());
        }
예제 #3
0
 public SysAnnouncementApiController(SysAnnouncementBLL bll)
 {
     m_BLL = bll;
 }