Exemplo n.º 1
0
 public List<horariosClasesDTO> c_XIdEstudianteXINGrupo(horariosDTOFiltro dto, bitacorasDTO dtob)
 {
     List<horariosClasesDTO> m = BLL.c_XIdEstudianteXINGrupo(dto);
     return m;
 }
Exemplo n.º 2
0
 public List<horariosClasesDTO> c_XIdProfe(horariosDTOFiltro dto, bitacorasDTO dtob)
 {
     List<horariosClasesDTO> m = BLL.c_XIdProfe(dto);
     return m;
 }
Exemplo n.º 3
0
 public List<horariosClasesDTO> c_XIdEstudianteXINGrupo(horariosDTOFiltro h)
 {
     return r.c_XIdEstudianteINGrupo(h);
 }
Exemplo n.º 4
0
 public List<horariosClasesDTO> c_XIdProfe(horariosDTOFiltro h)
 {
     return r.c_XIdProfe(h);
 }
Exemplo n.º 5
0
 public List<horariosClasesDTO> c_XIdProfeXINGrupo(horariosDTOFiltro h)
 {
     try
     {
         List<horariosClasesDTO> l = new List<horariosClasesDTO>();
             l = c_mProfeXGrupo(h);
             return l;
     }
     catch
     {
         return null;
     }
 }
Exemplo n.º 6
0
 public List<horariosClasesDTO> c_XIdProfe(horariosDTOFiltro h)
 {
     try
     {
         // primero consultamos las asignatuas y grupos que le han asignado
         List<matricula1> n = bd.matricula1.Where(t => t.id_profesor == h.id_profe).OrderBy(t => t.id_asignatura).ToList();
         // luego consultamos los horarios por asignaturas y grupos que le han asignado
         if (n.Count != 0)
         {
             List<horariosClasesDTO> hh = new List<horariosClasesDTO>();
             foreach (matricula1 item in n)
             {  // fianlmente lo agregamos uno por uno
                 horariosClasesDTO l = new horariosClasesDTO();
                 l = c_horariosXIdGrupoXIdAsig(item.id_grupo.ToString(),item.id_asignatura.ToString());
                 hh.Add(l);
             }
             if (hh.Count !=0)
             {
                 return hh;
             }
             else { return null; }
         }
         else { return null; }
     }
     catch
     {
         return null;
     }
 }
Exemplo n.º 7
0
        // Esta listo. lo utilizara con los acudientes para sus hijos
        public List<horariosClasesDTO> c_XIdGrupo(horariosDTOFiltro h)
        {
            try
            {
                List<horariosClasesDTO> d = new List<horariosClasesDTO>();
                List<horarios> ma = bd.horarios.Where(
                        t =>t.id_grupo == h.id_grupo
                ).OrderBy(t=>t.id_asignatura).ToList();
                if (ma.Count != 0)
                {
                    foreach (horarios item in ma)
                    {
                        horariosClasesDTO ds = new horariosClasesDTO();
                        ds.id_asignatura = item.asignatura.nombre.ToString();
                        string g = item.id_grupo.ToString();

                        if (item.dia.ToString() == "LUNES")
                        {
                            ds.lunes = item.horaI.ToString() + "-" + item.horaF.ToString() +" / Grupo: "+ g; ds.martes = ""; ds.miercoles = ""; ds.jueves = ""; ds.viernes = ""; ds.sabado = "";
                            ds.domingo = "";
                        }
                        if (item.dia.ToString() == "MARTES")
                        {
                            ds.lunes = ""; ds.martes = item.horaI.ToString() + "-" + item.horaF.ToString() + " / Grupo:" + g; ds.miercoles = ""; ds.jueves = ""; ds.viernes = ""; ds.sabado = "";
                            ds.domingo = "";
                        }
                        if (item.dia.ToString() == "MIERCOLES")
                        {
                            ds.lunes = ""; ds.martes = ""; ds.miercoles = item.horaI.ToString() + "-" + item.horaF.ToString() + " / Grupo:" + g;
                            ds.jueves = ""; ds.viernes = ""; ds.sabado = ""; ds.domingo = "";
                        }
                        if (item.dia.ToString() == "JUEVES")
                        {
                            ds.lunes = ""; ds.martes = ""; ds.miercoles = ""; ds.jueves = item.horaI.ToString() + "-" + item.horaF.ToString() + " / Grupo:" + g;
                            ds.viernes = ""; ds.sabado = ""; ds.domingo = "";
                        }
                        if (item.dia.ToString() == "VIERNES")
                        {
                            ds.lunes = ""; ds.martes = ""; ds.miercoles = ""; ds.jueves = ""; ds.viernes = item.horaI.ToString() + "-" + item.horaF.ToString() + " / Grupo:" + g; ds.sabado = "";
                            ds.domingo = "";
                        }
                        if (item.dia.ToString() == "SABADO")
                        {
                            ds.lunes = ""; ds.martes = ""; ds.miercoles = ""; ds.jueves = ""; ds.viernes = "";
                            ds.sabado = item.horaI.ToString() + "-" + item.horaF.ToString() + " / Grupo:" + g; ds.domingo = "";
                        }
                        if (item.dia.ToString() == "DOMINGO")
                        {
                            ds.lunes = ""; ds.martes = ""; ds.miercoles = ""; ds.jueves = ""; ds.viernes = ""; ds.sabado = "";
                            ds.domingo = item.horaI.ToString() + "-" + item.horaF.ToString() + " / Grupo:" + g;
                        }
                        d.Add(ds);
                    }
                }
                if (d.Count != 0)
                {
                    d = d.OrderBy(t => t.id_asignatura).ToList();
                    return d;
                }
                else
                {
                    List<horariosClasesDTO> fd = new List<horariosClasesDTO>();
                    horariosClasesDTO fds = new horariosClasesDTO();
                    fds.id_asignatura = "";
                    fds.lunes = "Sin asignar";
                    fds.martes = "Sin asignar";
                    fds.miercoles = "Sin asignar";
                    fds.jueves = "Sin asignar";
                    fds.viernes = "Sin asignar";
                    fds.sabado = "";
                    fds.domingo = "";
                    fd.Add(fds);
                    return fd;
                }
            }
            catch { return null; }
        }
Exemplo n.º 8
0
 public List<horariosClasesDTO> c_XIdEstudianteINGrupo(horariosDTOFiltro h)
 {
     try
     {
         List<horariosClasesDTO> l = new List<horariosClasesDTO>();
         l = c_XIdGrupo(h);
         return l;
     }
     catch
     {
         return null;
     }
 }
Exemplo n.º 9
0
 public List<horariosClasesDTO> c_mProfeXGrupo(horariosDTOFiltro h)
 {
     try
     {
         List<matricula1> n = bd.matricula1.Where(t => t.id_profesor == h.id_profe && t.id_grupo == h.id_grupo).OrderBy(t => t.id_asignatura).ToList();
         if (n.Count != 0)
         {
             List<horariosClasesDTO> hh = new List<horariosClasesDTO>();
             foreach (matricula1 item in n)
             { 
                 horariosClasesDTO l = new horariosClasesDTO();
                 l = c_horariosXIdGrupoXIdAsig(item.id_grupo.ToString(), item.id_asignatura.ToString());
                 hh.Add(l);
             }
             if (hh.Count != 0)
             {
                 return hh;
             }
             else { return null; }
         }
         else { return null; }
     }
     catch
     {
         return null;
     }
 }