Ejemplo n.º 1
0
        public ActionResult Create(FormCollection collection)
        {
            var model = new Channel();
            this.TryUpdateModel<Channel>(model);

            this.CmsService.SaveChannel(model);

            return this.RefreshParent();
        }
Ejemplo n.º 2
0
 public void SaveChannel(Channel channel)
 {
     using (var dbContext = new CmsDbContext())
     {
         if (channel.ID > 0)
         {
             dbContext.Update<Channel>(channel);
         }
         else
         {
             dbContext.Insert<Channel>(channel);
         }
     }
 }
Ejemplo n.º 3
0
        //
        // GET: /Cms/Channel/Create

        public ActionResult Create()
        {
            var model = new Channel() { IsActive = true };
            return View("Edit", model);
        }