Ejemplo n.º 1
0
        public async Task <List <SalasPorUEDTO> > GetListClassRoomSchool(string schoolCodeEol, string schooYear)
        {
            try
            {
                var endPoint      = new EndpointsAPI();
                var schoolApi     = new EscolasAPI(endPoint);
                var listClassRoom = await schoolApi.GetTurmasPorEscola(int.Parse(schoolCodeEol), schooYear, _token);

                if (listClassRoom != null)
                {
                    return(listClassRoom);
                }

                else
                {
                    return(null);
                }
            }
            catch (System.Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 2
0
        public async Task <List <SalasPorUEDTO> > GetListClassRoomSchool(string schoolCodeEol, string schooYear)
        {
            try
            {
                var endPoint        = new EndpointsAPI();
                var schoolApi       = new EscolasAPI(endPoint);
                var eolCodeParseado = int.TryParse(schoolCodeEol, out int result);
                var listClassRoom   = await schoolApi.GetTurmasPorEscola(eolCodeParseado?result : 0, schooYear, _token);

                if (listClassRoom != null)
                {
                    return(listClassRoom.OrderBy(x => x.NomeTurma).ToList());
                }

                else
                {
                    return(null);
                }
            }
            catch (System.Exception ex)
            {
                throw ex;
            }
        }