Пример #1
0
        private void btnInicio_Click(object sender, EventArgs e)
        {
            if (txtIdentificacion.Text == "" || txtContraseña.Text == "")
            {
                MessageBox.Show("Por favor llenar todos los campos", "",
                                MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                int resultado = iniciarSesion(txtIdentificacion.Text, txtContraseña.Text);

                switch (resultado)
                {
                case 0:
                    frmCitas frmCitas = new frmCitas();
                    frmCitas.Show();
                    break;

                case 1:
                    MessageBox.Show("Contraseña incorrecta", "",
                                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    break;

                case 2:
                    MessageBox.Show("La identificación no está registrada", "",
                                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    break;
                }
            }
        }
Пример #2
0
        private void btnActualizar_Click(object sender, EventArgs e)
        {
            ActiveForm.Dispose();
            frmCitas cargar = new frmCitas();

            cargar.Show();
            btnConfirmarCita.Enabled = false;
        }