示例#1
0
        public static void GetXStudentsByXLea(XPress xPress)
        {
            List <XStudentType> xStudentTypeList = xPress.GetXStudentsByXLea(LEA_REFID, OPAQUE_MARKER).Data;

            foreach (XStudentType o in xStudentTypeList)
            {
                Console.WriteLine(o.refId + " | " + o.Metadata.SchoolYear);
            }
        }
示例#2
0
        static void Main(string[] args)
        {
            Authenticator auth = Authenticator.Instance;

            auth.Authenticate(authUrl, clientId, clientSecret);

            foreach (Endpoint e in auth.GetEndpoints(providerId))
            {
                XPress xPress = new XPress(e.href);

                if (xPress.GetXStudentsByXLea("15077B52-7D2A-4855-B41F-37FBA242522E").Data != null)
                {
                    foreach (XStudentType s in xPress.GetXStudentsByXLea("15077B52-7D2A-4855-B41F-37FBA242522E").Data)
                    {
                        Console.WriteLine("refId: " + s.refId);
                        Console.WriteLine("##### BEGIN ENROLLMENT #####");
                        Console.WriteLine("leaRefId: " + s.enrollment.leaRefId);
                        Console.WriteLine("schoolRefId: " + s.enrollment.schoolRefId);
                        Console.WriteLine("membershipType: " + s.enrollment.membershipType);
                        Console.WriteLine("entryDate: " + s.enrollment.entryDate);
                        Console.WriteLine("##### BEGIN ENTRY TYPE #####");
                        Console.WriteLine("ENTRY TYPE CODE: " + s.enrollment.entryType.code);
                        foreach (XOtherCodeType oct in s.enrollment.entryType.otherCode)
                        {
                            Console.WriteLine("OTHER ENTRY TYPE CODENAME: " + oct.codesetName);
                            Console.WriteLine("OTHER ENTRY TYPE CODE: " + oct.otherCodeValue);
                        }
                        Console.WriteLine("##### END ENTRY TYPE #####");
                        Console.WriteLine("exitDate: " + s.enrollment.exitDate);
                        Console.WriteLine("##### BEGIN EXIT TYPE #####");
                        Console.WriteLine("EXIT TYPE CODE: " + s.enrollment.exitType.code);
                        foreach (XOtherCodeType oct in s.enrollment.exitType.otherCode)
                        {
                            Console.WriteLine("OTHER EXIT TYPE CODENAME: " + oct.codesetName);
                            Console.WriteLine("OTHER EXIT TYPE CODE: " + oct.otherCodeValue);
                        }
                        Console.WriteLine("##### END EXIT TYPE #####");
                        Console.WriteLine("========================================");
                    }
                }
            }

            Console.ReadLine();
        }