示例#1
0
 private void Students_AfterCollectionChange(object sender, ReportingCollectionEventArgs e)
 {
     if (e.Action == ReportingCollectionAction.Add)
     {
         index++;
     }
 }
示例#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;
            }
        }
示例#3
0
        private void Students_BeforeCollectionChange(object sender, ReportingCollectionEventArgs e)
        {
            Student student = e.Item as Student;

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

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