public ActionResult NoticeManage(string usercode, int pageIndex = 1)
        {
            NoticeMabageListModel model = new NoticeMabageListModel();


            //查询数据
            NewsPageResult newsModel = new NewsPageResult();

            newsModel = NewsService.GetPageList(pageIndex, PageSize);

            model.newsList = newsModel.News;
            //分页
            Pagination pager = new Pagination();

            pager.PageIndex  = pageIndex;
            pager.PageSize   = PageSize;
            pager.TotalCount = newsModel.TotalCount;

            if (newsModel.TotalCount <= PageSize)
            {
                model.Page = "";
            }
            else
            {
                model.Page = pager.GetPagerHtml();
            }
            return(Json(new AjaxResult {
                Status = "1", Data = model
            }));
        }
        //公告列表
        public ActionResult NoticeManage()
        {
            NoticeMabageListModel model = new NoticeMabageListModel();

            //查询数据
            NewsPageResult newsModel = new NewsPageResult();

            newsModel = NewsService.GetPageList(1, PageSize);

            model.newsList = newsModel.News;
            //分页
            Pagination pager = new Pagination();

            pager.PageIndex  = 1;
            pager.PageSize   = PageSize;
            pager.TotalCount = newsModel.TotalCount;

            if (newsModel.TotalCount <= PageSize)
            {
                model.Page = "";
            }
            else
            {
                model.Page = pager.GetPagerHtml();
            }
            return(View(model));
        }
        public ActionResult NewTypeManage()
        {
            long userid       = GetLoginID();
            int  FromUserType = 1;
            int  PageIndex    = 1;
            //LeaveOutListModel model = new LeaveOutListModel();
            ////查询数据
            //LeaveOutPageResult leaveoutModel = new LeaveOutPageResult();

            //leaveoutModel = LeavewordsService.GetPageList(userid, FromUserType, PageIndex, PageSize);
            //model.leaveoutList = leaveoutModel.LeaveOuts;
            ////分页
            //Pagination pager = new Pagination();
            //pager.PageIndex = PageIndex;
            //pager.PageSize = PageSize;
            //pager.TotalCount = leaveoutModel.TotalCount;

            //if (leaveoutModel.TotalCount <= PageSize)
            //{
            //    model.Page = "";
            //}
            //else
            //{
            //    model.Page = pager.GetPagerHtml();
            //}
            NoticeMabageListModel model = new NoticeMabageListModel();

            model.NewsTypeList = NewsService.getdata().NewsTypeList;
            return(View(model));
        }
        //新闻列表

        public ActionResult NoticeManage(string Title, DateTime?Strat, DateTime?End, int PageIndex = 1)
        {
            int NewType = 0;

            NoticeMabageListModel model = new NoticeMabageListModel();

            //查询数据
            NewsPageResult newsModel = new NewsPageResult();

            newsModel = NewsService.GetNewsList(NewType, Title, Strat, End, PageIndex, pageSize);

            model.newsList = newsModel.News;
            //分页
            Pagination pager = new Pagination();

            pager.PageIndex  = PageIndex;
            pager.PageSize   = pageSize;
            pager.TotalCount = newsModel.TotalCount;

            if (newsModel.TotalCount <= pageSize)
            {
                model.Page = "";
            }
            else
            {
                model.Page = pager.GetPagerHtml();
            }
            return(View(model));
        }
        //新闻公告
        public ActionResult NoticeEdit(long id = 0)
        {
            NoticeMabageListModel model = new NoticeMabageListModel();
            NewsDTO dto = NewsService.GetModel(id);

            if (dto == null)
            {
                dto             = new NewsDTO();
                dto.PublishTime = DateTime.Now;
                dto.NewType     = 0;
            }
            model.news         = dto;
            model.NewsTypeList = NewsService.getdata().NewsTypeList;
            return(View(model));
        }