From 4b060b83a7c3960047429f804cc7ada140d7104e Mon Sep 17 00:00:00 2001 From: Michael Robles Date: Sun, 30 Jun 2024 08:55:52 -0700 Subject: [PATCH] Subo Cambios --- Cuentas/cuentas.Designer.cs | 1 + Cuentas/cuentas.cs | 29 +++++++++++++++++++++++++++-- Envios/envios.cs | 12 ++++++++++-- Ventas/vender.cs | 13 ++++++++++--- 4 files changed, 48 insertions(+), 7 deletions(-) diff --git a/Cuentas/cuentas.Designer.cs b/Cuentas/cuentas.Designer.cs index b30a8f8..60ed6b3 100644 --- a/Cuentas/cuentas.Designer.cs +++ b/Cuentas/cuentas.Designer.cs @@ -117,6 +117,7 @@ this.button3.TabIndex = 10; this.button3.Text = "Productos"; this.button3.UseVisualStyleBackColor = false; + this.button3.Click += new System.EventHandler(this.button3_Click); // // button5 // diff --git a/Cuentas/cuentas.cs b/Cuentas/cuentas.cs index fa4499d..c8a26bb 100644 --- a/Cuentas/cuentas.cs +++ b/Cuentas/cuentas.cs @@ -246,8 +246,33 @@ namespace compabetov2 private void button2_Click(object sender, EventArgs e) { - Estadiscticas verstats = new Estadiscticas(); - verstats.Show(); + if (loginPrincipal.tipo.Equals("empleado")) + { + MessageBox.Show("Usted no tiene permisos de acceder a este apartado"); + } + else + { + Estadiscticas estadiscticas = new Estadiscticas(); + estadiscticas.Owner = this; + estadiscticas.Show(); + } } + + private void button3_Click(object sender, EventArgs e) + { + private void button3_Click(object sender, EventArgs e) + { + 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(); + + } + } } } diff --git a/Envios/envios.cs b/Envios/envios.cs index 92f4b78..1568d00 100644 --- a/Envios/envios.cs +++ b/Envios/envios.cs @@ -429,8 +429,16 @@ namespace compabetov2 private void button2_Click(object sender, EventArgs e) { - Estadiscticas verstats = new Estadiscticas(); - verstats.Show(); + if (loginPrincipal.tipo.Equals("empleado")) + { + MessageBox.Show("Usted no tiene permisos de acceder a este apartado"); + } + else + { + Estadiscticas estadiscticas = new Estadiscticas(); + estadiscticas.Owner = this; + estadiscticas.Show(); + }; } private void txtTelefono_TextChanged(object sender, EventArgs e) diff --git a/Ventas/vender.cs b/Ventas/vender.cs index 7a2257d..1368c4d 100644 --- a/Ventas/vender.cs +++ b/Ventas/vender.cs @@ -866,9 +866,16 @@ namespace compabetov2 private void button2_Click(object sender, EventArgs e) { - Estadiscticas estadiscticas = new Estadiscticas(); - estadiscticas.Owner = this; - estadiscticas.Show(); + if (loginPrincipal.tipo.Equals("empleado")) + { + MessageBox.Show("Usted no tiene permisos de acceder a este apartado"); + } + else + { + Estadiscticas estadiscticas = new Estadiscticas(); + estadiscticas.Owner = this; + estadiscticas.Show(); + } } private void btnImporte_Click(object sender, EventArgs e)