Exemplo n.º 1
0
        public void loadpersona()
        {
            Ventanaprincipal Ventana1   = new Ventanaprincipal();
            BindingSource    dataSource = new BindingSource();

            dataSource.DataSource = servicio.GetAll();

            Ventana1.dgvdata.DataSource = dataSource;
            Ventana1.dgvdata.ClearSelection();
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (Ventanaprincipal.index < 0)
            {
                Addpersonas();
                this.Hide();
                Ventanaprincipal Principal = new Ventanaprincipal();

                Principal.ShowDialog();
            }
            else
            {
                editar();
            }
        }
Exemplo n.º 3
0
        private void btnlogin_Click(object sender, EventArgs e)
        {
            if (txtcuenta.Text == "admin" && txtcontra.Text == "1234")
            {
                MessageBox.Show("Se ha iniciado sesion...");

                this.Hide();

                Ventanaprincipal Ventana2 = new Ventanaprincipal();

                Ventana2.Show();
            }
            else
            {
                MessageBox.Show("Error al iniciar sesion... \nEl Usuario o la Contraseña son incorrectos");
            }
        }