Inheritance: BaseEntity
        public ActionResult Create(Event event_)
        {
            if (string.IsNullOrEmpty(event_.title))
                return View();

            event_.end = _ConvertToFullCalendarFormat(event_.start, event_.endTime);
            event_.start = _ConvertToFullCalendarFormat(event_.start, event_.startTime);

            _EventService.CreateEvent(event_);

            return RedirectToAction("Index");
        }
        public ActionResult Edit(Event event_)
        {
            if (string.IsNullOrEmpty(event_.title))
            {
                EventFilter eventFilter = new EventFilter()
                {
                    Id = event_.Id
                };

                event_ = _EventService.GetEvent(eventFilter);

                return View(event_);
            }

            event_.end = _ConvertToFullCalendarFormat(event_.start, event_.endTime);
            event_.start = _ConvertToFullCalendarFormat(event_.start, event_.startTime);

            _EventService.EditEvent(event_);

            return RedirectToAction("Index");
        }
Exemplo n.º 3
0
 public void EditEvent(Event event_)
 {
     using (IBusinessProvider provider = base.CreateBusinessProvider())
     using (IEventBusinessProvider prov = provider.CreateEventBusinessProvider())
         prov.EditEvent(event_);
 }
 public void EditEvent(Event event_)
 {
     using (IDataProvider provider = base.CreateDataProvider())
     using (IEventRepository repository = provider.CreateEventRepository())
         repository.Update(event_);
 }