public bool SetAvailability(Availability available)
        {
            try
            {
                Connect();
                cmd = new OracleCommand();
                cmd.Connection = con;
                cmd.CommandText = "UPDATE TBESCHIKBAARHEID SET DAGDEEL = :newDagDeel WHERE DAGNAAM = :newDagNaam AND VRIJWILLIGERID = :newVrijwilligerid";
                cmd.Parameters.Add("newDagDeel", available.TimeOfDay);
                cmd.Parameters.Add("newDagNaam", available.Day);
                cmd.Parameters.Add("newVrijwilligerid", available.volunid);
                cmd.ExecuteNonQuery();
                return true;
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return false;
            }
            finally
            {
                Disconnect();
            }
        }
 public bool SetAvailablilty(Availability available)
 {
     try
     {
          databasehandler.SetAvailability(available);
         return true;
     }
     catch
     {
         return false;
     }
 }
        private void UpdateAvailability()
        {
            Volunteer currentuser = (Volunteer)Session["currentUser"];
            //Maandag
            Availability availablemonday = new Availability("Maandag", ddl_Monday.SelectedItem.Text, currentuser.VolunteerID);
            volunhandler.SetAvailablilty(availablemonday);

            //Dinsdag
            Availability availabletuesday = new Availability("Dinsdag", ddl_Tuesday.SelectedItem.Text, currentuser.VolunteerID);
            volunhandler.SetAvailablilty(availabletuesday);

            //Woensdag
            Availability availablewednesday = new Availability("Woensdag", ddl_Wednesday.SelectedItem.Text, currentuser.VolunteerID);
            volunhandler.SetAvailablilty(availablewednesday);

            //Donderdag
            Availability availablethursday = new Availability("Donderdag", ddl_Thursday.SelectedItem.Text, currentuser.VolunteerID);
            volunhandler.SetAvailablilty(availablethursday);

            //Vrijdag
            Availability availablefriday = new Availability("Vrijdag", ddl_Friday.SelectedItem.Text, currentuser.VolunteerID);
            volunhandler.SetAvailablilty(availablefriday);

            //Zaterdag
            Availability availablesaturday = new Availability("Zaterdag", ddl_Saturday.SelectedItem.Text, currentuser.VolunteerID);
            volunhandler.SetAvailablilty(availablesaturday);

            //Zondag
            Availability availablesunday = new Availability("Zondag", ddl_Sunday.SelectedItem.Text, currentuser.VolunteerID);
            volunhandler.SetAvailablilty(availablesunday);
        }