コード例 #1
0
 protected void Calendar1_SelectionChanged(object sender, EventArgs e)
 {
     //passing selected date to the getClassess functions
     //more information in DBConnection class
     sessions = DBconnection.getWorkshops(false, Calendar1.SelectedDate.Date);
     displaySessions(sessions);
 }
コード例 #2
0
 protected void btn_showAll_Click(object sender, EventArgs e)
 {
     //get new data from the database and display it to the user
     //more information about the function used below in DBConnection class
     sessions = DBconnection.getWorkshops(true, DateTime.Now.Date);
     //display sessions
     displaySessions(sessions);
 }
コード例 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //if the page is loaded for the first time, read all sessions from the database and display them
     if (!Page.IsPostBack)
     {
         sessions = DBconnection.getWorkshops(true, DateTime.Now.Date);
         displaySessions(sessions);
     }
     //clear the delected date every time the page loads
     Calendar1.SelectedDates.Clear();
 }