ventana personal completamente terminada
This commit is contained in:
+10
-5
@@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user