예제 #1
0
        public ActionResult Update(int id)
        {
            vmBulletinCreate bc = new vmBulletinCreate();

            bc.bulletin    = _bulletinService.Get(id);
            bc.ContentText = bc.bulletin.ContentText;
            return(View(bc));
        }
예제 #2
0
        /// <summary>
        /// Details of a bulletin.
        /// </summary>
        //[OutputCache(Duration = 60, VaryByParam = "id") ]
        public ActionResult Bulletin(int id)
        {
            var model = BulletinService.Get(id);

            if (UserService.IsInContract(model.BulletinContracts))
            {
                return(View((model).ToBulletinViewModel()));
            }
            else
            {
                throw new SecurityException("You don't have access to this bulletin.");
            }
        }