public void doWork() { Updater eventUpdater = GlobalHandlers.DatabaseHandler.getUpdater(handlers.instances.ViewerHandler.Feature.EVENTS); if (eventUpdater.Type_Id == "0") { List <Event> eventList = MissouriRiver.getEvents(eventUpdater.Link); GlobalHandlers.DatabaseHandler.updateEvents(eventList); } }
protected void Page_Load(object sender, EventArgs e) { if (!GlobalHandlers.SessionHandler.isLoggedIn()) { Response.Redirect("~/admin/login/default.aspx", false); return; } if (Request.QueryString["todo"] != null) { string whatToDo = Request.QueryString["todo"]; if (whatToDo == "update") { string settingsMissouriRiverID = GlobalHandlers.SettingHandler.Settings["school_id_missouri_river"]; List <Event> ev = MissouriRiver.getEvents("http://www.missouririverconf.org/g5-bin/client.cgi?G5genie=167&school_id=" + settingsMissouriRiverID + "&XMLCalendar=3"); GlobalHandlers.DatabaseHandler.updateEvents(ev); GlobalHandlers.Debugger.write("updated events - requested"); } } loadTodaysEvents(); loadFilters(); }