Exemplo n.º 1
0
 public Cita(Alumno alumno, Maestro maestro, string asunto, DateTime fecha)
 {
     this.Alumno = alumno;
     this.Maestro = maestro;
     this.Asunto = asunto;
     this.Fecha = fecha;
 }
Exemplo n.º 2
0
        protected override object obtener(OPCIONES opcion, string url, params object[] parametros)
        {
            Object regreso = null;
            Console.WriteLine ("Usando STUB");
            if (Alerta != null) {
                Alerta.DismissWithClickedButtonIndex (Alerta.CancelButtonIndex, true);
            }

            switch (opcion) {
            case OPCIONES.ENVIAR_CITA:
                regreso = true;
                break;
            case OPCIONES.VER_HORARIO:
                regreso = new long[]{
                    new DateTime (2013, 5, 3, 14, 30, 0).Ticks,
                    new DateTime (2013, 5, 3, 15, 0, 0).Ticks,
                    new DateTime (2013, 5, 3, 19, 0, 0).Ticks
                };
                break;
            case OPCIONES.LISTA_MAESTROS:
                regreso = new Maestro[]
                {
                    new Maestro (1, "Adrian Macias", "LV-322"),
                    new Maestro (2, "Guillermo Salazar", "LV-322"),
                    new Maestro (3, "Jesus Gaxiola", "CAD 60"),
                    new Maestro (4, "Elsa Padilla", "CAD 52"),
                };
                break;
            case OPCIONES.VALIDA_ALUMNO:
                Alumno alumnoParametro;
                string password;

                    // Si los tipos de los parametros son correctos
                if (parametros [0] is Alumno && parametros [1] is String) {
                    alumnoParametro = (Alumno)parametros [0];
                    password = (string)parametros [1];

                    // Validacion
                    if (alumnoParametro.IdAlumno == 50172 && password.Equals ("")) {
                        regreso = new Alumno (50172, "Juan Leal", "Isw", "*****@*****.**");
                    }
                }
                break;
            default:
                    // ALGO SALIO MAL!
                break;
            }

            return regreso;
        }
Exemplo n.º 3
0
 public Cita(Alumno alumno, Maestro maestro)
     : this(alumno, maestro, null, default(DateTime))
 {
 }
        private void FilaSeleccionada(UITableView tableView, NSIndexPath indexPath)
        {
            // Parsea la lista de maestros
            ListaMaestrosTableSource dataSource = (ListaMaestrosTableSource)this.tblListaMaestros.Source;

            // Obtiene el maestro seleccionado
            maestro = dataSource.ObtenMaestro (indexPath.Item);

            this.PerformSegue (Constants.SEGUE_ENVIAR_CITA, this);
        }
Exemplo n.º 5
0
 public long[] obtenerHorarioMaestro(Maestro maestro)
 {
     long[] res;
     res = (long[])obtener (OPCIONES.VER_HORARIO, "/obtenHorarioMaestro", maestro);
     return res;
 }