Exemplo n.º 1
0
 private void Students_AfterCollectionChange(object sender, ReportingCollectionEventArgs e)
 {
     if (e.Action == ReportingCollectionAction.Add)
     {
         index++;
     }
 }
Exemplo n.º 2
0
        private void Subjects_BeforeCollectionChange(object sender, ReportingCollectionEventArgs e)
        {
            Subject subject = e.Item as Subject;

            if (Subjects.Any(s => s.Name == subject.Name))
            {
                e.Cancel = true;
            }
        }
Exemplo n.º 3
0
        private void Students_BeforeCollectionChange(object sender, ReportingCollectionEventArgs e)
        {
            Student student = e.Item as Student;

            if (Students.ContainsValue(student))
            {
                e.Cancel = false;
            }
        }
Exemplo n.º 4
0
        private void Classes_BeforeCollectionChange(object sender, ReportingCollectionEventArgs e)
        {
            Class @class = e.Item as Class;

            if (ClassExist(@class.Name))
            {
                e.Cancel = true;
            }
        }