Exemplo n.º 1
0
        private void LlenarListaAutores()
        {
            Autor_Logica autor_Logica = new Autor_Logica();

            if (!autor_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);
            }
            else
            {
                listaAutor =
                    autor_Logica.RecuperarAutor();
                listaRbAutor = new List <RadioButton>();

                foreach (List <string> autor in listaAutor)
                {
                    InsertarAutor(autor[0] + " " + autor[1] + " " + autor[2]);
                }
            }
        }
Exemplo n.º 2
0
        private void LlenarComboBox()
        {
            Autor_Logica autor_Logica = new Autor_Logica();

            if (!autor_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);
            }
            else
            {
                this.listaAutor = autor_Logica.RecuperarAutor();
                foreach (var autor in listaAutor)
                {
                    string nombreCompleto = autor[0] + " " + autor[1] + " " + autor[2];
                    comboBox_autor.Items.Add(new CheckBox()
                    {
                        Content = nombreCompleto
                    });
                }
            }
        }
Exemplo n.º 3
0
        public void RecuperarProgramaEventoTest()
        {
            Autor_Logica          autor_Logica  = new Autor_Logica();
            List <List <string> > listaRecibida = autor_Logica.RecuperarAutorEvento(1);
            List <List <string> > listaEsperada = new List <List <string> >();

            /*listaEsperada.Add(new List<string>(new string[]
             *  {
             *      "",/*nombre completo/
             *      ""/*fecha MM/dd/yyyy/
             *  }));*/

            listaRecibida.Should().BeEquivalentTo(listaEsperada);
        }
Exemplo n.º 4
0
        public void RecuperarAutorTest()
        {
            Autor_Logica          autor_Logica  = new Autor_Logica();
            List <List <string> > listaRecibida = autor_Logica.RecuperarAutor();
            List <List <string> > listaEsperada = new List <List <string> >();

            listaEsperada.Add(new List <string>(new string[]
            {
                "María José",           /*nombre*/
                "Lares",                /*apellidoPaterno*/
                "Fernandez",            /*apellidoMaterno*/
                "Fernandez",            /*apellidoMaterno*/
                "*****@*****.**", /*correoElectronico*/
                "(Ningún artículo)",    /*articulo*/
            }));

            listaRecibida.Should().BeEquivalentTo(listaEsperada);
        }
Exemplo n.º 5
0
 public frmBuscarAutores()
 {
     InitializeComponent();
     Logica = new Autor_Logica();
 }
Exemplo n.º 6
0
 public frmMant_Autor()
 {
     InitializeComponent();
     Logica = new Autor_Logica();
 }
Exemplo n.º 7
0
        private void llenarComboAutores()
        {
            Autor_Logica Logica = new Autor_Logica();

            cbmAutores.DataSource = Logica.SeleccionarTodos();
        }
        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]
                    });
                }
            }
        }