Example #1
0
        void editarPublicacion(object sender, EventArgs e)
        {
            usuarioNL nl = new usuarioNL();

            nl.updatePublicacion(txtTituloUpdate.Text, txtContenido.Text, valor, Form1.paseNombre);
            form.Close();

            MessageBox.Show("Editado!!!");

            PantallaPublicaciones pu = new PantallaPublicaciones();

            pu.crearPantalla();
        }
Example #2
0
        public void  crearPublicacion(object sender, EventArgs e)
        {
            if (txtTitulo.Text == "" ||
                txtTitulo.Text == null ||
                txtContenido.Text == "" ||
                txtContenido.Text == null)
            {
                MessageBox.Show("Hay campos vacios");
            }
            else
            {
                usuarioNL us = new usuarioNL();
                us.guardarPublicacion(txtTitulo.Text, txtContenido.Text, lbFecha.Text.ToString(), Form1.paseNombre);

                MessageBox.Show("Creado!!!");

                form.Close();
                PantallaPublicaciones pu = new PantallaPublicaciones();
                pu.crearPantalla();
            }
        }
Example #3
0
        void btnLogin(object sender, EventArgs e)
        {
            String nombre = nombreIngresado.Text.ToString();
            String clave  = nombreClave.Text.ToString();


            usuario usuario = Conexion.getInstance().AccesoSistema(nombre, clave);


            if (usuario != null)
            {
                MessageBox.Show("Logueado");
                this.Hide();
                paseNombre = nombre;
                PantallaPublicaciones pu = new PantallaPublicaciones();
                pu.crearPantalla();
            }
            else
            {
                MessageBox.Show("Error");
            }
        }