Esempio n. 1
0
        static void AddTeacherToClass()
        {
            ServiceFactory factory  = new ServiceFactory();
            IClassService  cService = factory.CreateClassService();

            string classGuid = "d3a65d5b-2045-47db-a326-ab787a2fe371";

            List <string> teacherList = new List <string>()
            {
                "user_10",
                "user_11"
            };

            bool success = cService.AddTeachers(classGuid, teacherList);

            if (!success)
            {
                printError(cService.LastError);
            }
            else
            {
                Console.WriteLine(string.Format("Teachers are added specified class {0}.", classGuid));
            }
        }