public ActionResult Update(EventMeta e) { string retValue = string.Empty; if (ModelState.IsValid) { TCMIContentServices.TCMIContentSoapClient client = new TCMIContentSoapClient(); retValue = client.UpdateEvent(e.id, e.Title, e.Description, e.DateOfEvent, e.Time, e.Venue, e.Expired.Value); ViewBag.ReturnMessage = retValue; return RedirectToAction("index"); } ViewBag.ReturnMessage = retValue; return View(); }
public ActionResult Update(int id) { string retValue = string.Empty; TCMI.Admin.TCMIContentServices.Event e = client.GetAllEvents().FirstOrDefault(_e => _e.id.Equals(id)); EventMeta ee = new EventMeta { id = e.id, Title = e.Title, Description = e.Description, DateOfEvent = e.DateOfEvent, Time = e.Time, Venue = e.Venue, Expired = e.Expired }; ViewBag.ReturnMessage = retValue; return View(ee); }
public ActionResult Remove(int id) { TCMI.Admin.TCMIContentServices.Event e = client.GetAllEvents().FirstOrDefault(_e => _e.id.Equals(id)); EventMeta ee = new EventMeta { id = e.id, Title = e.Title, Description = e.Description, DateOfEvent = e.DateOfEvent, Time = e.Time, Venue = e.Venue, Expired = e.Expired }; return View(ee); }