-
Notifications
You must be signed in to change notification settings - Fork 0
/
frmConfiguracion.cs
126 lines (111 loc) · 3.52 KB
/
frmConfiguracion.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
using System;
using System.Windows.Forms;
namespace JeraDesktop
{
public partial class frmConfiguracion : Form
{
public frmConfiguracion()
{
InitializeComponent();
}
private void pbSalir_Click(object sender, EventArgs e)
{
this.Close();
}
private void frmConfiguracion_Load(object sender, EventArgs e)
{
lblSlogan.Parent = pbConf;
}
private void pbServidor_Click(object sender, EventArgs e)
{
if (Convert.ToInt32(Generales.servidor) == Generales.nAdmin | Generales.nAdmin == 1)
{
frmServidor servidor = new frmServidor();
servidor.Show();
this.Hide();
}
else
{
Mensajes.Error("No tiene acceso a esta configuración");
}
}
private void pbUsuarios_Click(object sender, EventArgs e)
{
if (Convert.ToInt32(Generales.usuarios) == Generales.nAdmin | Generales.nAdmin == 1)
{
frmUsuarios usuarios = new frmUsuarios();
usuarios.Show();
this.Hide();
}
else
{
Mensajes.Error("No tiene acceso a esta configuración");
}
}
private void pictureBox3_Click(object sender, EventArgs e)
{
if (Convert.ToInt32(Generales.clientes) == Generales.nAdmin | Generales.nAdmin == 1)
{
frmClientes cliente = new frmClientes();
cliente.Show();
this.Hide();
}
else
{
Mensajes.Error("No tiene acceso a esta configuración");
}
}
private void pictureBox1_Click(object sender, EventArgs e)
{
if (Convert.ToInt32(Generales.productos) == Generales.nAdmin | Generales.nAdmin == 1)
{
frmProductos producto = new frmProductos();
producto.Show();
this.Hide();
}
else
{
Mensajes.Error("No tiene acceso a esta configuración");
}
}
private void pictureBox2_Click(object sender, EventArgs e)
{
if (Convert.ToInt32(Generales.departamentos) == Generales.nAdmin | Generales.nAdmin == 1)
{
frmDepartamentos depa = new frmDepartamentos();
depa.Show();
this.Hide();
}
else
{
Mensajes.Error("No tiene acceso a esta configuración");
}
}
private void pictureBox4_Click(object sender, EventArgs e)
{
if (Convert.ToInt32(Generales.registarr) == Generales.nAdmin | Generales.nAdmin == 1)
{
frmRegistrar reg = new frmRegistrar();
reg.Show();
this.Hide();
}
else
{
Mensajes.Error("No tiene acceso a esta configuración");
}
}
private void pictureBox5_Click(object sender, EventArgs e)
{
if (Generales.nAdmin == 1)
{
frmModulos modulos = new frmModulos();
modulos.Show();
this.Hide();
}
else
{
Mensajes.Error("No tiene acceso a este control");
}
}
}
}