Esempio n. 1
0
        public void RecuperarAsistenteEventoTest()
        {
            Asistente_Logica asistente_Logica = new Asistente_Logica();
            List <string>    listaRecibida    = asistente_Logica.RecuperarAsistenteEvento(1);
            List <string>    listaEsperada    = new List <string>();

            listaEsperada.Add("Erendira Xica Andrade");

            listaRecibida.Should().BeEquivalentTo(listaEsperada);
        }
Esempio n. 2
0
        private bool NuevoAsistente()
        {
            Asistente_Logica asistente_Logica = new Asistente_Logica();

            if (!asistente_Logica.ComprobarConexion())
            {
                textBlock_mensaje.Text = String.Empty;
                var bold = new Bold(new Run("Se ha perdido conexión con la base de datos")
                {
                    Foreground = Brushes.Red
                });
                textBlock_mensaje.Inlines.Add(bold);
                return(true);
            }
            Asistente nuevoAsistente = new Asistente();

            nuevoAsistente.nombre            = textBox_nombre.Text;
            nuevoAsistente.apellidoPaterno   = textBox_apellidoP.Text;
            nuevoAsistente.apellidoMaterno   = textBox_apellidoM.Text;
            nuevoAsistente.correoElectronico = textBox_correoElectronico.Text;
            return(asistente_Logica.RegistrarAsistente(nuevoAsistente, this.actividadId));
        }
        private void llenarComboBox()
        {
            Evento_Logica evento_Logica = new Evento_Logica();

            if (!evento_Logica.ComprobarConexion())
            {
                textBlock_mensaje.Text = String.Empty;
                var bold = new Bold(new Run("Se ha perdido conexión con la base de datos")
                {
                    Foreground = Brushes.Red
                });
                textBlock_mensaje.Inlines.Add(bold);
                button_cancelar.Content     = "Regresar";
                button_descargar.Visibility = Visibility.Hidden;
            }
            else
            {
                this.eventosUsuario =
                    evento_Logica.RecuperarEventos(this.miembroComite.ComiteId).First <Modelo.Evento>();
                MiembroComite_Logica miembroComite_Logica = new MiembroComite_Logica();
                Asistente_Logica     asistente_Logica     = new Asistente_Logica();
                Participante_Logica  participante_Logica  = new Participante_Logica();
                Magistral_Logica     magistral_Logica     = new Magistral_Logica();
                Autor_Logica         autor_Logica         = new Autor_Logica();

                this.listaMiembroC =
                    miembroComite_Logica.RecuperarMiembroComitePorEvento(eventosUsuario.Id);
                this.listaAsistente =
                    asistente_Logica.RecuperarAsistenteEvento(eventosUsuario.Id);
                this.listaParticipante =
                    participante_Logica.RecuperarParticipanteEvento(eventosUsuario.Id);
                this.listaMagistral =
                    magistral_Logica.RecuperarMagistralEvento(eventosUsuario.Id);
                this.listaAutor =
                    autor_Logica.RecuperarAutorEvento(eventosUsuario.Id);

                foreach (Modelo.MiembroComite miembro in listaMiembroC)
                {
                    string nombreCompleto = miembro.nombre + " " + miembro.apellidoPaterno +
                                            " " + miembro.apellidoMaterno;
                    comboBox_miembroComite.Items.Add(new CheckBox()
                    {
                        Content = nombreCompleto
                    });
                }
                foreach (string asistenteNombre in listaAsistente)
                {
                    comboBox_asistente.Items.Add(new CheckBox()
                    {
                        Content = asistenteNombre
                    });
                }
                foreach (List <string> participante in listaParticipante)
                {
                    comboBox_participante.Items.Add(new CheckBox()
                    {
                        Content = participante[0]
                    });
                }
                foreach (List <string> magistral in listaMagistral)
                {
                    comboBox_magistral.Items.Add(new CheckBox()
                    {
                        Content = magistral[0]
                    });
                }
                foreach (List <string> autor in listaAutor)
                {
                    comboBox_autor.Items.Add(new CheckBox()
                    {
                        Content = autor[0]
                    });
                }
            }
        }