diff --git a/Cuentas/cuentas.cs b/Cuentas/cuentas.cs index c8a26bb..7d132ba 100644 --- a/Cuentas/cuentas.cs +++ b/Cuentas/cuentas.cs @@ -9,6 +9,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; +using compabetov2.admin; namespace compabetov2 { @@ -55,7 +56,7 @@ namespace compabetov2 foreach (Cuenta cuenta in cuentas) { - + TableLayoutPanel carta = new TableLayoutPanel(); carta.RowCount = 1; carta.ColumnCount = 2; @@ -84,7 +85,7 @@ namespace compabetov2 total.Font = new Font(total.Font.FontFamily, 12); total.Width = 600; - Label estado = new Label(); + Label estado = new Label(); estado.Text = $"Estado: {cuenta.estado}"; estado.Font = new Font(total.Font.FontFamily, 12); estado.Width = 600; @@ -221,16 +222,16 @@ namespace compabetov2 MessageBox.Show(mensaje); }); - HUDPanel.Controls.Add(btnVer,2,0); + HUDPanel.Controls.Add(btnVer, 2, 0); carta.Controls.Add(HUDPanel, 1, 0); } - carta.Controls.Add(infoPanel,0,0); - + carta.Controls.Add(infoPanel, 0, 0); + panelCuenta.Controls.Add(carta); - + } } @@ -260,19 +261,16 @@ namespace compabetov2 private void button3_Click(object sender, EventArgs e) { - private void button3_Click(object sender, EventArgs e) + if (loginPrincipal.tipo.Equals("empleado")) { - if (loginPrincipal.tipo.Equals("empleado")) - { - MessageBox.Show("Usted no tiene permisos de acceder a este apartado"); - } - else - { - crud crud = new crud(); - crud.Owner = this; - crud.Show(); - - } + MessageBox.Show("Usted no tiene permisos de acceder a este apartado"); } + else + { + crud crud = new crud(); + crud.Owner = this; + crud.Show(); + } + } } }