Beispiel #1
0
        public void login()
        {
            registro Registro = new registro();

            if (tb_nombreU.Text == null)
            {
                if (tb_contraseña.Text == null)
                {
                    MessageBox.Show("Escribe el usuario y la contraseña");
                }
            }
            else
            {
                frm_contactos Contactos = new frm_contactos();
                Contactos.Show();
                this.Hide();
            }
        }
        private void add()
        {
            repos2 Repos2 = new repos2();

            Repos2.nombre2   = txt_nombre.Text;
            Repos2.apellido  = txt_apellido.Text;
            Repos2.direccion = txt_direccion.Text;
            Repos2.numerop   = txt_Np.Text;
            Repos2.numerot   = txt_nt.Text;

            if (reposeditar != null)
            {
                cont.aditar(reposeditar.Value, Repos2);
            }
            else
            {
                cont.agregar(Repos2);
            }
            MessageBox.Show("Se a agregado el contacto");
            frm_contactos newform = new frm_contactos();

            newform.Show();
            this.Close();
        }