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
+10 -5
View File
@@ -54,7 +54,9 @@ namespace compabetov2
PictureBox imgEmpleado = new PictureBox();
imgEmpleado.Dock = DockStyle.Fill;
string rutaImg = Path.Combine(Application.StartupPath, "Resources", "usuarios", "usuarioAnonimo.png");
string rutaImg = empleado.img.Equals("") ?
Path.Combine(Application.StartupPath, "Resources", "usuarios", "usuarioAnonimo.png") :
Path.Combine(Application.StartupPath, "Resources", "usuarios", empleado.img);
imgEmpleado.Image = Image.FromFile(rutaImg);
imgEmpleado.BackgroundImageLayout = ImageLayout.Stretch;
imgEmpleado.SizeMode = PictureBoxSizeMode.Zoom;
@@ -119,8 +121,10 @@ namespace compabetov2
"Confirmación", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result == DialogResult.Yes)
{
service.eliminarEmpleado(empleado.idempleado);
llenarPanel();
if (service.eliminarEmpleado(empleado))
{
llenarPanel();
}
}
});
@@ -130,7 +134,7 @@ namespace compabetov2
btnLogin.FlatStyle = FlatStyle.Flat;
btnLogin.FlatAppearance.BorderSize = 0;
btnLogin.Font = new Font(btnVer.Font.FontFamily, 16);
if(empleado.fkIdLogin == null) {
if(empleado.fkIdLogin == -1) {
btnLogin.Click += new EventHandler(delegate (object sender, EventArgs e)
{
@@ -143,7 +147,8 @@ namespace compabetov2
btnLogin.BackColor = Color.Yellow;
btnLogin.Click += new EventHandler(delegate (object sender, EventArgs e)
{
Confirmacion pregunta = new Confirmacion(empleado,this);
pregunta.Show();
});
}