Esempio n. 1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (teacherSelected != null)
            {
                ITeacherService teacherService = new TeacherService();
                string          message        = String.Empty;

                if (!teacherService.DeactivateTeacher(teacherSelected.TeacherId, ref message))
                {
                    teacherSelected.Deactivated = true;
                    Log("D", "Teachers", teacherSelected);

                    MessageBox.Show("Deactivation of User Failed");
                }
                else
                {
                    MessageBox.Show("Deactivated succesfully!");
                }
            }
        }