1029 lines
44 KiB
VB.net
1029 lines
44 KiB
VB.net
Public Class frmCatalogosBinarios
|
|
Inherits System.Windows.Forms.Form
|
|
|
|
|
|
Private Command As New Command()
|
|
Private LlenaCombo As New LlenaCombo()
|
|
Private LlenaGrid As New LlenaGrid()
|
|
Private ValidaTexto As New ValidaTexto()
|
|
Public strTag As String
|
|
Private MaximoCatalogo As Integer
|
|
Private MaximoaAlias As Integer
|
|
Private NombreCatalogo As String
|
|
Private DesOperacion As String
|
|
Private dtCatalogos As New DataTable() 'Tabla de combo de Tipods de Catalogos
|
|
Private dtRegCatalogos As New DataTable() 'Tabla de Combo de registros por Catalogo
|
|
Private dtGrid As New DataTable() 'Tabla de Registros por Catalogo
|
|
Private dtGridAlias As New DataTable() 'Tabla de Alias para Cada Catalogo
|
|
Private vwGrid As New View()
|
|
Private Id_Comodin As Integer
|
|
Private Id_Catalgo As Integer
|
|
Private Nombre As String
|
|
Private NombreAlias As String
|
|
Private Activo As Integer
|
|
Private InsertaActivo As Integer
|
|
Private CuartoCampo As Object
|
|
Private bolAlias As Boolean = False
|
|
Private TipoOperacion As Int16 ' Si en 1: Agregar ;2:Actualiza ; 3:Cambia Estatus de Activo (1:Activo,0:Inactivo)
|
|
Private Id_Alias As Integer
|
|
Private DesAlias As String
|
|
|
|
|
|
#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 btnAgrergar As System.Windows.Forms.ToolBarButton
|
|
Friend WithEvents btnActualizar As System.Windows.Forms.ToolBarButton
|
|
Friend WithEvents btnEliminar As System.Windows.Forms.ToolBarButton
|
|
Friend WithEvents btnSalir As System.Windows.Forms.ToolBarButton
|
|
Friend WithEvents ImageList1 As System.Windows.Forms.ImageList
|
|
Friend WithEvents Panel1 As System.Windows.Forms.Panel
|
|
Friend WithEvents cboCatalogos As System.Windows.Forms.ComboBox
|
|
Friend WithEvents lblCatalogos As System.Windows.Forms.Label
|
|
Friend WithEvents lblComodin As System.Windows.Forms.Label
|
|
Friend WithEvents lblNombre As System.Windows.Forms.Label
|
|
Friend WithEvents txtNombre As System.Windows.Forms.TextBox
|
|
Friend WithEvents Panel3 As System.Windows.Forms.Panel
|
|
Friend WithEvents Panel4 As System.Windows.Forms.Panel
|
|
Friend WithEvents Panel5 As System.Windows.Forms.Panel
|
|
Friend WithEvents Panel7 As System.Windows.Forms.Panel
|
|
Friend WithEvents Panel6 As System.Windows.Forms.Panel
|
|
Friend WithEvents Panel9 As System.Windows.Forms.Panel
|
|
Friend WithEvents pnlAlias As System.Windows.Forms.Panel
|
|
Friend WithEvents Label3 As System.Windows.Forms.Label
|
|
Friend WithEvents Label4 As System.Windows.Forms.Label
|
|
Friend WithEvents cboRegCat As System.Windows.Forms.ComboBox
|
|
Friend WithEvents txtCat As System.Windows.Forms.TextBox
|
|
Friend WithEvents dtgCat As System.Windows.Forms.DataGrid
|
|
Friend WithEvents txtComodin As System.Windows.Forms.TextBox
|
|
Friend WithEvents txtExtra As System.Windows.Forms.TextBox
|
|
Friend WithEvents lblCuaCam As System.Windows.Forms.Label
|
|
Friend WithEvents pnlCatalgo As System.Windows.Forms.Panel
|
|
Friend WithEvents RbtnActivo As System.Windows.Forms.CheckBox
|
|
Friend WithEvents btnAlias As System.Windows.Forms.Button
|
|
Friend WithEvents tlbCatUnuarios As System.Windows.Forms.ToolBar
|
|
Friend WithEvents dtgAlias As System.Windows.Forms.DataGrid
|
|
Friend WithEvents txtId_Alias As System.Windows.Forms.TextBox
|
|
Friend WithEvents txtNomAlias As System.Windows.Forms.TextBox
|
|
Friend WithEvents btnCancelar As System.Windows.Forms.Button
|
|
Friend WithEvents btnAceptar As System.Windows.Forms.Button
|
|
Friend WithEvents pnlBotones As System.Windows.Forms.Panel
|
|
Friend WithEvents pnlDatosAlias As System.Windows.Forms.Panel
|
|
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
|
Me.components = New System.ComponentModel.Container()
|
|
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmCatalogosBinarios))
|
|
Me.tlbCatUnuarios = 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.btnSalir = New System.Windows.Forms.ToolBarButton()
|
|
Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
|
|
Me.Panel1 = New System.Windows.Forms.Panel()
|
|
Me.Panel3 = New System.Windows.Forms.Panel()
|
|
Me.Panel4 = New System.Windows.Forms.Panel()
|
|
Me.Panel5 = New System.Windows.Forms.Panel()
|
|
Me.Panel7 = New System.Windows.Forms.Panel()
|
|
Me.pnlAlias = New System.Windows.Forms.Panel()
|
|
Me.dtgAlias = New System.Windows.Forms.DataGrid()
|
|
Me.pnlDatosAlias = New System.Windows.Forms.Panel()
|
|
Me.txtId_Alias = New System.Windows.Forms.TextBox()
|
|
Me.txtNomAlias = New System.Windows.Forms.TextBox()
|
|
Me.Label3 = New System.Windows.Forms.Label()
|
|
Me.Label4 = New System.Windows.Forms.Label()
|
|
Me.Panel6 = New System.Windows.Forms.Panel()
|
|
Me.Panel9 = New System.Windows.Forms.Panel()
|
|
Me.dtgCat = New System.Windows.Forms.DataGrid()
|
|
Me.btnAlias = New System.Windows.Forms.Button()
|
|
Me.pnlCatalgo = New System.Windows.Forms.Panel()
|
|
Me.RbtnActivo = New System.Windows.Forms.CheckBox()
|
|
Me.lblCuaCam = New System.Windows.Forms.Label()
|
|
Me.txtExtra = New System.Windows.Forms.TextBox()
|
|
Me.txtComodin = New System.Windows.Forms.TextBox()
|
|
Me.lblComodin = New System.Windows.Forms.Label()
|
|
Me.lblCatalogos = New System.Windows.Forms.Label()
|
|
Me.lblNombre = New System.Windows.Forms.Label()
|
|
Me.cboRegCat = New System.Windows.Forms.ComboBox()
|
|
Me.txtNombre = New System.Windows.Forms.TextBox()
|
|
Me.txtCat = New System.Windows.Forms.TextBox()
|
|
Me.cboCatalogos = New System.Windows.Forms.ComboBox()
|
|
Me.pnlBotones = New System.Windows.Forms.Panel()
|
|
Me.btnAceptar = New System.Windows.Forms.Button()
|
|
Me.btnCancelar = New System.Windows.Forms.Button()
|
|
Me.Panel1.SuspendLayout()
|
|
Me.Panel3.SuspendLayout()
|
|
Me.Panel4.SuspendLayout()
|
|
Me.Panel5.SuspendLayout()
|
|
Me.Panel7.SuspendLayout()
|
|
Me.pnlAlias.SuspendLayout()
|
|
CType(Me.dtgAlias, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
Me.pnlDatosAlias.SuspendLayout()
|
|
Me.Panel6.SuspendLayout()
|
|
Me.Panel9.SuspendLayout()
|
|
CType(Me.dtgCat, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
Me.pnlCatalgo.SuspendLayout()
|
|
Me.pnlBotones.SuspendLayout()
|
|
Me.SuspendLayout()
|
|
'
|
|
'tlbCatUnuarios
|
|
'
|
|
Me.tlbCatUnuarios.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
|
Me.tlbCatUnuarios.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.btnAgrergar, Me.btnActualizar, Me.btnEliminar, Me.btnSalir})
|
|
Me.tlbCatUnuarios.ButtonSize = New System.Drawing.Size(75, 40)
|
|
Me.tlbCatUnuarios.DropDownArrows = True
|
|
Me.tlbCatUnuarios.ImageList = Me.ImageList1
|
|
Me.tlbCatUnuarios.Location = New System.Drawing.Point(0, 0)
|
|
Me.tlbCatUnuarios.Name = "tlbCatUnuarios"
|
|
Me.tlbCatUnuarios.ShowToolTips = True
|
|
Me.tlbCatUnuarios.Size = New System.Drawing.Size(592, 43)
|
|
Me.tlbCatUnuarios.TabIndex = 23
|
|
'
|
|
'btnAgrergar
|
|
'
|
|
Me.btnAgrergar.ImageIndex = 0
|
|
Me.btnAgrergar.Name = "btnAgrergar"
|
|
Me.btnAgrergar.Text = "Agregar"
|
|
'
|
|
'btnActualizar
|
|
'
|
|
Me.btnActualizar.ImageIndex = 5
|
|
Me.btnActualizar.Name = "btnActualizar"
|
|
Me.btnActualizar.Text = "Actualizar"
|
|
'
|
|
'btnEliminar
|
|
'
|
|
Me.btnEliminar.ImageIndex = 1
|
|
Me.btnEliminar.Name = "btnEliminar"
|
|
Me.btnEliminar.Text = "Eliminar"
|
|
'
|
|
'btnSalir
|
|
'
|
|
Me.btnSalir.ImageIndex = 4
|
|
Me.btnSalir.Name = "btnSalir"
|
|
Me.btnSalir.Text = "Salir"
|
|
'
|
|
'ImageList1
|
|
'
|
|
Me.ImageList1.ImageStream = CType(resources.GetObject("ImageList1.ImageStream"), System.Windows.Forms.ImageListStreamer)
|
|
Me.ImageList1.TransparentColor = System.Drawing.Color.Turquoise
|
|
Me.ImageList1.Images.SetKeyName(0, "")
|
|
Me.ImageList1.Images.SetKeyName(1, "")
|
|
Me.ImageList1.Images.SetKeyName(2, "")
|
|
Me.ImageList1.Images.SetKeyName(3, "")
|
|
Me.ImageList1.Images.SetKeyName(4, "")
|
|
Me.ImageList1.Images.SetKeyName(5, "")
|
|
Me.ImageList1.Images.SetKeyName(6, "")
|
|
Me.ImageList1.Images.SetKeyName(7, "")
|
|
'
|
|
'Panel1
|
|
'
|
|
Me.Panel1.Controls.Add(Me.Panel3)
|
|
Me.Panel1.Controls.Add(Me.pnlCatalgo)
|
|
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill
|
|
Me.Panel1.Location = New System.Drawing.Point(0, 43)
|
|
Me.Panel1.Name = "Panel1"
|
|
Me.Panel1.Size = New System.Drawing.Size(592, 275)
|
|
Me.Panel1.TabIndex = 24
|
|
'
|
|
'Panel3
|
|
'
|
|
Me.Panel3.Controls.Add(Me.Panel4)
|
|
Me.Panel3.Dock = System.Windows.Forms.DockStyle.Fill
|
|
Me.Panel3.Location = New System.Drawing.Point(0, 120)
|
|
Me.Panel3.Name = "Panel3"
|
|
Me.Panel3.Size = New System.Drawing.Size(592, 155)
|
|
Me.Panel3.TabIndex = 1
|
|
'
|
|
'Panel4
|
|
'
|
|
Me.Panel4.Controls.Add(Me.Panel5)
|
|
Me.Panel4.Dock = System.Windows.Forms.DockStyle.Fill
|
|
Me.Panel4.Location = New System.Drawing.Point(0, 0)
|
|
Me.Panel4.Name = "Panel4"
|
|
Me.Panel4.Size = New System.Drawing.Size(592, 155)
|
|
Me.Panel4.TabIndex = 0
|
|
'
|
|
'Panel5
|
|
'
|
|
Me.Panel5.BackColor = System.Drawing.Color.White
|
|
Me.Panel5.Controls.Add(Me.Panel7)
|
|
Me.Panel5.Dock = System.Windows.Forms.DockStyle.Fill
|
|
Me.Panel5.Location = New System.Drawing.Point(0, 0)
|
|
Me.Panel5.Name = "Panel5"
|
|
Me.Panel5.Size = New System.Drawing.Size(592, 155)
|
|
Me.Panel5.TabIndex = 56
|
|
'
|
|
'Panel7
|
|
'
|
|
Me.Panel7.Controls.Add(Me.pnlAlias)
|
|
Me.Panel7.Controls.Add(Me.Panel6)
|
|
Me.Panel7.Dock = System.Windows.Forms.DockStyle.Fill
|
|
Me.Panel7.Location = New System.Drawing.Point(0, 0)
|
|
Me.Panel7.Name = "Panel7"
|
|
Me.Panel7.Size = New System.Drawing.Size(592, 155)
|
|
Me.Panel7.TabIndex = 1
|
|
'
|
|
'pnlAlias
|
|
'
|
|
Me.pnlAlias.Controls.Add(Me.dtgAlias)
|
|
Me.pnlAlias.Controls.Add(Me.pnlDatosAlias)
|
|
Me.pnlAlias.Dock = System.Windows.Forms.DockStyle.Fill
|
|
Me.pnlAlias.Location = New System.Drawing.Point(0, 128)
|
|
Me.pnlAlias.Name = "pnlAlias"
|
|
Me.pnlAlias.Size = New System.Drawing.Size(592, 27)
|
|
Me.pnlAlias.TabIndex = 5
|
|
Me.pnlAlias.Visible = False
|
|
'
|
|
'dtgAlias
|
|
'
|
|
Me.dtgAlias.BackgroundColor = System.Drawing.SystemColors.ActiveCaptionText
|
|
Me.dtgAlias.DataMember = ""
|
|
Me.dtgAlias.Dock = System.Windows.Forms.DockStyle.Fill
|
|
Me.dtgAlias.HeaderForeColor = System.Drawing.SystemColors.ControlText
|
|
Me.dtgAlias.Location = New System.Drawing.Point(0, 88)
|
|
Me.dtgAlias.Name = "dtgAlias"
|
|
Me.dtgAlias.ReadOnly = True
|
|
Me.dtgAlias.Size = New System.Drawing.Size(592, 0)
|
|
Me.dtgAlias.TabIndex = 53
|
|
'
|
|
'pnlDatosAlias
|
|
'
|
|
Me.pnlDatosAlias.BackColor = System.Drawing.SystemColors.Control
|
|
Me.pnlDatosAlias.Controls.Add(Me.txtId_Alias)
|
|
Me.pnlDatosAlias.Controls.Add(Me.txtNomAlias)
|
|
Me.pnlDatosAlias.Controls.Add(Me.Label3)
|
|
Me.pnlDatosAlias.Controls.Add(Me.Label4)
|
|
Me.pnlDatosAlias.Dock = System.Windows.Forms.DockStyle.Top
|
|
Me.pnlDatosAlias.Location = New System.Drawing.Point(0, 0)
|
|
Me.pnlDatosAlias.Name = "pnlDatosAlias"
|
|
Me.pnlDatosAlias.Size = New System.Drawing.Size(592, 88)
|
|
Me.pnlDatosAlias.TabIndex = 51
|
|
'
|
|
'txtId_Alias
|
|
'
|
|
Me.txtId_Alias.Location = New System.Drawing.Point(104, 8)
|
|
Me.txtId_Alias.Name = "txtId_Alias"
|
|
Me.txtId_Alias.Size = New System.Drawing.Size(32, 20)
|
|
Me.txtId_Alias.TabIndex = 43
|
|
'
|
|
'txtNomAlias
|
|
'
|
|
Me.txtNomAlias.Location = New System.Drawing.Point(104, 40)
|
|
Me.txtNomAlias.Name = "txtNomAlias"
|
|
Me.txtNomAlias.RightToLeft = System.Windows.Forms.RightToLeft.Yes
|
|
Me.txtNomAlias.Size = New System.Drawing.Size(184, 20)
|
|
Me.txtNomAlias.TabIndex = 45
|
|
Me.txtNomAlias.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
|
|
'
|
|
'Label3
|
|
'
|
|
Me.Label3.BackColor = System.Drawing.SystemColors.Control
|
|
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.ForeColor = System.Drawing.Color.MidnightBlue
|
|
Me.Label3.Location = New System.Drawing.Point(32, 8)
|
|
Me.Label3.Name = "Label3"
|
|
Me.Label3.Size = New System.Drawing.Size(56, 23)
|
|
Me.Label3.TabIndex = 42
|
|
Me.Label3.Text = "Id # :"
|
|
Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
|
'
|
|
'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.ForeColor = System.Drawing.Color.MidnightBlue
|
|
Me.Label4.Location = New System.Drawing.Point(8, 40)
|
|
Me.Label4.Name = "Label4"
|
|
Me.Label4.Size = New System.Drawing.Size(88, 23)
|
|
Me.Label4.TabIndex = 44
|
|
Me.Label4.Text = "Alias Moneda :"
|
|
'
|
|
'Panel6
|
|
'
|
|
Me.Panel6.BackColor = System.Drawing.SystemColors.Control
|
|
Me.Panel6.Controls.Add(Me.Panel9)
|
|
Me.Panel6.Controls.Add(Me.btnAlias)
|
|
Me.Panel6.Dock = System.Windows.Forms.DockStyle.Top
|
|
Me.Panel6.Location = New System.Drawing.Point(0, 0)
|
|
Me.Panel6.Name = "Panel6"
|
|
Me.Panel6.Size = New System.Drawing.Size(592, 128)
|
|
Me.Panel6.TabIndex = 4
|
|
'
|
|
'Panel9
|
|
'
|
|
Me.Panel9.Controls.Add(Me.dtgCat)
|
|
Me.Panel9.Dock = System.Windows.Forms.DockStyle.Top
|
|
Me.Panel9.Location = New System.Drawing.Point(0, 0)
|
|
Me.Panel9.Name = "Panel9"
|
|
Me.Panel9.Size = New System.Drawing.Size(592, 80)
|
|
Me.Panel9.TabIndex = 0
|
|
'
|
|
'dtgCat
|
|
'
|
|
Me.dtgCat.BackgroundColor = System.Drawing.Color.White
|
|
Me.dtgCat.DataMember = ""
|
|
Me.dtgCat.Dock = System.Windows.Forms.DockStyle.Left
|
|
Me.dtgCat.GridLineColor = System.Drawing.SystemColors.ActiveCaption
|
|
Me.dtgCat.HeaderForeColor = System.Drawing.SystemColors.ControlText
|
|
Me.dtgCat.Location = New System.Drawing.Point(0, 0)
|
|
Me.dtgCat.Name = "dtgCat"
|
|
Me.dtgCat.ParentRowsBackColor = System.Drawing.Color.LightYellow
|
|
Me.dtgCat.ParentRowsForeColor = System.Drawing.SystemColors.ActiveCaption
|
|
Me.dtgCat.PreferredColumnWidth = 150
|
|
Me.dtgCat.ReadOnly = True
|
|
Me.dtgCat.SelectionBackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
|
|
Me.dtgCat.SelectionForeColor = System.Drawing.SystemColors.ActiveCaption
|
|
Me.dtgCat.Size = New System.Drawing.Size(360, 80)
|
|
Me.dtgCat.TabIndex = 2
|
|
'
|
|
'btnAlias
|
|
'
|
|
Me.btnAlias.BackColor = System.Drawing.SystemColors.Control
|
|
Me.btnAlias.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
|
Me.btnAlias.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
|
Me.btnAlias.Location = New System.Drawing.Point(328, 96)
|
|
Me.btnAlias.Name = "btnAlias"
|
|
Me.btnAlias.Size = New System.Drawing.Size(104, 24)
|
|
Me.btnAlias.TabIndex = 3
|
|
Me.btnAlias.Text = "Alias ..."
|
|
Me.btnAlias.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
|
Me.btnAlias.UseVisualStyleBackColor = False
|
|
Me.btnAlias.Visible = False
|
|
'
|
|
'pnlCatalgo
|
|
'
|
|
Me.pnlCatalgo.BackColor = System.Drawing.SystemColors.Control
|
|
Me.pnlCatalgo.Controls.Add(Me.RbtnActivo)
|
|
Me.pnlCatalgo.Controls.Add(Me.lblCuaCam)
|
|
Me.pnlCatalgo.Controls.Add(Me.txtExtra)
|
|
Me.pnlCatalgo.Controls.Add(Me.txtComodin)
|
|
Me.pnlCatalgo.Controls.Add(Me.lblComodin)
|
|
Me.pnlCatalgo.Controls.Add(Me.lblCatalogos)
|
|
Me.pnlCatalgo.Controls.Add(Me.lblNombre)
|
|
Me.pnlCatalgo.Controls.Add(Me.cboRegCat)
|
|
Me.pnlCatalgo.Controls.Add(Me.txtNombre)
|
|
Me.pnlCatalgo.Controls.Add(Me.txtCat)
|
|
Me.pnlCatalgo.Controls.Add(Me.cboCatalogos)
|
|
Me.pnlCatalgo.Controls.Add(Me.pnlBotones)
|
|
Me.pnlCatalgo.Dock = System.Windows.Forms.DockStyle.Top
|
|
Me.pnlCatalgo.Location = New System.Drawing.Point(0, 0)
|
|
Me.pnlCatalgo.Name = "pnlCatalgo"
|
|
Me.pnlCatalgo.Size = New System.Drawing.Size(592, 120)
|
|
Me.pnlCatalgo.TabIndex = 0
|
|
'
|
|
'RbtnActivo
|
|
'
|
|
Me.RbtnActivo.AccessibleRole = System.Windows.Forms.AccessibleRole.None
|
|
Me.RbtnActivo.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
|
Me.RbtnActivo.ForeColor = System.Drawing.Color.Red
|
|
Me.RbtnActivo.Location = New System.Drawing.Point(192, 56)
|
|
Me.RbtnActivo.Name = "RbtnActivo"
|
|
Me.RbtnActivo.Size = New System.Drawing.Size(112, 24)
|
|
Me.RbtnActivo.TabIndex = 13
|
|
Me.RbtnActivo.Text = "Activo"
|
|
'
|
|
'lblCuaCam
|
|
'
|
|
Me.lblCuaCam.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
|
Me.lblCuaCam.ForeColor = System.Drawing.Color.MidnightBlue
|
|
Me.lblCuaCam.Location = New System.Drawing.Point(8, 120)
|
|
Me.lblCuaCam.Name = "lblCuaCam"
|
|
Me.lblCuaCam.Size = New System.Drawing.Size(64, 23)
|
|
Me.lblCuaCam.TabIndex = 12
|
|
Me.lblCuaCam.Text = "Nombre :"
|
|
Me.lblCuaCam.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
|
'
|
|
'txtExtra
|
|
'
|
|
Me.txtExtra.Location = New System.Drawing.Point(80, 120)
|
|
Me.txtExtra.Name = "txtExtra"
|
|
Me.txtExtra.Size = New System.Drawing.Size(200, 20)
|
|
Me.txtExtra.TabIndex = 11
|
|
Me.txtExtra.Text = "Tarjeta de Credito"
|
|
'
|
|
'txtComodin
|
|
'
|
|
Me.txtComodin.BackColor = System.Drawing.Color.White
|
|
Me.txtComodin.Location = New System.Drawing.Point(80, 56)
|
|
Me.txtComodin.Name = "txtComodin"
|
|
Me.txtComodin.ReadOnly = True
|
|
Me.txtComodin.Size = New System.Drawing.Size(64, 20)
|
|
Me.txtComodin.TabIndex = 4
|
|
Me.txtComodin.Text = "001"
|
|
'
|
|
'lblComodin
|
|
'
|
|
Me.lblComodin.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
|
Me.lblComodin.ForeColor = System.Drawing.Color.MidnightBlue
|
|
Me.lblComodin.Location = New System.Drawing.Point(0, 56)
|
|
Me.lblComodin.Name = "lblComodin"
|
|
Me.lblComodin.Size = New System.Drawing.Size(72, 23)
|
|
Me.lblComodin.TabIndex = 3
|
|
Me.lblComodin.Text = "Id # :"
|
|
Me.lblComodin.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
|
'
|
|
'lblCatalogos
|
|
'
|
|
Me.lblCatalogos.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
|
Me.lblCatalogos.ForeColor = System.Drawing.Color.MidnightBlue
|
|
Me.lblCatalogos.Location = New System.Drawing.Point(0, 24)
|
|
Me.lblCatalogos.Name = "lblCatalogos"
|
|
Me.lblCatalogos.Size = New System.Drawing.Size(72, 23)
|
|
Me.lblCatalogos.TabIndex = 2
|
|
Me.lblCatalogos.Text = "Catalogos :"
|
|
Me.lblCatalogos.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
|
'
|
|
'lblNombre
|
|
'
|
|
Me.lblNombre.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
|
Me.lblNombre.ForeColor = System.Drawing.Color.MidnightBlue
|
|
Me.lblNombre.Location = New System.Drawing.Point(8, 88)
|
|
Me.lblNombre.Name = "lblNombre"
|
|
Me.lblNombre.Size = New System.Drawing.Size(64, 23)
|
|
Me.lblNombre.TabIndex = 1
|
|
Me.lblNombre.Text = "Nombre :"
|
|
Me.lblNombre.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
|
'
|
|
'cboRegCat
|
|
'
|
|
Me.cboRegCat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
|
Me.cboRegCat.Location = New System.Drawing.Point(80, 88)
|
|
Me.cboRegCat.Name = "cboRegCat"
|
|
Me.cboRegCat.Size = New System.Drawing.Size(200, 21)
|
|
Me.cboRegCat.TabIndex = 0
|
|
'
|
|
'txtNombre
|
|
'
|
|
Me.txtNombre.Location = New System.Drawing.Point(80, 88)
|
|
Me.txtNombre.Name = "txtNombre"
|
|
Me.txtNombre.Size = New System.Drawing.Size(200, 20)
|
|
Me.txtNombre.TabIndex = 1
|
|
Me.txtNombre.Text = "Tarjeta de Credito"
|
|
'
|
|
'txtCat
|
|
'
|
|
Me.txtCat.BackColor = System.Drawing.Color.White
|
|
Me.txtCat.Location = New System.Drawing.Point(80, 24)
|
|
Me.txtCat.Name = "txtCat"
|
|
Me.txtCat.ReadOnly = True
|
|
Me.txtCat.Size = New System.Drawing.Size(200, 20)
|
|
Me.txtCat.TabIndex = 10
|
|
Me.txtCat.Text = "Tarjeta de Credito"
|
|
'
|
|
'cboCatalogos
|
|
'
|
|
Me.cboCatalogos.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
|
Me.cboCatalogos.Location = New System.Drawing.Point(80, 24)
|
|
Me.cboCatalogos.Name = "cboCatalogos"
|
|
Me.cboCatalogos.Size = New System.Drawing.Size(200, 21)
|
|
Me.cboCatalogos.TabIndex = 1
|
|
'
|
|
'pnlBotones
|
|
'
|
|
Me.pnlBotones.Controls.Add(Me.btnAceptar)
|
|
Me.pnlBotones.Controls.Add(Me.btnCancelar)
|
|
Me.pnlBotones.Location = New System.Drawing.Point(312, 24)
|
|
Me.pnlBotones.Name = "pnlBotones"
|
|
Me.pnlBotones.Size = New System.Drawing.Size(120, 80)
|
|
Me.pnlBotones.TabIndex = 14
|
|
'
|
|
'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
|
|
Me.btnAceptar.UseVisualStyleBackColor = False
|
|
'
|
|
'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
|
|
Me.btnCancelar.UseVisualStyleBackColor = False
|
|
'
|
|
'frmCatalogosBinarios
|
|
'
|
|
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
|
|
Me.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
|
|
Me.ClientSize = New System.Drawing.Size(592, 318)
|
|
Me.ControlBox = False
|
|
Me.Controls.Add(Me.Panel1)
|
|
Me.Controls.Add(Me.tlbCatUnuarios)
|
|
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D
|
|
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
|
Me.Name = "frmCatalogosBinarios"
|
|
Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide
|
|
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
|
Me.Tag = "CatUni001"
|
|
Me.Text = "Catalogos Unitarios"
|
|
Me.Panel1.ResumeLayout(False)
|
|
Me.Panel3.ResumeLayout(False)
|
|
Me.Panel4.ResumeLayout(False)
|
|
Me.Panel5.ResumeLayout(False)
|
|
Me.Panel7.ResumeLayout(False)
|
|
Me.pnlAlias.ResumeLayout(False)
|
|
CType(Me.dtgAlias, System.ComponentModel.ISupportInitialize).EndInit()
|
|
Me.pnlDatosAlias.ResumeLayout(False)
|
|
Me.pnlDatosAlias.PerformLayout()
|
|
Me.Panel6.ResumeLayout(False)
|
|
Me.Panel9.ResumeLayout(False)
|
|
CType(Me.dtgCat, System.ComponentModel.ISupportInitialize).EndInit()
|
|
Me.pnlCatalgo.ResumeLayout(False)
|
|
Me.pnlCatalgo.PerformLayout()
|
|
Me.pnlBotones.ResumeLayout(False)
|
|
Me.ResumeLayout(False)
|
|
Me.PerformLayout()
|
|
|
|
End Sub
|
|
|
|
#End Region
|
|
|
|
Private Sub tlbCorteCaja_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles tlbCatUnuarios.ButtonClick
|
|
DesOperacion = e.Button.Text
|
|
Select Case e.Button.Text
|
|
Case "Agregar"
|
|
AgregarCat(1)
|
|
Case "Actualizar"
|
|
SetSelectedIndex(Me.dtgAlias)
|
|
AgregarCat(2)
|
|
Case "Eliminar"
|
|
AgregarCat(3)
|
|
Case "Activar"
|
|
AgregarCat(3)
|
|
Case "Salir"
|
|
Me.Close()
|
|
End Select
|
|
|
|
End Sub
|
|
|
|
Private Sub frmCatalogosBinarios_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
|
|
|
RbtnActivo.Enabled = False
|
|
cboRegCat.Visible = True
|
|
cboRegCat.Visible = False
|
|
Me.StartPosition = FormStartPosition.CenterScreen
|
|
NombreCatalogo = Replace(Me.Text, "á", "a")
|
|
LlenaCombo.LlenaData("spcbDatosCombo '" & "Catalogos'", cboCatalogos, dtCatalogos)
|
|
Dim i As Integer
|
|
For i = 0 To cboCatalogos.Items.Count - 1
|
|
cboCatalogos.SelectedIndex = i
|
|
If cboCatalogos.Text = NombreCatalogo Then
|
|
cboCatalogos.SelectedValue = cboCatalogos.SelectedValue
|
|
Exit For
|
|
End If
|
|
Next
|
|
cboCatalogos.Visible = False
|
|
Actualizar()
|
|
SetSelectedIndex(dtgCat)
|
|
EtiquetaExtra(NombreCatalogo, 0)
|
|
txtCat.Text = cboCatalogos.Text
|
|
Id_Catalgo = cboCatalogos.SelectedValue
|
|
|
|
End Sub
|
|
Private Sub Actualizar()
|
|
|
|
pnlCatalgo.Enabled = True
|
|
pnlAlias.Visible = False
|
|
Me.Location = New System.Drawing.Point(250, 150)
|
|
Me.Size = New System.Drawing.Size(469, 330)
|
|
txtCat.Enabled = True
|
|
txtComodin.Enabled = True
|
|
RbtnActivo.Enabled = False
|
|
Me.dtgCat.Enabled = True
|
|
cboRegCat.Visible = True
|
|
cboRegCat.Enabled = True
|
|
LlenaCombo.LlenaData("spcbDatosCombo '" & NombreCatalogo & "'", cboRegCat, dtRegCatalogos)
|
|
LlenaGrid.LlenaData("spcbDatosGridCatalogos " & Me.cboCatalogos.SelectedValue, dtgCat, dtGrid) '1:Catalgo ; 2:Alias
|
|
AparienciaGrid(dtgCat, 1)
|
|
SetSelectedIndex(dtgCat)
|
|
Me.btnAlias.Enabled = True
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
Public Sub Entrar(ByVal NombreCatalgog As String)
|
|
|
|
Me.Text = NombreCatalgog
|
|
NombreCatalogo = NombreCatalgog
|
|
|
|
End Sub
|
|
|
|
|
|
Private Sub AsignaAlias(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAlias.Click
|
|
If Me.bolAlias = True Then
|
|
Me.bolAlias = False
|
|
btnAlias.Text = "Alias ..."
|
|
pnlCatalgo.Controls.Add(pnlBotones)
|
|
Actualizar()
|
|
Else
|
|
bolAlias = True
|
|
btnAlias.Text = "Salir Alias"
|
|
Me.pnlBotones.Location = New System.Drawing.Point(328, 8)
|
|
pnlDatosAlias.Controls.Add(pnlBotones)
|
|
Me.Size = New System.Drawing.Size(470, 560)
|
|
Me.pnlAlias.Visible = True
|
|
cboRegCat.Visible = False
|
|
txtNombre.Text = cboRegCat.Text
|
|
pnlCatalgo.Enabled = False
|
|
ActualizarAlias()
|
|
SetSelectedIndex(Me.dtgAlias)
|
|
Me.Location = New System.Drawing.Point(250, 70)
|
|
End If
|
|
End Sub
|
|
Private Sub ActualizarAlias()
|
|
LlenaGrid.LlenaData("spcbDatosGridAliasCat " & Me.Id_Catalgo.ToString & "," & Me.Id_Comodin.ToString, dtgAlias, dtGridAlias) '1:Catalgo ; 2:Alias
|
|
AparienciaGrid(dtgAlias, 2)
|
|
End Sub
|
|
|
|
Private Sub AgregarCat(ByVal Operacion As Integer)
|
|
Try
|
|
TipoOperacion = Operacion
|
|
If bolAlias = False Then 'Catalgos
|
|
dtgCat.Enabled = False
|
|
If TipoOperacion = 1 Or TipoOperacion = 2 Then
|
|
Me.txtNombre.Enabled = True
|
|
RbtnActivo.Enabled = True
|
|
cboRegCat.Visible = False
|
|
btnAlias.Enabled = False
|
|
|
|
If TipoOperacion = 1 Then
|
|
|
|
Command.spsql = "spcbConsecutivoCatalogo '" & NombreCatalogo & " '"
|
|
Command.Lee(Command.spsql)
|
|
Me.MaximoCatalogo = Command.dtReader("Maximo")
|
|
Command.dtReader.Close()
|
|
txtComodin.Text = MaximoCatalogo.ToString
|
|
txtNombre.Text = ""
|
|
RbtnActivo.Checked = False
|
|
Me.txtExtra.Text = ""
|
|
|
|
End If
|
|
|
|
ElseIf TipoOperacion = 3 Then
|
|
txtCat.Enabled = False
|
|
cboCatalogos.Enabled = False
|
|
cboRegCat.Enabled = False
|
|
txtComodin.Enabled = False
|
|
btnAlias.Enabled = False
|
|
RbtnActivo.Enabled = True
|
|
|
|
If RbtnActivo.Checked = False Then
|
|
If MessageBox.Show("Desea Volver activar """ + Nombre + """", "Catàlogos", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.No Then
|
|
Actualizar()
|
|
Else
|
|
RbtnActivo.Checked = True
|
|
End If
|
|
End If
|
|
End If
|
|
Else
|
|
'Alias
|
|
If TipoOperacion = 1 Or TipoOperacion = 2 Then
|
|
Me.txtNomAlias.ReadOnly = False
|
|
If TipoOperacion = 1 Then
|
|
Command.spsql = "spcbConsecutivoAliasCatalogo " & Me.Id_Catalgo.ToString & "," & Me.Id_Comodin.ToString
|
|
Command.Lee(Command.spsql)
|
|
Me.MaximoaAlias = Command.dtReader("Maximo")
|
|
Command.dtReader.Close()
|
|
txtId_Alias.Text = MaximoaAlias.ToString
|
|
txtNomAlias.Text = ""
|
|
Me.txtExtra.Text = ""
|
|
End If
|
|
ElseIf TipoOperacion = 3 Then
|
|
|
|
If MessageBox.Show("Realmente desea " + DesOperacion.ToLower + """" + Me.NombreAlias + """ " + "a " & Me.cboRegCat.Text.ToLower, Me.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then
|
|
Command.spsql = "spcbActAliasCatUnuarios " & Me.cboCatalogos.SelectedValue & " ," & Me.cboRegCat.SelectedValue & " , " & Me.Id_Alias & " ,'" & Me.NombreAlias.ToUpper & " '," & TipoOperacion
|
|
Command.Ejecuta(Command.spsql)
|
|
ActualizarAlias()
|
|
Me.CargarInformacion(Me.dtgAlias)
|
|
|
|
End If
|
|
|
|
End If
|
|
End If
|
|
|
|
Catch a As Exception
|
|
MessageBox.Show(a.Message)
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub SetSelectedIndex(ByVal myGrid As DataGrid)
|
|
CargarInformacion(myGrid)
|
|
End Sub
|
|
|
|
Private Sub dtgCat_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles dtgCat.DoubleClick
|
|
CargarInformacion(dtgCat)
|
|
End Sub
|
|
|
|
Private Sub CargarInformacion(ByVal GridOrigen As DataGrid)
|
|
Dim Indice As Integer
|
|
Indice = GridOrigen.CurrentRowIndex
|
|
If GridOrigen.Name = "dtgCat" Then
|
|
Try
|
|
'RbtnActivo.Text = dtGrid.Rows(Indice).Item(0)
|
|
Id_Comodin = dtGrid.Rows(Indice).Item(0)
|
|
Id_Catalgo = dtGrid.Rows(Indice).Item(1)
|
|
Nombre = dtGrid.Rows(Indice).Item(2)
|
|
Activo = dtGrid.Rows(Indice).Item(3)
|
|
If Activo = 0 Then
|
|
Me.tlbCatUnuarios.Buttons.Item(2).Text = "Activar"
|
|
Else
|
|
Me.tlbCatUnuarios.Buttons.Item(2).Text = "Eliminar"
|
|
End If
|
|
EtiquetaExtra(NombreCatalogo, Indice)
|
|
Catch
|
|
End Try
|
|
txtComodin.Text = Id_Comodin.ToString
|
|
txtNombre.Text = Nombre
|
|
Me.cboRegCat.SelectedValue = Id_Comodin
|
|
CatActivo(Activo)
|
|
Else
|
|
Try
|
|
Me.tlbCatUnuarios.Buttons.Item(2).Text = "Eliminar"
|
|
Id_Alias = Me.dtGridAlias.Rows(Indice).Item(2)
|
|
DesAlias = Me.dtGridAlias.Rows(Indice).Item(3)
|
|
Me.txtId_Alias.Text = Id_Alias.ToString
|
|
Me.txtNomAlias.Text = DesAlias
|
|
txtNomAlias.ReadOnly = True
|
|
Me.NombreAlias = txtNomAlias.Text
|
|
Catch
|
|
End Try
|
|
End If
|
|
End Sub
|
|
|
|
|
|
|
|
Private Function CatActivo(Optional ByVal Activo As Integer = 0) As Integer
|
|
|
|
If Activo = 1 Then
|
|
RbtnActivo.Checked = True
|
|
Else
|
|
RbtnActivo.Checked = False
|
|
End If
|
|
End Function
|
|
|
|
Private Sub InsertActivo()
|
|
|
|
If RbtnActivo.Checked = True Then
|
|
InsertaActivo = 1
|
|
Else
|
|
InsertaActivo = 0
|
|
End If
|
|
|
|
End Sub
|
|
|
|
Private Sub EtiquetaExtra(ByVal NombreCatalogo As String, ByVal indice As Integer)
|
|
If NombreCatalogo = "Catálogos" Or NombreCatalogo = "Productos" Then
|
|
Me.pnlCatalgo.Size = New System.Drawing.Size(474, 150)
|
|
If bolAlias = False Then
|
|
Me.Size = New System.Drawing.Size(482, 390)
|
|
End If
|
|
CuartoCampo = dtGrid.Rows(indice).Item(4)
|
|
If NombreCatalogo = "Catálogos" Then
|
|
Me.lblCuaCam.Text = "Tabla :"
|
|
Me.txtExtra.Text = CuartoCampo
|
|
ElseIf NombreCatalogo = "Productos" Then
|
|
Me.lblCuaCam.Text = "NoCamposLayout :"
|
|
Me.txtExtra.Text = CuartoCampo
|
|
End If
|
|
Else
|
|
Me.lblCuaCam.Text = ""
|
|
Me.txtExtra.Visible = False
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub SeleccionGrid(ByVal sender As Object, ByVal e As System.EventArgs) Handles dtgCat.CurrentCellChanged, dtgAlias.CurrentCellChanged
|
|
'Evento que se dispara cuando me muevo entre los registos de la tabla
|
|
CargarInformacion(sender)
|
|
End Sub
|
|
|
|
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAceptar.Click
|
|
If Me.bolAlias = False Then
|
|
If Me.TipoOperacion = 1 Or Me.TipoOperacion = 2 Then
|
|
If ValidaTexto.ValidaCadenas(txtNombre) = 0 Then
|
|
MessageBox.Show("Ingrese datos necesarios", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
|
|
Me.txtNombre.Focus()
|
|
Else
|
|
Nombre = Me.txtNombre.Text
|
|
Id_Comodin = CType(Me.txtComodin.Text, Integer)
|
|
InsertActivo()
|
|
If NombreCatalogo = "Catàlogos" Or NombreCatalogo = "Productos" Then
|
|
If NombreCatalogo = "Productos" Then
|
|
'Valida en entero
|
|
Dim Numero As Boolean
|
|
Numero = IsNumeric(Me.txtExtra.Text)
|
|
If Numero = False Then
|
|
MessageBox.Show("Tipo de Datos Incorrecto", Me.NombreCatalogo, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
|
|
Else
|
|
CuartoCampo = Me.txtExtra.Text
|
|
|
|
End If
|
|
End If
|
|
CuartoCampo = Me.txtExtra.Text
|
|
Else
|
|
CuartoCampo = "N/A"
|
|
End If
|
|
End If
|
|
End If
|
|
|
|
If MessageBox.Show("¿Realmente desea " + DesOperacion.ToLower + " """ + Nombre + """ " + " en el catálogo? ", Me.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then
|
|
Command.spsql = "spcbActualizaCatalogosUnuarios '" & NombreCatalogo & " ' , " & Id_Comodin & " , " & Id_Catalgo & " ,'" & Nombre.ToLower & " ' ," & InsertaActivo & " , '" & CuartoCampo & " '," & TipoOperacion
|
|
Command.Ejecuta(Command.spsql)
|
|
'Si se agrega un nuevo parametro este se agrega de forma automatica al grupo de cuentas Defult...Sí,Solo a ese grupo regla de negocio y mantenimiento
|
|
|
|
Dim ClassAud As New ClassMyUtils
|
|
Dim varUser As Long
|
|
Dim ClassComodin As New clsComplejo
|
|
|
|
Select Case UCase(NombreCatalogo)
|
|
Case Is = "INSTRUMENTO MONETARIO"
|
|
|
|
If TipoOperacion = 1 Then 'agregar
|
|
'AUDITORIA
|
|
ClassAud.RT_Auditoria(clsVaribles.varUsuario, 28, 1, Nombre.ToLower)
|
|
|
|
'varUser = ClassComodin.BuscaValores("IdUsuario", "usuario", "usuario = '" & My.User.Name & "'")
|
|
' ClassAud.RT_Auditoria(clsVaribles.varUsuario, 28, My.Computer.Name, "Minds Cliente", "Alta Instrumento Monetario nombre = " & Nombre & " clave = " & Id_Comodin)
|
|
'FIN AUDITORIA
|
|
End If
|
|
|
|
If UCase(DesOperacion) = "ACTUALIZAR" Then 'actualiza
|
|
|
|
'AUDITORIA
|
|
'varUser = ClassComodin.BuscaValores("IdUsuario", "usuario", "usuario = '" & My.User.Name & "'")
|
|
ClassAud.RT_Auditoria(clsVaribles.varUsuario, 30, 1, Nombre.ToLower)
|
|
|
|
' ClassAud.RT_Auditoria(clsVaribles.varUsuario, 29, My.Computer.Name, "Minds Cliente", "Cambio Instrumentos Monetarios Nombre = " & Me.txtNombre.Text & " Clave = " & Me.txtComodin.Text)
|
|
'FIN AUDITORIA
|
|
|
|
End If
|
|
|
|
If UCase(DesOperacion) = "ELIMINAR" Then
|
|
'varUser = ClassComodin.BuscaValores("IdUsuario", "usuario", "usuario = '" & My.User.Name & "'")
|
|
ClassAud.RT_Auditoria(clsVaribles.varUsuario, 29, 1, Nombre.ToLower)
|
|
|
|
' ClassAud.RT_Auditoria(clsVaribles.varUsuario, 30, My.Computer.Name, "Minds Cliente", "Cambio Instrumentos Monetarios Nombre = " & Me.txtNombre.Text & " Clave = " & Me.txtComodin.Text)
|
|
'FIN AUDITORIA
|
|
End If
|
|
|
|
Case Is = "ORGANISMO INTERNACIONAL"
|
|
|
|
If UCase(DesOperacion) = "AGREGAR" Then 'agregar
|
|
'AUDITORIA
|
|
'varUser = ClassComodin.BuscaValores("IdUsuario", "usuario", "usuario = '" & My.User.Name & "'")
|
|
ClassAud.RT_Auditoria(clsVaribles.varUsuario, 25, 1, Nombre.ToLower)
|
|
|
|
' ClassAud.RT_Auditoria(clsVaribles.varUsuario, 25, My.Computer.Name, "Minds Cliente", "Alta Organismo Internacional nombre = " & Nombre & " clave = " & Id_Comodin)
|
|
'FIN AUDITORIA
|
|
End If
|
|
|
|
If UCase(DesOperacion) = "ACTUALIZAR" Then 'actualiza
|
|
|
|
'AUDITORIA
|
|
'varUser = ClassComodin.BuscaValores("IdUsuario", "usuario", "usuario = '" & My.User.Name & "'")
|
|
ClassAud.RT_Auditoria(clsVaribles.varUsuario, 27, 1, Nombre.ToLower)
|
|
|
|
' ClassAud.RT_Auditoria(clsVaribles.varUsuario, 27, My.Computer.Name, "Minds Cliente", "Cambio Organismo Internacional Nombre = " & Me.txtNombre.Text & " Clave = " & Me.txtComodin.Text)
|
|
'FIN AUDITORIA
|
|
|
|
End If
|
|
|
|
'"Eliminar"
|
|
|
|
If UCase(DesOperacion) = "ELIMINAR" Then 'actualiza
|
|
|
|
'AUDITORIA
|
|
'varUser = ClassComodin.BuscaValores("IdUsuario", "usuario", "usuario = '" & My.User.Name & "'")
|
|
ClassAud.RT_Auditoria(clsVaribles.varUsuario, 26, 1, Nombre.ToLower)
|
|
|
|
' ClassAud.RT_Auditoria(clsVaribles.varUsuario, 26, My.Computer.Name, "Minds Cliente", "Baja Organismo Internacional Nombre = " & Me.txtNombre.Text & " Clave = " & Me.txtComodin.Text)
|
|
'FIN AUDITORIA
|
|
|
|
End If
|
|
|
|
End Select
|
|
|
|
|
|
End If
|
|
Actualizar()
|
|
|
|
Else
|
|
If Me.TipoOperacion = 1 Or Me.TipoOperacion = 2 Then
|
|
|
|
If ValidaTexto.ValidaCadenas(Me.txtNomAlias) = 0 Then
|
|
MessageBox.Show("Ingerese datos necesarios")
|
|
txtNomAlias.Focus()
|
|
Else
|
|
Me.Id_Alias = Me.txtId_Alias.Text
|
|
NombreAlias = txtNomAlias.Text.Trim
|
|
If MessageBox.Show("Realmente desea " + DesOperacion.ToLower + """" + Me.NombreAlias + """ " + "a " & Me.cboRegCat.Text.ToLower, Me.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then
|
|
Command.spsql = "spcbActAliasCatUnuarios " & Me.cboCatalogos.SelectedValue & " ," & Me.cboRegCat.SelectedValue & " , " & Me.Id_Alias & " ,'" & Me.NombreAlias.ToUpper & " '," & TipoOperacion
|
|
Command.Ejecuta(Command.spsql)
|
|
Me.ActualizarAlias()
|
|
Me.CargarInformacion(Me.dtgAlias)
|
|
|
|
End If
|
|
End If
|
|
End If
|
|
End If
|
|
End Sub
|
|
|
|
|
|
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancelar.Click
|
|
If Me.bolAlias = False Then
|
|
Actualizar()
|
|
Else
|
|
Me.CargarInformacion(Me.dtgAlias)
|
|
End If
|
|
|
|
End Sub
|
|
Private Sub AparienciaGrid(ByVal Grid As DataGrid, ByVal Tipo As Integer)
|
|
Dim ts As DataGridTableStyle = New DataGridTableStyle
|
|
ts.MappingName = Grid.DataMember
|
|
Grid.TableStyles.Clear()
|
|
Grid.TableStyles.Add(ts)
|
|
If Tipo = 1 Then
|
|
|
|
If Me.NombreCatalogo = "Actividad Económica" Or NombreCatalogo = "Institución Financiera" Then
|
|
Grid.TableStyles(0).GridColumnStyles(0).Width = 100
|
|
Else
|
|
Grid.TableStyles(0).GridColumnStyles(0).Width = 0
|
|
End If
|
|
Grid.TableStyles(0).GridColumnStyles(1).Width = 0
|
|
Grid.TableStyles(0).GridColumnStyles(2).Width = 200
|
|
Grid.TableStyles(0).GridColumnStyles(2).HeaderText = NombreCatalogo
|
|
Grid.TableStyles(0).GridColumnStyles(3).Width = 0
|
|
Else
|
|
Grid.TableStyles(0).GridColumnStyles(0).Width = 0
|
|
Grid.TableStyles(0).GridColumnStyles(1).Width = 0
|
|
Grid.TableStyles(0).GridColumnStyles(2).Width = 50
|
|
Grid.TableStyles(0).GridColumnStyles(2).HeaderText = "# Alias"
|
|
Grid.TableStyles(0).GridColumnStyles(3).HeaderText = "Valor Alias"
|
|
Grid.TableStyles(0).GridColumnStyles(3).Width = 200
|
|
End If
|
|
|
|
End Sub
|
|
|
|
|
|
Private Sub cboRegCat_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cboRegCat.SelectedValueChanged
|
|
Try
|
|
txtComodin.Text = cboRegCat.SelectedValue
|
|
Id_Comodin = txtComodin.Text.Trim
|
|
Catch
|
|
End Try
|
|
|
|
End Sub
|
|
|
|
Private Sub dtgCat_Navigate(ByVal sender As System.Object, ByVal ne As System.Windows.Forms.NavigateEventArgs) Handles dtgCat.Navigate
|
|
|
|
End Sub
|
|
|
|
Private Sub Panel9_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Panel9.Paint
|
|
|
|
End Sub
|
|
|
|
Private Sub pnlCatalgo_Paint(sender As System.Object, e As System.Windows.Forms.PaintEventArgs) Handles pnlCatalgo.Paint
|
|
|
|
End Sub
|
|
End Class
|