コード例 #1
0
        private void LeerBloque()
        {
            //string fichero = @"d:\Ficheros\Bloque.txt";
            string fichero = URLdireccion + "Bloque.txt";

            try
            {
                StreamReader Lector = new StreamReader(fichero);
                String       lineas = Lector.ReadLine();
                while (lineas != "null")
                {
                    Char[]   delimitador = { ',' };
                    String[] palabras    = lineas.Split(delimitador);
                    Bloque   x           = new Bloque();
                    x.blo_id   = palabras[0];
                    x.blo_hora = palabras[1];

                    RegistrosBloque.Add(x);
                    lineas = Lector.ReadLine();
                }
                Lector.Close();
            }
            catch (Exception e)
            {
            }
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //CURSO
            RegistrosCurso = new ArrayList();
            Curso          = new Curso();
            LeerCursos();

            //SALON
            RegistrosSalon = new ArrayList();
            Salon          = new Salon();
            LeerSalon();

            //BLOQUE
            RegistrosBloque = new ArrayList();
            Bloque          = new Bloque();
            LeerBloque();

            //DOCENTE
            RegistrosDocente = new ArrayList();
            Docente          = new Docente();
            LeerDocente();

            //HOARIO
            RegistrosHorario = new ArrayList();
            Horario          = new Horario();
            LeerHorario();


            Mostrar_XHorario();
        }
コード例 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            tipox = Request.QueryString["tipo"];
            idx   = Request.QueryString["id"];

            //CURSO
            RegistrosCurso = new ArrayList();
            Curso          = new Curso();
            LeerCursos();

            //SALON
            RegistrosSalon = new ArrayList();
            Salon          = new Salon();
            LeerSalon();

            //BLOQUE
            RegistrosBloque = new ArrayList();
            Bloque          = new Bloque();
            LeerBloque();

            //DOCENTE
            RegistrosDocente = new ArrayList();
            Docente          = new Docente();
            LeerDocente();

            //HOARIO
            RegistrosHorario = new ArrayList();
            Horario          = new Horario();
            LeerHorario();

            MostrarHorarioTipo(tipox, idx);
        }
コード例 #4
0
        //private String ValidarHora(String hora)
        //{
        //    String posicion = "";
        //    switch (hora)
        //    {
        //        default:
        //            break;
        //    }
        //    return posicion;
        //}


        private String HoraBloque(String id)
        {
            String hora = "";

            foreach (object RegistrosBloque in RegistrosBloque)
            {
                Bloque = (Bloque)RegistrosBloque;
                if (Bloque.blo_id == id)
                {
                    hora = Bloque.blo_hora;
                }
            }
            return(hora);
        }