public string UpdateEventExpired(int id) { EventRepository db = new EventRepository(); Event e = db.GetById(id); e.Expired = true; string result = db.UpdateOnSubmit(e); return result; }
public string UpdateEvent(int id, string title, string desc, DateTime date, string time, string venue, bool isexpired) { EventRepository db = new EventRepository(); Event e = new Event { id = id, Title = title, Description = desc, DateOfEvent = date, Time = time, Venue = venue, Expired = isexpired }; string result = db.UpdateOnSubmit(e); return result; }