Ejemplo n.º 1
0
        private static Enrollment funcMain6(EnrollmentMerge p19)
        {
            if (p19 == null)
            {
                return(null);
            }
            Enrollment result = new Enrollment();

            if (p19.EnrollmentID != null)
            {
                result.EnrollmentID = (int)p19.EnrollmentID;
            }

            if (p19.CourseID != null)
            {
                result.CourseID = (int)p19.CourseID;
            }

            if (p19.StudentID != null)
            {
                result.StudentID = (int)p19.StudentID;
            }

            if (p19.Grade != null)
            {
                result.Grade = (Grade?)Enum <Grade> .Parse(p19.Grade);
            }
            return(result);
        }
Ejemplo n.º 2
0
        private static ICollection <Enrollment> funcMain5(ICollection <EnrollmentMerge> p17, ICollection <Enrollment> p18)
        {
            if (p17 == null)
            {
                return(null);
            }
            ICollection <Enrollment> result = new List <Enrollment>(p17.Count);

            IEnumerator <EnrollmentMerge> enumerator = p17.GetEnumerator();

            while (enumerator.MoveNext())
            {
                EnrollmentMerge item = enumerator.Current;
                result.Add(funcMain6(item));
            }
            return(result);
        }
Ejemplo n.º 3
0
        private static ICollection <Enrollment> funcMain5(ICollection <EnrollmentMerge> p17, ICollection <Enrollment> p18)
        {
            if (p17 == null)
            {
                return(null);
            }
            ICollection <Enrollment> result = new List <Enrollment>(p17.Count);

            IEnumerator <EnrollmentMerge> enumerator = p17.GetEnumerator();

            while (enumerator.MoveNext())
            {
                EnrollmentMerge item = enumerator.Current;
                result.Add(item == null ? null : new Enrollment()
                {
                    EnrollmentID = item.EnrollmentID == null ? 0 : (int)item.EnrollmentID,
                    CourseID     = item.CourseID == null ? 0 : (int)item.CourseID,
                    StudentID    = item.StudentID == null ? 0 : (int)item.StudentID,
                    Grade        = item.Grade == null ? null : (Grade?)Enum <Grade> .Parse(item.Grade)
                });
            }
            return(result);
        }