コード例 #1
0
        public ActionResult Create()
        {
            if (!Services.Authorizer.Authorize(Permissions.ManageAdvertise, T("Not allowed to create advertises")))
            {
                return(new HttpUnauthorizedResult());
            }

            AdvertisePart advertise = Services.ContentManager.New <AdvertisePart>("Advertise");

            if (advertise == null)
            {
                return(HttpNotFound());
            }

            var model = Services.ContentManager.BuildEditor(advertise);

            return(View(model));
        }
コード例 #2
0
 public static string AdvertiseRemove(this UrlHelper urlHelper, AdvertisePart advertisePart)
 {
     return(urlHelper.Action("Remove", "AdvertiseAdmin", new { advertiseId = advertisePart.Id, area = "Orchard.Advertise" }));
 }