Exemple #1
0
        private static void ExampleGetDTOFromConsole()
        {
            string json  = Console.ReadLine();
            Group  group = JSONConvert.ConvertJSONToDTO <Group>(json);

            Console.WriteLine(group.NameGroup);
            string jsonOfDTO = JSONConvert.ConvertDTOToJSON <Group>(group);

            Console.WriteLine("jsonOfDTO = " + jsonOfDTO);
        }
Exemple #2
0
        public List <Faculty> GetFaculties(string year, string idFilial)
        {
            var parameters = new Dictionary <string, string>
            {
                { "year", year },
                { "idFilial", idFilial }
            };
            string json = HttpRequstHelper.ExecuteGet("GetFaculties", parameters);

            return(JSONConvert.ConvertJSONToListDTO <Faculty>(json));
        }
Exemple #3
0
        public List <Courses> GetCourses(string year, string idFilial, string idFaculty, string idsSpecialty)
        {
            var parameters = new Dictionary <string, string>
            {
                { "year", year },
                { "idFilial", idFilial },
                { "idFaculty", idFaculty }
            };
            string json = HttpRequstHelper.ExecutePost("GetCourses", parameters, idsSpecialty);

            return(JSONConvert.ConvertJSONToListDTO <Courses>(json));
        }