예제 #1
0
 public IHttpActionResult InMenu(PublishBinding Model)
 {
     _PageService.InMenu(Model, User.Identity.GetUserId());
     return Ok();
 }
예제 #2
0
        public void InMenu(PublishBinding Model, string UserID)
        {
            using (var _c = db)
            {
                var _P = _c.Pages.Where(m => m.PageID == Model.PageID).SingleOrDefault();
                Can(_P.SiteID, UserID, _c);

                var _Page = _c.Pages.Where(m => m.PageID == Model.PageID).SingleOrDefault();
                _Page.InMenu = Model.Published;
                _c.SaveChanges();
            }
        }