示例#1
0
 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();
 }
示例#2
0
 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);
 }
示例#3
0
        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);
        }