示例#1
0
        private void bAddNot_Click(object sender, EventArgs e)
        {
            try
            {
                this.titulo = tbTitulo.Text;
                this.autor  = tbAutor.Text;
                this.cuerpo = tbCuerpo.Text;
                this.fecha  = DateTime.Now.ToShortDateString();

                if (titulo.Equals("") || autor.Equals("") || cuerpo.Equals(""))
                {
                    throw new Exception("Aún hay campos por rellenar.");
                }
                else
                {
                    noticiaCreada = new Noticias(titulo, autor, cuerpo, fecha);
                    MessageBox.Show("Noticia creada correctamente.");
                }
                fNoticia noticia = new fNoticia(user);
                this.Hide();
                noticia.ShowDialog();
                this.Close();
            } catch (Exception ex)
            {
                MessageBox.Show("ERROR: " + ex.Message);
            }
        }
示例#2
0
        private void bNoticias_Click(object sender, EventArgs e)
        {
            fNoticia noticias = new fNoticia(ong);

            this.Hide();
            noticias.ShowDialog();
            this.Close();
        }
示例#3
0
        private void pictureBox3_Click(object sender, EventArgs e)
        {
            fNoticia noticia = new fNoticia(user);

            this.Hide();
            noticia.ShowDialog();
            this.Close();
        }