Example #1
0
        private void btn_Act_Add_Click(object sender, EventArgs e)
        {
            currentActivity.Description   = textBox_Act_Name.Text;
            currentActivity.Id            = int.Parse(textBox_Act_ID.Text);
            currentActivity.countMentors  = int.Parse(textBox_Act_Mentors.Text);
            currentActivity.countStudents = int.Parse(textBox_Act_Students.Text);

            SomerenLogic.Activity_Service actService = new SomerenLogic.Activity_Service();
            actService.AddActivity(currentActivity);
            this.Close();
        }
Example #2
0
        private void btnAddActivityconfirm_Click(object sender, EventArgs e)
        {
            SomerenLogic.Activity_Service activityService = new SomerenLogic.Activity_Service();

            int    ActivityId                = int.Parse(txt_AddActivityId.Text);
            string ActivityOmschrijving      = txt_AddActivityName.Text;
            int    ActivityAantalStudenten   = int.Parse(txt_AddActivityaantalstudenten.Text);
            int    ActivityAantalBegeleiders = int.Parse(txt_AddActivityAantalbegeleiders.Text);

            activityService.AddActivity(ActivityId, ActivityOmschrijving, ActivityAantalStudenten, ActivityAantalBegeleiders);

            pnl_AddActivity.Hide();
            listViewActivities.Refresh();
            listViewActivities.Items.Clear();
            ShowActivities();
        }