public ActionResult Edit(Event Event) { if (ModelState.IsValid) { var dao = new EventDao(); var result = dao.Update(Event); if (result) { return(RedirectToAction("Index", "Event")); } else { ModelState.AddModelError("", "Modify Event successfully"); } } return(View("Index")); }
public bool UpdateEvent() { if (detailWindow.DetailName.Length == 0) { detailWindow.Status = "Event name is empty"; return(false); } EventDao eventDao = new EventDao(); eventDao.MakeConnection(Properties.Resources.strConnection); EventDto eventDto = new EventDto(); eventDto.Name = detailWindow.DetailName; eventDto.Description = detailWindow.Desciption; eventDto.Id = detailWindow.Id; return(eventDao.Update(eventDto)); }
public void Update(IBaseObject baseObject) { EventDao.Update(baseObject); }