예제 #1
0
        public static Horario GetHorarioById(int pk)
        {
            List <Horario> listadeHorarios = new List <Horario>();

            OnTime.DAL.HorariosDSTableAdapters.HorariosTableAdapter objDataSet = new OnTime.DAL.HorariosDSTableAdapters.HorariosTableAdapter();
            HorariosDS.HorariosDataTable dtHorario = objDataSet.GetHorarioById(pk);
            Horario objHorario = rowToDto(dtHorario[0]);

            return(objHorario);
        }
예제 #2
0
        public static List <Horario> SelectAll()
        {
            List <Horario> listadeHorarios = new List <Horario>();

            OnTime.DAL.HorariosDSTableAdapters.HorariosTableAdapter objDataSet = new OnTime.DAL.HorariosDSTableAdapters.HorariosTableAdapter();
            HorariosDS.HorariosDataTable dtHorario = objDataSet.GetAllHorarios();

            foreach (HorariosDS.HorariosRow row in dtHorario)
            {
                Horario objHorario = rowToDto(row);
                listadeHorarios.Add(objHorario);
            }
            return(listadeHorarios);
        }