ventana personal completamente terminada

This commit is contained in:
carlos
2024-01-16 22:06:23 -06:00
parent 28a2ec0842
commit 038bb92384
27 changed files with 1044 additions and 347 deletions
+52
View File
@@ -0,0 +1,52 @@
using compabetov2.database;
using compabetov2.database.modelos;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace compabetov2
{
public partial class ModificarContra : Form
{
private Empleado empleado;
public ModificarContra(Empleado empleado)
{
InitializeComponent();
this.empleado = empleado;
}
private void btnConfirmar_Click(object sender, EventArgs e)
{
string contra = txtContra.Text;
string contraConfi = txtConfi.Text;
if (contra.Equals(contraConfi))
{
if (service.modificarContra(empleado, contra))
{
Close();
}
}
else
{
MessageBox.Show("Las contraseña no son iguales", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void btnCancelar_Click(object sender, EventArgs e)
{
Close();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
}
}