Exemplo n.º 1
0
        /*
         * Methods for Detention tasks
         */
        //adding to detention form
        private void Add_Click(object sender, EventArgs e)
        {
            var editDetentionForm = new EditDetentionForm();

            editDetentionForm.FormClosing += NewDetentionFormClosing;
            editDetentionForm.ShowDialog(this);
        }
Exemplo n.º 2
0
        //editing objects in the detention form
        private void Edit_Click(object sender, EventArgs e)
        {
            var editDetentionForm = new EditDetentionForm();

            if (detentionBox1.SelectedIndex > -1)
            {
                var d = (Detention)detentionBox1.SelectedItem;
                editDetentionForm.LoadDetentionRecord(d);
                editDetentionForm.FormClosing += DetentionFormClosing;
                editDetentionForm.ShowDialog(this);
            }
        }