client/conexion/Catalogos/CatFuncionario.vb

1292 lines
55 KiB
VB.net

Public Class CatFuncionario
Inherits System.Windows.Forms.Form
Dim clCmpPla As New clsComplejo()
Dim clCmpEdo As New clsComplejo()
Dim clCmpTip As New clsComplejo()
Private dtEstado As New DataTable()
Private dtSucursal As New DataTable()
Private dtTipoEmpleado As New DataTable()
Private dtOrigenTabla As New DataTable()
Private Command As New Command()
Private ClaveSistema As String
Private ActualizaClave As Boolean
Private ActualizaFuncionario As Boolean
#Region " Código generado por el Diseñador de Windows Forms "
Public Sub New()
MyBase.New()
'El Diseñador de Windows Forms requiere esta llamada.
InitializeComponent()
'Agregar cualquier inicialización después de la llamada a InitializeComponent()
End Sub
'Form reemplaza a Dispose para limpiar la lista de componentes.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Requerido por el Diseñador de Windows Forms
Private components As System.ComponentModel.IContainer
'NOTA: el Diseñador de Windows Forms requiere el siguiente procedimiento
'Puede modificarse utilizando el Diseñador de Windows Forms.
'No lo modifique con el editor de código.
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents ImageList1 As System.Windows.Forms.ImageList
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents txtNombre As System.Windows.Forms.TextBox
Friend WithEvents txtClave As System.Windows.Forms.TextBox
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents Label9 As System.Windows.Forms.Label
Friend WithEvents Label10 As System.Windows.Forms.Label
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents Label13 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label14 As System.Windows.Forms.Label
Friend WithEvents Label15 As System.Windows.Forms.Label
Friend WithEvents Label17 As System.Windows.Forms.Label
Friend WithEvents chkActivo As System.Windows.Forms.CheckBox
Friend WithEvents txtNumero As System.Windows.Forms.TextBox
Friend WithEvents txtPaterno As System.Windows.Forms.TextBox
Friend WithEvents txtMaterno As System.Windows.Forms.TextBox
Friend WithEvents txtPuesto As System.Windows.Forms.TextBox
Friend WithEvents txtDepartamento As System.Windows.Forms.TextBox
Friend WithEvents txtArea As System.Windows.Forms.TextBox
Friend WithEvents txtNacionalidad As System.Windows.Forms.TextBox
Friend WithEvents txtCalle As System.Windows.Forms.TextBox
Friend WithEvents txtColonia As System.Windows.Forms.TextBox
Friend WithEvents cboEstado As System.Windows.Forms.ComboBox
Friend WithEvents txtTelefono As System.Windows.Forms.TextBox
Friend WithEvents txtCURP As System.Windows.Forms.TextBox
Friend WithEvents tlbCorteCaja As System.Windows.Forms.ToolBar
Friend WithEvents btnAgrergar As System.Windows.Forms.ToolBarButton
Friend WithEvents btnActualizar As System.Windows.Forms.ToolBarButton
Friend WithEvents btnEliminar As System.Windows.Forms.ToolBarButton
Friend WithEvents btnAlias As System.Windows.Forms.ToolBarButton
Friend WithEvents btnSalir As System.Windows.Forms.ToolBarButton
Friend WithEvents Label16 As System.Windows.Forms.Label
Friend WithEvents txtRFC As System.Windows.Forms.TextBox
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label12 As System.Windows.Forms.Label
Friend WithEvents txtDelegacion As System.Windows.Forms.TextBox
Friend WithEvents Label20 As System.Windows.Forms.Label
Friend WithEvents txtCiudad As System.Windows.Forms.TextBox
Friend WithEvents txtCp As System.Windows.Forms.TextBox
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents pnlBotones As System.Windows.Forms.Panel
Friend WithEvents btnAceptar As System.Windows.Forms.Button
Friend WithEvents btnCancelar As System.Windows.Forms.Button
Friend WithEvents cboSucursal As System.Windows.Forms.ComboBox
Friend WithEvents Label18 As System.Windows.Forms.Label
Friend WithEvents Label21 As System.Windows.Forms.Label
Friend WithEvents cboTipEmp As System.Windows.Forms.ComboBox
Friend WithEvents Clave As System.Windows.Forms.ToolBarButton
Friend WithEvents lblSistema As System.Windows.Forms.Label
Friend WithEvents lblClave As System.Windows.Forms.Label
Friend WithEvents cboSistema As System.Windows.Forms.ComboBox
Friend WithEvents txtClaveSist As System.Windows.Forms.TextBox
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents C1TrueDBGrid1 As C1.Win.C1TrueDBGrid.C1TrueDBGrid
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(CatFuncionario))
Me.Label1 = New System.Windows.Forms.Label
Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
Me.Label2 = New System.Windows.Forms.Label
Me.Button1 = New System.Windows.Forms.Button
Me.txtNombre = New System.Windows.Forms.TextBox
Me.txtClave = New System.Windows.Forms.TextBox
Me.Label6 = New System.Windows.Forms.Label
Me.txtNumero = New System.Windows.Forms.TextBox
Me.Label7 = New System.Windows.Forms.Label
Me.txtPaterno = New System.Windows.Forms.TextBox
Me.Label8 = New System.Windows.Forms.Label
Me.txtMaterno = New System.Windows.Forms.TextBox
Me.Label9 = New System.Windows.Forms.Label
Me.txtPuesto = New System.Windows.Forms.TextBox
Me.Label10 = New System.Windows.Forms.Label
Me.txtDepartamento = New System.Windows.Forms.TextBox
Me.Label11 = New System.Windows.Forms.Label
Me.txtArea = New System.Windows.Forms.TextBox
Me.Label13 = New System.Windows.Forms.Label
Me.txtNacionalidad = New System.Windows.Forms.TextBox
Me.Label4 = New System.Windows.Forms.Label
Me.txtCalle = New System.Windows.Forms.TextBox
Me.Label5 = New System.Windows.Forms.Label
Me.txtColonia = New System.Windows.Forms.TextBox
Me.Label14 = New System.Windows.Forms.Label
Me.cboEstado = New System.Windows.Forms.ComboBox
Me.Label15 = New System.Windows.Forms.Label
Me.txtTelefono = New System.Windows.Forms.TextBox
Me.Label17 = New System.Windows.Forms.Label
Me.txtCURP = New System.Windows.Forms.TextBox
Me.chkActivo = New System.Windows.Forms.CheckBox
Me.tlbCorteCaja = New System.Windows.Forms.ToolBar
Me.btnAgrergar = New System.Windows.Forms.ToolBarButton
Me.btnActualizar = New System.Windows.Forms.ToolBarButton
Me.btnEliminar = New System.Windows.Forms.ToolBarButton
Me.btnAlias = New System.Windows.Forms.ToolBarButton
Me.Clave = New System.Windows.Forms.ToolBarButton
Me.btnSalir = New System.Windows.Forms.ToolBarButton
Me.Label16 = New System.Windows.Forms.Label
Me.txtRFC = New System.Windows.Forms.TextBox
Me.Label3 = New System.Windows.Forms.Label
Me.txtCp = New System.Windows.Forms.TextBox
Me.Label12 = New System.Windows.Forms.Label
Me.txtDelegacion = New System.Windows.Forms.TextBox
Me.Label20 = New System.Windows.Forms.Label
Me.txtCiudad = New System.Windows.Forms.TextBox
Me.pnlBotones = New System.Windows.Forms.Panel
Me.btnAceptar = New System.Windows.Forms.Button
Me.btnCancelar = New System.Windows.Forms.Button
Me.cboSucursal = New System.Windows.Forms.ComboBox
Me.Label18 = New System.Windows.Forms.Label
Me.Label21 = New System.Windows.Forms.Label
Me.cboTipEmp = New System.Windows.Forms.ComboBox
Me.cboSistema = New System.Windows.Forms.ComboBox
Me.txtClaveSist = New System.Windows.Forms.TextBox
Me.lblSistema = New System.Windows.Forms.Label
Me.lblClave = New System.Windows.Forms.Label
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.C1TrueDBGrid1 = New C1.Win.C1TrueDBGrid.C1TrueDBGrid
Me.pnlBotones.SuspendLayout()
Me.GroupBox1.SuspendLayout()
CType(Me.C1TrueDBGrid1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.Location = New System.Drawing.Point(8, 64)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(112, 16)
Me.Label1.TabIndex = 56
Me.Label1.Text = "Clave Funcionario :"
'
'ImageList1
'
Me.ImageList1.ImageSize = New System.Drawing.Size(16, 16)
Me.ImageList1.ImageStream = CType(resources.GetObject("ImageList1.ImageStream"), System.Windows.Forms.ImageListStreamer)
Me.ImageList1.TransparentColor = System.Drawing.Color.Turquoise
'
'Label2
'
Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label2.Location = New System.Drawing.Point(-18, 98)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(104, 16)
Me.Label2.TabIndex = 57
Me.Label2.Text = "Nombre :"
Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Button1
'
Me.Button1.BackColor = System.Drawing.SystemColors.Control
Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button1.Location = New System.Drawing.Point(640, 590)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(104, 24)
Me.Button1.TabIndex = 103
Me.Button1.Text = "Alias ..."
Me.Button1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'txtNombre
'
Me.txtNombre.BackColor = System.Drawing.Color.White
Me.txtNombre.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
Me.txtNombre.Location = New System.Drawing.Point(90, 90)
Me.txtNombre.Name = "txtNombre"
Me.txtNombre.Size = New System.Drawing.Size(232, 20)
Me.txtNombre.TabIndex = 3
Me.txtNombre.Text = ""
'
'txtClave
'
Me.txtClave.BackColor = System.Drawing.Color.White
Me.txtClave.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
Me.txtClave.Location = New System.Drawing.Point(112, 64)
Me.txtClave.Name = "txtClave"
Me.txtClave.ReadOnly = True
Me.txtClave.Size = New System.Drawing.Size(56, 20)
Me.txtClave.TabIndex = 20
Me.txtClave.Text = ""
'
'Label6
'
Me.Label6.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label6.Location = New System.Drawing.Point(176, 64)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(88, 16)
Me.Label6.TabIndex = 63
Me.Label6.Text = "No. Empleado:"
'
'txtNumero
'
Me.txtNumero.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
Me.txtNumero.Location = New System.Drawing.Point(272, 64)
Me.txtNumero.Name = "txtNumero"
Me.txtNumero.Size = New System.Drawing.Size(50, 20)
Me.txtNumero.TabIndex = 1
Me.txtNumero.Text = ""
'
'Label7
'
Me.Label7.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label7.Location = New System.Drawing.Point(-18, 130)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(104, 16)
Me.Label7.TabIndex = 65
Me.Label7.Text = "Paterno :"
Me.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'txtPaterno
'
Me.txtPaterno.BackColor = System.Drawing.Color.White
Me.txtPaterno.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
Me.txtPaterno.Location = New System.Drawing.Point(90, 122)
Me.txtPaterno.Name = "txtPaterno"
Me.txtPaterno.Size = New System.Drawing.Size(232, 20)
Me.txtPaterno.TabIndex = 4
Me.txtPaterno.Text = ""
'
'Label8
'
Me.Label8.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label8.Location = New System.Drawing.Point(-18, 162)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(104, 16)
Me.Label8.TabIndex = 67
Me.Label8.Text = "Materno :"
Me.Label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'txtMaterno
'
Me.txtMaterno.BackColor = System.Drawing.Color.White
Me.txtMaterno.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
Me.txtMaterno.Location = New System.Drawing.Point(90, 154)
Me.txtMaterno.Name = "txtMaterno"
Me.txtMaterno.Size = New System.Drawing.Size(232, 20)
Me.txtMaterno.TabIndex = 5
Me.txtMaterno.Text = ""
'
'Label9
'
Me.Label9.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label9.Location = New System.Drawing.Point(392, 256)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(48, 16)
Me.Label9.TabIndex = 69
Me.Label9.Text = "Puesto:"
'
'txtPuesto
'
Me.txtPuesto.BackColor = System.Drawing.Color.White
Me.txtPuesto.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
Me.txtPuesto.Location = New System.Drawing.Point(440, 254)
Me.txtPuesto.Name = "txtPuesto"
Me.txtPuesto.Size = New System.Drawing.Size(130, 20)
Me.txtPuesto.TabIndex = 18
Me.txtPuesto.Text = ""
'
'Label10
'
Me.Label10.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label10.Location = New System.Drawing.Point(352, 228)
Me.Label10.Name = "Label10"
Me.Label10.Size = New System.Drawing.Size(88, 16)
Me.Label10.TabIndex = 71
Me.Label10.Text = "Departamento:"
'
'txtDepartamento
'
Me.txtDepartamento.BackColor = System.Drawing.Color.White
Me.txtDepartamento.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
Me.txtDepartamento.Location = New System.Drawing.Point(438, 224)
Me.txtDepartamento.Name = "txtDepartamento"
Me.txtDepartamento.Size = New System.Drawing.Size(132, 20)
Me.txtDepartamento.TabIndex = 17
Me.txtDepartamento.Text = ""
'
'Label11
'
Me.Label11.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label11.Location = New System.Drawing.Point(402, 200)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(32, 16)
Me.Label11.TabIndex = 73
Me.Label11.Text = "Área:"
'
'txtArea
'
Me.txtArea.BackColor = System.Drawing.Color.White
Me.txtArea.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
Me.txtArea.Location = New System.Drawing.Point(438, 196)
Me.txtArea.Name = "txtArea"
Me.txtArea.Size = New System.Drawing.Size(132, 20)
Me.txtArea.TabIndex = 16
Me.txtArea.Text = ""
'
'Label13
'
Me.Label13.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label13.Location = New System.Drawing.Point(348, 166)
Me.Label13.Name = "Label13"
Me.Label13.Size = New System.Drawing.Size(84, 16)
Me.Label13.TabIndex = 77
Me.Label13.Text = "Nacionalidad:"
'
'txtNacionalidad
'
Me.txtNacionalidad.BackColor = System.Drawing.Color.White
Me.txtNacionalidad.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
Me.txtNacionalidad.Location = New System.Drawing.Point(438, 164)
Me.txtNacionalidad.Name = "txtNacionalidad"
Me.txtNacionalidad.Size = New System.Drawing.Size(132, 20)
Me.txtNacionalidad.TabIndex = 15
Me.txtNacionalidad.Text = ""
'
'Label4
'
Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label4.Location = New System.Drawing.Point(-18, 194)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(104, 16)
Me.Label4.TabIndex = 79
Me.Label4.Text = "Calle y No."
Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'txtCalle
'
Me.txtCalle.BackColor = System.Drawing.Color.White
Me.txtCalle.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
Me.txtCalle.Location = New System.Drawing.Point(90, 186)
Me.txtCalle.Name = "txtCalle"
Me.txtCalle.Size = New System.Drawing.Size(232, 20)
Me.txtCalle.TabIndex = 6
Me.txtCalle.Text = ""
'
'Label5
'
Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label5.Location = New System.Drawing.Point(-18, 226)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(104, 16)
Me.Label5.TabIndex = 81
Me.Label5.Text = "Colonia :"
Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'txtColonia
'
Me.txtColonia.BackColor = System.Drawing.Color.White
Me.txtColonia.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
Me.txtColonia.Location = New System.Drawing.Point(90, 218)
Me.txtColonia.Name = "txtColonia"
Me.txtColonia.Size = New System.Drawing.Size(232, 20)
Me.txtColonia.TabIndex = 7
Me.txtColonia.Text = ""
'
'Label14
'
Me.Label14.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label14.Location = New System.Drawing.Point(-18, 314)
Me.Label14.Name = "Label14"
Me.Label14.Size = New System.Drawing.Size(104, 16)
Me.Label14.TabIndex = 83
Me.Label14.Text = "Estado :"
Me.Label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'cboEstado
'
Me.cboEstado.Location = New System.Drawing.Point(90, 314)
Me.cboEstado.Name = "cboEstado"
Me.cboEstado.Size = New System.Drawing.Size(232, 21)
Me.cboEstado.TabIndex = 10
'
'Label15
'
Me.Label15.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label15.Location = New System.Drawing.Point(380, 136)
Me.Label15.Name = "Label15"
Me.Label15.Size = New System.Drawing.Size(56, 16)
Me.Label15.TabIndex = 85
Me.Label15.Text = "Teléfono:"
'
'txtTelefono
'
Me.txtTelefono.BackColor = System.Drawing.Color.White
Me.txtTelefono.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
Me.txtTelefono.Location = New System.Drawing.Point(438, 132)
Me.txtTelefono.Name = "txtTelefono"
Me.txtTelefono.Size = New System.Drawing.Size(132, 20)
Me.txtTelefono.TabIndex = 14
Me.txtTelefono.Text = ""
'
'Label17
'
Me.Label17.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label17.Location = New System.Drawing.Point(396, 104)
Me.Label17.Name = "Label17"
Me.Label17.Size = New System.Drawing.Size(40, 16)
Me.Label17.TabIndex = 89
Me.Label17.Text = "CURP:"
'
'txtCURP
'
Me.txtCURP.BackColor = System.Drawing.Color.White
Me.txtCURP.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
Me.txtCURP.Location = New System.Drawing.Point(438, 100)
Me.txtCURP.Name = "txtCURP"
Me.txtCURP.Size = New System.Drawing.Size(132, 20)
Me.txtCURP.TabIndex = 13
Me.txtCURP.Text = ""
'
'chkActivo
'
Me.chkActivo.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.chkActivo.ForeColor = System.Drawing.Color.Red
Me.chkActivo.Location = New System.Drawing.Point(664, 152)
Me.chkActivo.Name = "chkActivo"
Me.chkActivo.Size = New System.Drawing.Size(64, 16)
Me.chkActivo.TabIndex = 2
Me.chkActivo.Text = "Activo"
Me.chkActivo.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'tlbCorteCaja
'
Me.tlbCorteCaja.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.tlbCorteCaja.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.btnAgrergar, Me.btnActualizar, Me.btnEliminar, Me.btnAlias, Me.Clave, Me.btnSalir})
Me.tlbCorteCaja.ButtonSize = New System.Drawing.Size(75, 40)
Me.tlbCorteCaja.DropDownArrows = True
Me.tlbCorteCaja.ImageList = Me.ImageList1
Me.tlbCorteCaja.Location = New System.Drawing.Point(0, 0)
Me.tlbCorteCaja.Name = "tlbCorteCaja"
Me.tlbCorteCaja.ShowToolTips = True
Me.tlbCorteCaja.Size = New System.Drawing.Size(786, 47)
Me.tlbCorteCaja.TabIndex = 94
'
'btnAgrergar
'
Me.btnAgrergar.ImageIndex = 0
Me.btnAgrergar.Text = "Agregar"
'
'btnActualizar
'
Me.btnActualizar.ImageIndex = 5
Me.btnActualizar.Text = "Actualizar"
'
'btnEliminar
'
Me.btnEliminar.ImageIndex = 1
Me.btnEliminar.Text = "Eliminar"
Me.btnEliminar.Visible = False
'
'btnAlias
'
Me.btnAlias.ImageIndex = 1
Me.btnAlias.Text = "Eliminar"
'
'Clave
'
Me.Clave.ImageIndex = 8
Me.Clave.Text = "Clave"
'
'btnSalir
'
Me.btnSalir.ImageIndex = 4
Me.btnSalir.Text = "Salir"
'
'Label16
'
Me.Label16.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label16.Location = New System.Drawing.Point(596, 70)
Me.Label16.Name = "Label16"
Me.Label16.Size = New System.Drawing.Size(40, 16)
Me.Label16.TabIndex = 96
Me.Label16.Text = "RFC :"
'
'txtRFC
'
Me.txtRFC.BackColor = System.Drawing.Color.White
Me.txtRFC.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
Me.txtRFC.Location = New System.Drawing.Point(638, 66)
Me.txtRFC.Name = "txtRFC"
Me.txtRFC.Size = New System.Drawing.Size(120, 20)
Me.txtRFC.TabIndex = 12
Me.txtRFC.Text = ""
'
'Label3
'
Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label3.Location = New System.Drawing.Point(380, 68)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(48, 16)
Me.Label3.TabIndex = 98
Me.Label3.Text = "CP:"
Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'txtCp
'
Me.txtCp.BackColor = System.Drawing.Color.White
Me.txtCp.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
Me.txtCp.Location = New System.Drawing.Point(438, 68)
Me.txtCp.Name = "txtCp"
Me.txtCp.Size = New System.Drawing.Size(132, 20)
Me.txtCp.TabIndex = 11
Me.txtCp.Text = ""
'
'Label12
'
Me.Label12.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label12.Location = New System.Drawing.Point(-18, 250)
Me.Label12.Name = "Label12"
Me.Label12.Size = New System.Drawing.Size(104, 16)
Me.Label12.TabIndex = 100
Me.Label12.Text = "Deleagción :"
Me.Label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'txtDelegacion
'
Me.txtDelegacion.BackColor = System.Drawing.Color.White
Me.txtDelegacion.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
Me.txtDelegacion.Location = New System.Drawing.Point(90, 250)
Me.txtDelegacion.Name = "txtDelegacion"
Me.txtDelegacion.Size = New System.Drawing.Size(232, 20)
Me.txtDelegacion.TabIndex = 8
Me.txtDelegacion.Text = ""
'
'Label20
'
Me.Label20.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label20.Location = New System.Drawing.Point(-18, 282)
Me.Label20.Name = "Label20"
Me.Label20.Size = New System.Drawing.Size(104, 16)
Me.Label20.TabIndex = 102
Me.Label20.Text = "Ciudad :"
Me.Label20.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'txtCiudad
'
Me.txtCiudad.BackColor = System.Drawing.Color.White
Me.txtCiudad.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
Me.txtCiudad.Location = New System.Drawing.Point(90, 282)
Me.txtCiudad.Name = "txtCiudad"
Me.txtCiudad.Size = New System.Drawing.Size(232, 20)
Me.txtCiudad.TabIndex = 9
Me.txtCiudad.Text = ""
'
'pnlBotones
'
Me.pnlBotones.Controls.Add(Me.btnAceptar)
Me.pnlBotones.Controls.Add(Me.btnCancelar)
Me.pnlBotones.Location = New System.Drawing.Point(642, 202)
Me.pnlBotones.Name = "pnlBotones"
Me.pnlBotones.Size = New System.Drawing.Size(120, 80)
Me.pnlBotones.TabIndex = 104
'
'btnAceptar
'
Me.btnAceptar.BackColor = System.Drawing.SystemColors.Control
Me.btnAceptar.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnAceptar.ForeColor = System.Drawing.Color.Black
Me.btnAceptar.Image = CType(resources.GetObject("btnAceptar.Image"), System.Drawing.Image)
Me.btnAceptar.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnAceptar.Location = New System.Drawing.Point(16, 8)
Me.btnAceptar.Name = "btnAceptar"
Me.btnAceptar.Size = New System.Drawing.Size(96, 23)
Me.btnAceptar.TabIndex = 2
Me.btnAceptar.Text = "Aceptar"
Me.btnAceptar.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'btnCancelar
'
Me.btnCancelar.BackColor = System.Drawing.SystemColors.Control
Me.btnCancelar.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnCancelar.ForeColor = System.Drawing.Color.Black
Me.btnCancelar.Image = CType(resources.GetObject("btnCancelar.Image"), System.Drawing.Image)
Me.btnCancelar.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnCancelar.Location = New System.Drawing.Point(16, 40)
Me.btnCancelar.Name = "btnCancelar"
Me.btnCancelar.Size = New System.Drawing.Size(96, 23)
Me.btnCancelar.TabIndex = 3
Me.btnCancelar.Text = "Cancelar"
Me.btnCancelar.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'cboSucursal
'
Me.cboSucursal.Location = New System.Drawing.Point(438, 310)
Me.cboSucursal.Name = "cboSucursal"
Me.cboSucursal.Size = New System.Drawing.Size(132, 21)
Me.cboSucursal.TabIndex = 20
'
'Label18
'
Me.Label18.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label18.Location = New System.Drawing.Point(374, 314)
Me.Label18.Name = "Label18"
Me.Label18.Size = New System.Drawing.Size(58, 16)
Me.Label18.TabIndex = 106
Me.Label18.Text = "Sucursal :"
'
'Label21
'
Me.Label21.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label21.Location = New System.Drawing.Point(346, 286)
Me.Label21.Name = "Label21"
Me.Label21.Size = New System.Drawing.Size(96, 16)
Me.Label21.TabIndex = 108
Me.Label21.Text = "Tipo Empleado :"
'
'cboTipEmp
'
Me.cboTipEmp.Location = New System.Drawing.Point(438, 282)
Me.cboTipEmp.Name = "cboTipEmp"
Me.cboTipEmp.Size = New System.Drawing.Size(132, 21)
Me.cboTipEmp.TabIndex = 19
'
'cboSistema
'
Me.cboSistema.Location = New System.Drawing.Point(638, 90)
Me.cboSistema.Name = "cboSistema"
Me.cboSistema.Size = New System.Drawing.Size(120, 21)
Me.cboSistema.TabIndex = 110
Me.cboSistema.Visible = False
'
'txtClaveSist
'
Me.txtClaveSist.BackColor = System.Drawing.Color.White
Me.txtClaveSist.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
Me.txtClaveSist.Location = New System.Drawing.Point(640, 114)
Me.txtClaveSist.MaxLength = 10
Me.txtClaveSist.Name = "txtClaveSist"
Me.txtClaveSist.Size = New System.Drawing.Size(120, 20)
Me.txtClaveSist.TabIndex = 111
Me.txtClaveSist.Text = ""
Me.txtClaveSist.Visible = False
'
'lblSistema
'
Me.lblSistema.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblSistema.Location = New System.Drawing.Point(582, 92)
Me.lblSistema.Name = "lblSistema"
Me.lblSistema.Size = New System.Drawing.Size(56, 16)
Me.lblSistema.TabIndex = 112
Me.lblSistema.Text = "Sistema :"
Me.lblSistema.Visible = False
'
'lblClave
'
Me.lblClave.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblClave.Location = New System.Drawing.Point(590, 116)
Me.lblClave.Name = "lblClave"
Me.lblClave.Size = New System.Drawing.Size(48, 16)
Me.lblClave.TabIndex = 113
Me.lblClave.Text = "Calve :"
Me.lblClave.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.lblClave.Visible = False
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.C1TrueDBGrid1)
Me.GroupBox1.Location = New System.Drawing.Point(2, 360)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(782, 222)
Me.GroupBox1.TabIndex = 114
Me.GroupBox1.TabStop = False
'
'C1TrueDBGrid1
'
Me.C1TrueDBGrid1.AllowUpdate = False
Me.C1TrueDBGrid1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.C1TrueDBGrid1.Dock = System.Windows.Forms.DockStyle.Fill
Me.C1TrueDBGrid1.GroupByCaption = "Drag a column header here to group by that column"
Me.C1TrueDBGrid1.Images.Add(CType(resources.GetObject("resource"), System.Drawing.Image))
Me.C1TrueDBGrid1.Location = New System.Drawing.Point(3, 16)
Me.C1TrueDBGrid1.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.HighlightRow
Me.C1TrueDBGrid1.Name = "C1TrueDBGrid1"
Me.C1TrueDBGrid1.PreviewInfo.Location = New System.Drawing.Point(0, 0)
Me.C1TrueDBGrid1.PreviewInfo.Size = New System.Drawing.Size(0, 0)
Me.C1TrueDBGrid1.PreviewInfo.ZoomFactor = 75
Me.C1TrueDBGrid1.Size = New System.Drawing.Size(776, 203)
Me.C1TrueDBGrid1.TabIndex = 0
Me.C1TrueDBGrid1.Text = "C1TrueDBGrid1"
Me.C1TrueDBGrid1.PropBag = "<?xml version=""1.0""?><Blob><Styles type=""C1.Win.C1TrueDBGrid.Design.ContextWrappe" & _
"r""><Data>Group{AlignVert:Center;Border:None,,0, 0, 0, 0;BackColor:ControlDark;}E" & _
"ditor{}Style2{}Style5{}Style4{}Style7{}Style6{}EvenRow{BackColor:Aqua;}Selected{" & _
"ForeColor:HighlightText;BackColor:Highlight;}Style3{}Inactive{ForeColor:Inactive" & _
"CaptionText;BackColor:InactiveCaption;}FilterBar{}Footer{}Caption{AlignHorz:Cent" & _
"er;}Style1{}Normal{}HighlightRow{ForeColor:Aqua;BackColor:Highlight;}Style12{}Od" & _
"dRow{}RecordSelector{AlignImage:Center;}Style13{}Heading{Wrap:True;BackColor:Con" & _
"trol;Border:Raised,,1, 1, 1, 1;ForeColor:ControlText;AlignVert:Center;}Style8{}S" & _
"tyle10{AlignHorz:Near;}Style11{}Style14{}Style15{}Style9{}</Data></Styles><Split" & _
"s><C1.Win.C1TrueDBGrid.MergeView Name="""" CaptionHeight=""17"" ColumnCaptionHeight=" & _
"""17"" ColumnFooterHeight=""17"" MarqueeStyle=""HighlightRow"" RecordSelectorWidth=""16" & _
""" DefRecSelWidth=""16"" VerticalScrollGroup=""1"" HorizontalScrollGroup=""1""><Height>" & _
"199</Height><CaptionStyle parent=""Style2"" me=""Style10"" /><EditorStyle parent=""Ed" & _
"itor"" me=""Style5"" /><EvenRowStyle parent=""EvenRow"" me=""Style8"" /><FilterBarStyle" & _
" parent=""FilterBar"" me=""Style13"" /><FooterStyle parent=""Footer"" me=""Style3"" /><G" & _
"roupStyle parent=""Group"" me=""Style12"" /><HeadingStyle parent=""Heading"" me=""Style" & _
"2"" /><HighLightRowStyle parent=""HighlightRow"" me=""Style7"" /><InactiveStyle paren" & _
"t=""Inactive"" me=""Style4"" /><OddRowStyle parent=""OddRow"" me=""Style9"" /><RecordSel" & _
"ectorStyle parent=""RecordSelector"" me=""Style11"" /><SelectedStyle parent=""Selecte" & _
"d"" me=""Style6"" /><Style parent=""Normal"" me=""Style1"" /><ClientRect>0, 0, 772, 199" & _
"</ClientRect><BorderSide>0</BorderSide><BorderStyle>Sunken</BorderStyle></C1.Win" & _
".C1TrueDBGrid.MergeView></Splits><NamedStyles><Style parent="""" me=""Normal"" /><St" & _
"yle parent=""Normal"" me=""Heading"" /><Style parent=""Heading"" me=""Footer"" /><Style " & _
"parent=""Heading"" me=""Caption"" /><Style parent=""Heading"" me=""Inactive"" /><Style p" & _
"arent=""Normal"" me=""Selected"" /><Style parent=""Normal"" me=""Editor"" /><Style paren" & _
"t=""Normal"" me=""HighlightRow"" /><Style parent=""Normal"" me=""EvenRow"" /><Style pare" & _
"nt=""Normal"" me=""OddRow"" /><Style parent=""Heading"" me=""RecordSelector"" /><Style p" & _
"arent=""Normal"" me=""FilterBar"" /><Style parent=""Caption"" me=""Group"" /></NamedStyl" & _
"es><vertSplits>1</vertSplits><horzSplits>1</horzSplits><Layout>None</Layout><Def" & _
"aultRecSelWidth>16</DefaultRecSelWidth><ClientArea>0, 0, 772, 199</ClientArea><P" & _
"rintPageHeaderStyle parent="""" me=""Style14"" /><PrintPageFooterStyle parent="""" me=" & _
"""Style15"" /></Blob>"
'
'CatFuncionario
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.BackColor = System.Drawing.Color.White
Me.ClientSize = New System.Drawing.Size(786, 619)
Me.ControlBox = False
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.chkActivo)
Me.Controls.Add(Me.lblClave)
Me.Controls.Add(Me.lblSistema)
Me.Controls.Add(Me.txtClaveSist)
Me.Controls.Add(Me.txtCiudad)
Me.Controls.Add(Me.txtDelegacion)
Me.Controls.Add(Me.txtCp)
Me.Controls.Add(Me.txtRFC)
Me.Controls.Add(Me.txtCURP)
Me.Controls.Add(Me.txtTelefono)
Me.Controls.Add(Me.txtColonia)
Me.Controls.Add(Me.txtCalle)
Me.Controls.Add(Me.txtNacionalidad)
Me.Controls.Add(Me.txtArea)
Me.Controls.Add(Me.txtDepartamento)
Me.Controls.Add(Me.txtPuesto)
Me.Controls.Add(Me.txtMaterno)
Me.Controls.Add(Me.txtPaterno)
Me.Controls.Add(Me.txtNumero)
Me.Controls.Add(Me.txtNombre)
Me.Controls.Add(Me.txtClave)
Me.Controls.Add(Me.cboSistema)
Me.Controls.Add(Me.cboTipEmp)
Me.Controls.Add(Me.Label21)
Me.Controls.Add(Me.Label18)
Me.Controls.Add(Me.cboSucursal)
Me.Controls.Add(Me.pnlBotones)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.Label16)
Me.Controls.Add(Me.tlbCorteCaja)
Me.Controls.Add(Me.Label17)
Me.Controls.Add(Me.Label15)
Me.Controls.Add(Me.Label14)
Me.Controls.Add(Me.cboEstado)
Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.Label13)
Me.Controls.Add(Me.Label11)
Me.Controls.Add(Me.Label10)
Me.Controls.Add(Me.Label9)
Me.Controls.Add(Me.Label8)
Me.Controls.Add(Me.Label7)
Me.Controls.Add(Me.Label6)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Label12)
Me.Controls.Add(Me.Label20)
Me.Controls.Add(Me.Button1)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D
Me.Name = "CatFuncionario"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Catalogo: Funcionario"
Me.pnlBotones.ResumeLayout(False)
Me.GroupBox1.ResumeLayout(False)
CType(Me.C1TrueDBGrid1, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub tlbCorteCaja_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles tlbCorteCaja.ButtonClick
Select Case e.Button.Text
Case "Agregar"
Habilita(True)
lIMPIAR()
ActualizaFuncionario = True
Case "Actualizar"
Habilita(True)
ActualizaFuncionario = True
Case "Clave"
ActualizaClave = True
ActClave(True)
Habilita(False)
Case "Salir"
Me.Close()
End Select
End Sub
Private Sub ActClave(ByVal Bandera As Boolean)
If Me.txtClave.Text <> "" Then
Me.lblClave.Visible = Bandera
Me.lblSistema.Visible = Bandera
Me.txtClaveSist.Visible = Bandera
Me.cboSistema.Visible = Bandera
Else
MessageBox.Show("Seleccione un elemeto del grid", "MIDS", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End If
End Sub
Private Sub Habilita(ByVal Bandera As Boolean)
txtClave.Enabled = Bandera
txtNumero.Enabled = Bandera
txtNombre.Enabled = Bandera
txtPaterno.Enabled = Bandera
txtMaterno.Enabled = Bandera
txtCalle.Enabled = Bandera
txtColonia.Enabled = Bandera
txtDelegacion.Enabled = Bandera
txtCiudad.Enabled = Bandera
txtCp.Enabled = Bandera
txtCURP.Enabled = Bandera
txtTelefono.Enabled = Bandera
txtArea.Enabled = Bandera
txtDepartamento.Enabled = Bandera
txtPuesto.Enabled = Bandera
txtRFC.Enabled = Bandera
txtNacionalidad.Enabled = Bandera
Me.chkActivo.Enabled = Bandera
End Sub
Private Sub lIMPIAR()
txtClave.Text = ""
txtNumero.Text = ""
txtNombre.Text = ""
txtPaterno.Text = ""
txtMaterno.Text = ""
txtCalle.Text = ""
txtColonia.Text = ""
txtDelegacion.Text = ""
txtCiudad.Text = ""
txtCp.Text = ""
txtCURP.Text = ""
txtTelefono.Text = ""
txtArea.Text = ""
txtDepartamento.Text = ""
txtPuesto.Text = ""
txtRFC.Text = ""
txtNacionalidad.Text = ""
Me.chkActivo.Checked = False
End Sub
Private Sub sbAlias()
Dim miAlias As New ActAlias()
miAlias.Entra(9, txtClave.Text.Trim)
miAlias.Text = "Alias Funcionario"
miAlias.piCatalogo = 9
miAlias.Show()
End Sub
Private Sub CatFuncionario_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
sbIniciaForma()
ActualizaClave = False
End Sub
Private Sub sbIniciaForma()
'Llena combos y grid
Dim LlenaCombo As New LlenaCombo
LlenaCombo.LlenaData("splistaEstado", cboEstado, dtEstado)
LlenaCombo.LlenaData("splistaSucursal", cboSucursal, dtSucursal)
LlenaCombo.LlenaData("spListaTipoEmpleado", cboTipEmp, dtTipoEmpleado)
LlenaCombo.LlenaData("spListaTipoClave", cboSistema, dtOrigenTabla)
clCmpPla.fdtDataSetTabla("spGridFuncionarios")
Me.C1TrueDBGrid1.SetDataBinding(clCmpPla.ds, "Tabla")
OcultaColums() 'Llama al metodo para ocultar columnas
'clCmpPla.sbLlenaMSFGrid("spGridFuncionarios", Me.grdFuncionarios)
'sbConfiguraGrid()
Habilita(False)
End Sub
'Private Sub sbConfiguraGrid()
' Try
' With grdFuncionarios
' .set_ColWidth(0, 0)
' .set_ColWidth(1, 0)
' .set_ColWidth(2, 0)
' .set_ColWidth(3, 0)
' .set_ColWidth(4, 1000)
' .set_ColWidth(5, 1000)
' .set_ColWidth(6, 1500)
' .set_ColWidth(7, 700)
' .set_ColWidth(8, 1500)
' .set_ColWidth(9, 0)
' .set_ColWidth(10, 1500)
' .set_ColWidth(11, 1000)
' .set_ColWidth(12, 1500)
' .set_ColWidth(13, 1000)
' .set_ColWidth(14, 1000)
' .set_ColWidth(15, 1000)
' .set_ColWidth(16, 1000)
' .set_ColWidth(17, 0)
' .set_ColWidth(18, 1000)
' .set_ColWidth(19, 1000)
' .set_ColWidth(20, 1000)
' .set_ColWidth(21, 1000)
' .set_ColWidth(22, 1000)
' .set_ColWidth(23, 0)
' .set_ColWidth(24, 1000)
' End With
' Catch e As Exception
' MessageBox.Show(e.Message)
' End Try
'End Sub
Private Sub sbGuardar()
Dim lsMensaje As String
If MsgBox("¿Desea guardar los cambios?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "MINDS Cliente") = MsgBoxResult.No Then Exit Sub
If fbValidaGrabar() Then
lsMensaje = "Datos guardados correctamente"
sbIniciaForma()
Else
lsMensaje = "Los datos no fueron guardados"
End If
MsgBox(lsMensaje, MsgBoxStyle.Information + MsgBoxStyle.OKOnly, "Cliente")
End Sub
Private Function fbValidaGrabar() As Boolean
Dim liClave As Integer
Dim liNumero As Integer
Dim liEstado As Integer
Dim liTipoEmpleado As Integer
Dim liPlaza As Integer
Dim lsNombre As String
Dim lsPaterno As String
Dim lsMaterno As String
Dim lsDepartamento As String
Dim lsArea As String
Dim lsNumEmpleado As String
Dim liStatus As Integer
Dim lsPuesto As String
Dim lsRFC As String
Dim lsCURP As String
Dim lsCalle As String
Dim lsColonia As String
Dim lsTelefono As String
Dim liNacionalidad As Integer
Dim lsAlias As String
Dim lsNombreCorto As String
Dim lsSQL As String
On Error GoTo eh
fbValidaGrabar = False
If Len(txtClave.Text) = 0 Then
liClave = -1
Else
liClave = Val(txtClave.Text)
End If
If cboEstado.SelectedIndex = -1 Then
MsgBox("Estado no válido", MsgBoxStyle.Information + MsgBoxStyle.OKOnly, "Cliente")
Exit Function
Else
liEstado = cboEstado.SelectedValue
End If
If Len(txtNumero.Text) = 0 Then
MsgBox("Número de empleado no válido", MsgBoxStyle.Information + MsgBoxStyle.OKOnly, "Cliente")
Exit Function
Else
lsNumEmpleado = txtNumero.Text
End If
If Len(txtNombre.Text) = 0 Then
MsgBox("Nombre no válido", MsgBoxStyle.Information + MsgBoxStyle.OKOnly, "Cliente")
Exit Function
Else
lsNombre = txtNombre.Text
End If
If Len(txtPaterno.Text) = 0 Then
MsgBox("Apellido paterno no válido", MsgBoxStyle.Information + MsgBoxStyle.OKOnly, "Cliente")
Exit Function
Else
lsPaterno = txtPaterno.Text
End If
If Len(txtMaterno.Text) = 0 Then
MsgBox("Apellido materno no válido", MsgBoxStyle.Information + MsgBoxStyle.OKOnly, "Cliente")
Exit Function
Else
lsMaterno = txtMaterno.Text
End If
If Len(txtPuesto.Text) = 0 Then
MsgBox("Puesto no válido", MsgBoxStyle.Information + MsgBoxStyle.OKOnly, "Cliente")
Exit Function
Else
lsPuesto = txtPuesto.Text
End If
If Len(txtCalle.Text) = 0 Then
MsgBox("Calle no válida", MsgBoxStyle.Information + MsgBoxStyle.OKOnly, "Cliente")
Exit Function
Else
lsCalle = txtCalle.Text
End If
If Len(txtColonia.Text) = 0 Then
MsgBox("Colonia no válida", MsgBoxStyle.Information + MsgBoxStyle.OKOnly, "Cliente")
Exit Function
Else
lsColonia = txtColonia.Text
End If
If Len(txtTelefono.Text) = 0 Then
MsgBox("Teléfono no válido", MsgBoxStyle.Information + MsgBoxStyle.OKOnly, "Cliente")
Exit Function
Else
lsTelefono = txtTelefono.Text
End If
If Len(txtNacionalidad.Text) = 0 Then
MsgBox("Nacionalidad no válida", MsgBoxStyle.Information + MsgBoxStyle.OKOnly, "Cliente")
Exit Function
Else
liNacionalidad = CInt(txtNacionalidad.Text)
End If
If Len(txtDepartamento.Text) = 0 Then
lsDepartamento = ""
Else
lsDepartamento = txtDepartamento.Text
End If
If Len(txtArea.Text) = 0 Then
lsArea = ""
Else
lsArea = txtArea.Text
End If
If Len(txtPuesto.Text) = 0 Then
lsPuesto = ""
Else
lsPuesto = txtPuesto.Text
End If
If Len(txtRFC.Text) = 0 Then
lsRFC = ""
Else
lsRFC = txtRFC.Text
End If
If Len(txtCURP.Text) = 0 Then
lsCURP = ""
Else
lsCURP = txtCURP.Text
End If
liStatus = IIf(Me.chkActivo.Checked, 1, 0)
lsSQL = ""
lsSQL = lsSQL & "spGrabaCatFuncionario "
lsSQL = lsSQL & liClave & ", 9, " & Me.cboSucursal.SelectedValue & " , '"
lsSQL = lsSQL & lsNombre & "', '"
lsSQL = lsSQL & lsPaterno & "', '"
lsSQL = lsSQL & lsMaterno & "', '"
lsSQL = lsSQL & lsNumEmpleado & "',' "
lsSQL = lsSQL & lsArea & "', "
lsSQL = lsSQL & liStatus & ", '"
lsSQL = lsSQL & lsRFC & "', '"
lsSQL = lsSQL & lsCURP & "', '"
lsSQL = lsSQL & lsCalle & "', '"
lsSQL = lsSQL & lsColonia & "', '"
lsSQL = lsSQL & Me.txtCp.Text.Trim & "', '"
lsSQL = lsSQL & Me.txtDelegacion.Text.Trim & "', '"
lsSQL = lsSQL & Me.txtCiudad.Text.Trim & "', "
lsSQL = lsSQL & liEstado & ", '"
lsSQL = lsSQL & lsTelefono & "', "
lsSQL = lsSQL & liNacionalidad & ", '"
lsSQL = lsSQL & lsPuesto & "', '"
lsSQL = lsSQL & txtDepartamento.Text.Trim & "',"
lsSQL = lsSQL & Me.cboTipEmp.SelectedValue & ""
clCmpPla.sbGuardaModifica(lsSQL)
Return True
Exit Function
eh:
Return False
End Function
'Private Sub grdFuncionarios_DblClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles grdFuncionarios.DblClick
' Dim liDia As Integer
' Dim liMes As Integer
' Dim liAnio As Integer
' With grdFuncionarios
' .Col = 0
' txtClave.Text = .Text
' .Col = 2
' Me.cboSucursal.SelectedValue = .Text
' .Col = 4
' txtNombre.Text = .Text
' .Col = 5
' txtPaterno.Text = .Text
' .Col = 6
' txtMaterno.Text = .Text
' .Col = 7
' txtNumero.Text = .Text
' .Col = 8
' txtArea.Text = .Text
' .Col = 9
' If .Text = "1" Then
' chkActivo.Checked = True
' Else
' chkActivo.Checked = False
' End If
' .Col = 10
' txtRFC.Text = .Text
' .Col = 11
' txtCURP.Text = .Text
' .Col = 12
' txtCalle.Text = .Text
' .Col = 13
' txtColonia.Text = .Text
' .Col = 14
' txtCp.Text = .Text
' .Col = 15
' Me.txtDelegacion.Text = .Text
' .Col = 16
' Me.txtCiudad.Text = .Text
' .Col = 17
' Me.cboEstado.SelectedValue = .Text
' .Col = 19
' txtTelefono.Text = .Text
' .Col = 20
' txtNacionalidad.Text = .Text
' .Col = 21
' txtPuesto.Text = .Text
' .Col = 22
' txtDepartamento.Text = .Text
' .Col = 23
' Me.cboTipEmp.SelectedValue = .Text
' End With
' Habilita(False)
'End Sub
Private Sub btnAceptar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAceptar.Click
If ActualizaClave = True Then
ActClaveFuncionario()
Else
If ActualizaFuncionario = True Then
sbGuardar()
ActualizaFuncionario = False
End If
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If txtClave.Text <> "" Then
sbAlias()
Else
MessageBox.Show("Debe Selecionar un elemento", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End If
End Sub
Private Sub cboSistema_SelectionChangeCommitted(ByVal sender As Object, ByVal e As System.EventArgs) Handles cboSistema.SelectionChangeCommitted
Command.spsql = "spClaveFuncionario " & Me.txtClave.Text.Trim & "," & Me.cboSistema.SelectedValue
Command.Lee(Command.spsql)
Try
ClaveSistema = Command.dtReader("Clave")
Catch
ClaveSistema = ""
End Try
Command.dtReader.Close()
Me.txtClaveSist.Text = ClaveSistema
End Sub
Private Sub OcultaColums()
Try
Me.C1TrueDBGrid1.Splits(0, 0).DisplayColumns(0).Visible = False
Me.C1TrueDBGrid1.Splits(0, 0).DisplayColumns(1).Visible = False
Me.C1TrueDBGrid1.Splits(0, 0).DisplayColumns(2).Visible = False
Me.C1TrueDBGrid1.Splits(0, 0).DisplayColumns("Id_TipoEmpleado").Visible = False
Me.C1TrueDBGrid1.Splits(0, 0).DisplayColumns("Id_Estado").Visible = False
Catch ex As Exception
MessageBox.Show("Error CatFuncionario; OcultarColumns: " & ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
Private Sub ActClaveFuncionario()
Command.spsql = "spGrabaClaveFuncionario " & Me.txtClave.Text.Trim & ", " & Me.cboSistema.SelectedValue & " , '" & Me.txtClaveSist.Text.Trim & "'"
Command.Ejecuta(Command.spsql)
ActualizaClave = False
ActClave(False)
End Sub
Private Sub C1TrueDBGrid1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles C1TrueDBGrid1.DoubleClick
Dim liDia As Integer
Dim liMes As Integer
Dim liAnio As Integer
Try
With Me.C1TrueDBGrid1
.Col = 0
txtClave.Text = .Columns(0).Text
.Col = 2
Me.cboSucursal.SelectedValue = .Columns(2).Text
.Col = 4
txtNombre.Text = .Columns(4).Text
.Col = 5
txtPaterno.Text = .Columns(5).Text
.Col = 6
txtMaterno.Text = .Columns(6).Text
.Col = 7
txtNumero.Text = .Columns(7).Text
.Col = 8
txtArea.Text = .Columns(8).Text
.Col = 9
If .Columns(9).Value = "1" Then
chkActivo.Checked = True
Else
chkActivo.Checked = False
End If
.Col = 10
txtRFC.Text = .Columns(10).Text
.Col = 11
txtCURP.Text = .Columns(11).Text
.Col = 12
txtCalle.Text = .Columns(12).Text
.Col = 13
txtColonia.Text = .Columns(13).Text
.Col = 14
txtCp.Text = .Columns(14).Text
.Col = 15
Me.txtDelegacion.Text = .Columns(15).Text
.Col = 16
Me.txtCiudad.Text = .Columns(16).Text
.Col = 17
Me.cboEstado.SelectedValue = .Columns(17).Text
.Col = 19
txtTelefono.Text = .Columns(19).Text
.Col = 20
txtNacionalidad.Text = .Columns(20).Text
.Col = 21
txtPuesto.Text = .Columns(21).Text
.Col = 22
txtDepartamento.Text = .Columns(22).Text
.Col = 23
Me.cboTipEmp.SelectedValue = .Columns(23).Value
End With
Catch ex As Exception
MessageBox.Show(ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
Habilita(False)
End Sub
End Class