public void UpdateSlide(CSliderSlide slide) { if (slide == null) { throw new ArgumentNullException("slide"); } _repository.Update(slide); }
public void InsertSlide(CSliderSlide slide) { if (slide == null) { throw new ArgumentNullException("slide"); } _repository.Insert(slide); }
public ActionResult Create(string btnId, string formId, SlideConfigModel model) { var slide = new CSliderSlide { Id = 0, PictureId = model.PictureId, Title = model.Title, Content = model.Content, Link = model.Link, ButtonText = model.ButtonText, Order = model.Order }; _sliderService.InsertSlide(slide); ViewBag.RefreshPage = true; ViewBag.btnId = btnId; ViewBag.formId = formId; return(View("~/Plugins/Widgets.CSlider/Views/Create.cshtml", model)); }