-
Notifications
You must be signed in to change notification settings - Fork 0
/
frmPermisos.frm
178 lines (175 loc) · 5.51 KB
/
frmPermisos.frm
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
VERSION 5.00
Begin VB.Form frmPermisos
Caption = "Permisos de Usuario"
ClientHeight = 6420
ClientLeft = 120
ClientTop = 450
ClientWidth = 9780
ControlBox = 0 'False
LinkTopic = "Form1"
ScaleHeight = 6420
ScaleWidth = 9780
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton cmdCancelar
Caption = "Cancelar"
Height = 855
Left = 5880
Picture = "frmPermisos.frx":0000
Style = 1 'Graphical
TabIndex = 9
Top = 5400
Width = 975
End
Begin VB.CommandButton cmdGuardar
Caption = "Guardar"
Height = 855
Left = 2880
Picture = "frmPermisos.frx":08CA
Style = 1 'Graphical
TabIndex = 8
Top = 5400
Width = 975
End
Begin VB.Frame Frame1
Caption = "Permisos"
Height = 3015
Left = 240
TabIndex = 14
Top = 2160
Width = 9015
Begin VB.CheckBox chVerInformes
Caption = "Ver Informes"
Height = 375
Left = 360
TabIndex = 15
Top = 2400
Width = 1695
End
Begin VB.CheckBox chFacturar
Caption = "Facturar"
Height = 375
Left = 360
TabIndex = 7
Top = 1920
Width = 2535
End
Begin VB.CheckBox chModificarArticulos
Caption = "Modificar Artículos"
Height = 375
Left = 360
TabIndex = 6
Top = 1440
Width = 2535
End
Begin VB.CheckBox chModificarClientes
Caption = "ModificarClientes"
Height = 375
Left = 360
TabIndex = 5
Top = 960
Width = 2535
End
Begin VB.CheckBox chEstablecerUsuariosyPermisos
Caption = "Establecer Usuarios y Permisos"
Height = 375
Left = 360
TabIndex = 4
Top = 480
Width = 2535
End
End
Begin VB.TextBox txtEmail
Height = 375
Left = 5760
TabIndex = 3
Top = 1320
Width = 3135
End
Begin VB.TextBox txttelefono
Height = 375
Left = 1080
TabIndex = 2
Top = 1320
Width = 3135
End
Begin VB.TextBox txtDomicilio
Height = 375
Left = 5760
TabIndex = 1
Top = 600
Width = 3135
End
Begin VB.TextBox txtUsuario
Height = 375
Left = 1080
TabIndex = 0
Top = 600
Width = 3135
End
Begin VB.Label Label4
Caption = "E_mail:"
Height = 255
Left = 5040
TabIndex = 13
Top = 1440
Width = 615
End
Begin VB.Label Label3
Caption = "Teléfonos:"
Height = 255
Left = 240
TabIndex = 12
Top = 1440
Width = 855
End
Begin VB.Label Label2
Caption = "Domicilio:"
Height = 255
Left = 4920
TabIndex = 11
Top = 720
Width = 735
End
Begin VB.Label Label1
Caption = "Nombre:"
Height = 255
Left = 360
TabIndex = 10
Top = 720
Width = 615
End
End
Attribute VB_Name = "frmPermisos"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdCancelar_Click()
Unload Me
End Sub
Private Sub cmdGuardar_Click()
cn.Open
If Estado = "Agregando" Then
cn.Execute ("AgregarUsuario '" & txtUsuario & "','" & txtDomicilio & "','" & txttelefono & "','" & txtEmail & "'," & chEstablecerUsuariosyPermisos & "," & chModificarClientes & "," & chModificarArticulos & "," & chFacturar & "," & chVerInformes)
Else
cn.Execute ("GuardarUsuario '" & txtUsuario & "','" & txtDomicilio & "','" & txttelefono & "','" & txtEmail & "'," & chEstablecerUsuariosyPermisos & "," & chModificarClientes & "," & chModificarArticulos & "," & chFacturar & "," & chVerInformes & "," & idUsuarioPermiso)
End If
cn.Close
Unload Me
End Sub
Private Sub Form_Load()
If Estado = "Modificando" Then
Dim rs As New ADODB.Recordset
cn.Open
Set rs = cn.Execute("VerPermsisosDeUsuario " & idUsuarioPermiso)
txtUsuario = rs!Nombre
chEstablecerUsuariosyPermisos.Value = rs!EstablecerUsuariosyPermisos
chModificarClientes = rs!ModificarClientes
chModificarArticulos = rs!ModificarArticulos
chFacturar = rs!Facturar
chVerInformes = rs!VerInformes
rs.Close
Set rs = Nothing
cn.Close
End If
End Sub