Public Class ActualizadorBinario 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 Valor As String Private DesOperacion As String Private dtGrupos As New DataTable() 'Tabla de combo de Grupos de Cuentas Private dtParametros As New DataTable() 'Tabla de Combo de Paramtros de Grupo Private dtGridParamtros As New DataTable() 'Tabla de Valor de Parametros Private vwGrid As New View() Private Id_Grupo As Integer Private Id_Parametro As Integer Private NombreCatalogo As String Private NombreParametro As String Private TipoOperacion As Int16 ' 0:Actualiza Valor de Parametro ; 1:Activa Grupò Private Activo As Boolean Private Activa As Boolean Private Indice As Integer Private Fin 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 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 Panel1 As System.Windows.Forms.Panel Friend WithEvents lblNombre As System.Windows.Forms.Label 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 txtExtra As System.Windows.Forms.TextBox Friend WithEvents lblCuaCam As System.Windows.Forms.Label Friend WithEvents pnlCatalgo As System.Windows.Forms.Panel Friend WithEvents tlbCatUnuarios As System.Windows.Forms.ToolBar 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 lblGrupos As System.Windows.Forms.Label Friend WithEvents Panel9 As System.Windows.Forms.Panel Friend WithEvents ImageList1 As System.Windows.Forms.ImageList Friend WithEvents txtValPar As System.Windows.Forms.Label Friend WithEvents dtgParGru As System.Windows.Forms.DataGrid Friend WithEvents txtValParametro As System.Windows.Forms.TextBox Friend WithEvents cboGruCue As System.Windows.Forms.ComboBox Friend WithEvents txtGruCue As System.Windows.Forms.TextBox Friend WithEvents cboParGru As System.Windows.Forms.ComboBox Friend WithEvents RbtnActivo As System.Windows.Forms.CheckBox Friend WithEvents msdHora As AxMSMask.AxMaskEdBox Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(ActualizadorBinario)) 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.Panel9 = New System.Windows.Forms.Panel() Me.dtgParGru = New System.Windows.Forms.DataGrid() Me.pnlCatalgo = New System.Windows.Forms.Panel() Me.RbtnActivo = New System.Windows.Forms.CheckBox() Me.txtValPar = New System.Windows.Forms.Label() Me.lblCuaCam = New System.Windows.Forms.Label() Me.txtExtra = New System.Windows.Forms.TextBox() Me.lblGrupos = New System.Windows.Forms.Label() Me.lblNombre = New System.Windows.Forms.Label() Me.pnlBotones = New System.Windows.Forms.Panel() Me.btnAceptar = New System.Windows.Forms.Button() Me.btnCancelar = New System.Windows.Forms.Button() Me.cboGruCue = New System.Windows.Forms.ComboBox() Me.txtGruCue = New System.Windows.Forms.TextBox() Me.cboParGru = New System.Windows.Forms.ComboBox() Me.msdHora = New AxMSMask.AxMaskEdBox() Me.txtValParametro = New System.Windows.Forms.TextBox() Me.Panel1.SuspendLayout() Me.Panel3.SuspendLayout() Me.Panel4.SuspendLayout() Me.Panel5.SuspendLayout() Me.Panel9.SuspendLayout() CType(Me.dtgParGru, System.ComponentModel.ISupportInitialize).BeginInit() Me.pnlCatalgo.SuspendLayout() Me.pnlBotones.SuspendLayout() CType(Me.msdHora, System.ComponentModel.ISupportInitialize).BeginInit() 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.Name = "tlbCatUnuarios" Me.tlbCatUnuarios.ShowToolTips = True Me.tlbCatUnuarios.Size = New System.Drawing.Size(558, 44) Me.tlbCatUnuarios.TabIndex = 23 ' 'btnAgrergar ' Me.btnAgrergar.Enabled = False Me.btnAgrergar.ImageIndex = 0 Me.btnAgrergar.Text = "Agregar" ' 'btnActualizar ' Me.btnActualizar.ImageIndex = 5 Me.btnActualizar.Text = "Actualizar" ' 'btnEliminar ' Me.btnEliminar.Enabled = False Me.btnEliminar.ImageIndex = 1 Me.btnEliminar.Text = "Eliminar" ' 'btnSalir ' Me.btnSalir.ImageIndex = 4 Me.btnSalir.Text = "Salir" ' 'ImageList1 ' Me.ImageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit 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 ' 'Panel1 ' Me.Panel1.Controls.AddRange(New System.Windows.Forms.Control() {Me.Panel3, Me.pnlCatalgo}) Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill Me.Panel1.Location = New System.Drawing.Point(0, 44) Me.Panel1.Name = "Panel1" Me.Panel1.Size = New System.Drawing.Size(558, 336) Me.Panel1.TabIndex = 24 ' 'Panel3 ' Me.Panel3.Controls.AddRange(New System.Windows.Forms.Control() {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(558, 216) Me.Panel3.TabIndex = 1 ' 'Panel4 ' Me.Panel4.Controls.AddRange(New System.Windows.Forms.Control() {Me.Panel5}) Me.Panel4.Dock = System.Windows.Forms.DockStyle.Fill Me.Panel4.Name = "Panel4" Me.Panel4.Size = New System.Drawing.Size(558, 216) Me.Panel4.TabIndex = 0 ' 'Panel5 ' Me.Panel5.BackColor = System.Drawing.Color.White Me.Panel5.Controls.AddRange(New System.Windows.Forms.Control() {Me.Panel9}) Me.Panel5.Dock = System.Windows.Forms.DockStyle.Fill Me.Panel5.Name = "Panel5" Me.Panel5.Size = New System.Drawing.Size(558, 216) Me.Panel5.TabIndex = 56 ' 'Panel9 ' Me.Panel9.BackColor = System.Drawing.Color.White Me.Panel9.Controls.AddRange(New System.Windows.Forms.Control() {Me.dtgParGru}) Me.Panel9.Dock = System.Windows.Forms.DockStyle.Fill Me.Panel9.Name = "Panel9" Me.Panel9.Size = New System.Drawing.Size(558, 216) Me.Panel9.TabIndex = 1 ' 'dtgParGru ' Me.dtgParGru.BackgroundColor = System.Drawing.SystemColors.ActiveCaptionText Me.dtgParGru.DataMember = "" Me.dtgParGru.Dock = System.Windows.Forms.DockStyle.Fill Me.dtgParGru.GridLineColor = System.Drawing.SystemColors.ActiveCaption Me.dtgParGru.HeaderForeColor = System.Drawing.SystemColors.ControlText Me.dtgParGru.Name = "dtgParGru" Me.dtgParGru.ParentRowsBackColor = System.Drawing.Color.LightYellow Me.dtgParGru.ParentRowsForeColor = System.Drawing.SystemColors.ActiveCaption Me.dtgParGru.PreferredColumnWidth = 150 Me.dtgParGru.ReadOnly = True Me.dtgParGru.SelectionBackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(255, Byte), CType(192, Byte)) Me.dtgParGru.SelectionForeColor = System.Drawing.SystemColors.ActiveCaption Me.dtgParGru.Size = New System.Drawing.Size(558, 216) Me.dtgParGru.TabIndex = 2 ' 'pnlCatalgo ' Me.pnlCatalgo.BackColor = System.Drawing.SystemColors.Control Me.pnlCatalgo.Controls.AddRange(New System.Windows.Forms.Control() {Me.RbtnActivo, Me.txtValPar, Me.lblCuaCam, Me.txtExtra, Me.lblGrupos, Me.lblNombre, Me.pnlBotones, Me.cboGruCue, Me.txtGruCue, Me.cboParGru, Me.msdHora, Me.txtValParametro}) Me.pnlCatalgo.Dock = System.Windows.Forms.DockStyle.Top Me.pnlCatalgo.Name = "pnlCatalgo" Me.pnlCatalgo.Size = New System.Drawing.Size(558, 120) Me.pnlCatalgo.TabIndex = 0 ' 'RbtnActivo ' Me.RbtnActivo.AccessibleRole = System.Windows.Forms.AccessibleRole.None Me.RbtnActivo.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, 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(352, 24) Me.RbtnActivo.Name = "RbtnActivo" Me.RbtnActivo.Size = New System.Drawing.Size(64, 24) Me.RbtnActivo.TabIndex = 17 Me.RbtnActivo.Text = "Activo" ' 'txtValPar ' Me.txtValPar.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtValPar.ForeColor = System.Drawing.SystemColors.ControlText Me.txtValPar.Location = New System.Drawing.Point(64, 88) Me.txtValPar.Name = "txtValPar" Me.txtValPar.Size = New System.Drawing.Size(72, 23) Me.txtValPar.TabIndex = 15 Me.txtValPar.Text = "Valor :" Me.txtValPar.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' '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.SystemColors.ActiveCaption 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" ' 'lblGrupos ' Me.lblGrupos.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblGrupos.ForeColor = System.Drawing.Color.Black Me.lblGrupos.Location = New System.Drawing.Point(0, 24) Me.lblGrupos.Name = "lblGrupos" Me.lblGrupos.Size = New System.Drawing.Size(136, 23) Me.lblGrupos.TabIndex = 2 Me.lblGrupos.Text = "Grupos de Cuentas :" Me.lblGrupos.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.SystemColors.ControlText Me.lblNombre.Location = New System.Drawing.Point(64, 56) Me.lblNombre.Name = "lblNombre" Me.lblNombre.Size = New System.Drawing.Size(72, 23) Me.lblNombre.TabIndex = 1 Me.lblNombre.Text = "Parametro :" Me.lblNombre.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'pnlBotones ' Me.pnlBotones.Controls.AddRange(New System.Windows.Forms.Control() {Me.btnAceptar, Me.btnCancelar}) Me.pnlBotones.Location = New System.Drawing.Point(424, 16) 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.Bitmap) 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.Bitmap) 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 ' 'cboGruCue ' Me.cboGruCue.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList Me.cboGruCue.Location = New System.Drawing.Point(144, 24) Me.cboGruCue.Name = "cboGruCue" Me.cboGruCue.Size = New System.Drawing.Size(200, 21) Me.cboGruCue.TabIndex = 1 ' 'txtGruCue ' Me.txtGruCue.BackColor = System.Drawing.SystemColors.HighlightText Me.txtGruCue.Location = New System.Drawing.Point(144, 24) Me.txtGruCue.Name = "txtGruCue" Me.txtGruCue.ReadOnly = True Me.txtGruCue.Size = New System.Drawing.Size(200, 20) Me.txtGruCue.TabIndex = 10 Me.txtGruCue.Text = "Tarjeta de Credito" ' 'cboParGru ' Me.cboParGru.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList Me.cboParGru.ItemHeight = 13 Me.cboParGru.Location = New System.Drawing.Point(144, 56) Me.cboParGru.Name = "cboParGru" Me.cboParGru.Size = New System.Drawing.Size(200, 21) Me.cboParGru.TabIndex = 0 ' 'msdHora ' Me.msdHora.ContainingControl = Me Me.msdHora.Location = New System.Drawing.Point(144, 88) Me.msdHora.Name = "msdHora" Me.msdHora.OcxState = CType(resources.GetObject("msdHora.OcxState"), System.Windows.Forms.AxHost.State) Me.msdHora.Size = New System.Drawing.Size(200, 24) Me.msdHora.TabIndex = 18 Me.msdHora.Visible = False ' 'txtValParametro ' Me.txtValParametro.BackColor = System.Drawing.SystemColors.HighlightText Me.txtValParametro.Location = New System.Drawing.Point(144, 88) Me.txtValParametro.Name = "txtValParametro" Me.txtValParametro.ReadOnly = True Me.txtValParametro.Size = New System.Drawing.Size(200, 20) Me.txtValParametro.TabIndex = 16 Me.txtValParametro.Text = "" ' 'ActualizadorBinario ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(255, Byte), CType(192, Byte)) Me.ClientSize = New System.Drawing.Size(558, 380) Me.ControlBox = False Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Panel1, Me.tlbCatUnuarios}) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D Me.Name = "ActualizadorBinario" Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Tag = "CatUni001" Me.Text = "Actualizador Parametros de Grupo" Me.Panel1.ResumeLayout(False) Me.Panel3.ResumeLayout(False) Me.Panel4.ResumeLayout(False) Me.Panel5.ResumeLayout(False) Me.Panel9.ResumeLayout(False) CType(Me.dtgParGru, System.ComponentModel.ISupportInitialize).EndInit() Me.pnlCatalgo.ResumeLayout(False) Me.pnlBotones.ResumeLayout(False) CType(Me.msdHora, 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 tlbCatUnuarios.ButtonClick DesOperacion = e.Button.Text Select Case e.Button.Text Case "Actualizar" ActualizarValorParametro() Case "Salir" Salir() Me.Close() End Select End Sub Public Function Salir() As Boolean Return Fin = True End Function Private Sub ActualizarValorParametro() Activa = True cboGruCue.Enabled = False cboParGru.Enabled = False txtValParametro.ReadOnly = False Me.msdHora.Enabled = True End Sub Private Sub ActualizadorBinario_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Fin = False Actualizar() Me.msdHora.Visible = False Activa = False End Sub Private Sub Actualizar() cboGruCue.Enabled = True cboParGru.Enabled = True txtValParametro.ReadOnly = True LlenaCombo.LlenaData("Grupo de Cuentas", Me.cboGruCue, Me.dtGrupos) LlenaCombo.LlenaData("Parametros de Rango", Me.cboParGru, Me.dtParametros) LlenaGrid.LlenaData("spcbGriParGrup " & Me.Id_Grupo.ToString, Me.dtgParGru, Me.dtGridParamtros) '1:Catalgo ; 2:Alias AparienciaGrid(dtgParGru) SetSelectedIndex(dtgParGru) End Sub Public Sub Entrar(ByVal NombreCatalgog As String) Me.Text = NombreCatalgog NombreCatalogo = NombreCatalgog End Sub Private Sub AparienciaGrid(ByVal Grid As DataGrid) Dim ts As DataGridTableStyle = New DataGridTableStyle() ts.MappingName = Grid.DataMember Grid.TableStyles.Clear() Grid.TableStyles.Add(ts) Grid.TableStyles(0).GridColumnStyles(0).Width = 0 Grid.TableStyles(0).GridColumnStyles(1).Width = 300 Grid.TableStyles(0).GridColumnStyles(2).Width = 50 Grid.TableStyles(0).GridColumnStyles(3).Width = 0 End Sub Private Sub SetSelectedIndex(ByVal myGrid As DataGrid) Registro(myGrid) End Sub Private Sub gridDoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dtgParGru.DoubleClick Registro(sender) End Sub Private Sub CargarInformacion(ByVal GridOrigen As DataGrid) Try Me.Id_Parametro = Me.dtGridParamtros.Rows(Indice).Item(0) NombreParametro = dtGridParamtros.Rows(Indice).Item(1) Me.Valor = dtGridParamtros.Rows(Indice).Item(2) Activo = dtGridParamtros.Rows(Indice).Item(3) Catch End Try If Activo = True Then Me.RbtnActivo.Checked = True Else Me.RbtnActivo.Checked = False End If Mascara(Valor) cboParGru.SelectedValue = Id_Parametro txtValParametro.Text = Valor End Sub Private Sub Mascara(ByVal Valor As String) Try If NombreParametro.Trim = "ParametroHora" Then msdHora.Visible = True txtValParametro.Visible = False Me.msdHora.ClipMode = MSMask.ClipModeConstants.mskExcludeLiterals msdHora.Text = " " msdHora.SelText = Valor msdHora.Refresh() Else msdHora.Visible = False txtValParametro.Visible = True End If Catch End Try End Sub Private Sub SeleccionGrid(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dtgParGru.CurrentCellChanged 'Evento que se dispara cuando me muevo entre los registos de la tabla Registro(sender) End Sub Private Sub Registro(ByVal Grid As DataGrid) Indice = Grid.CurrentRowIndex CargarInformacion(Grid) End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAceptar.Click If ValidaTexto.ValidaCadenas(txtValParametro) = 0 Then MessageBox.Show("Ingerese datos necesarios") Me.txtValParametro.Focus() Else If NombreParametro.Trim = "ParametroHora" Then Me.msdHora.ClipMode = MSMask.ClipModeConstants.mskExcludeLiterals Valor = msdHora.ClipText Valor = Valor.Substring(0, 2) & ":" & Valor.Substring(2, 2) Else Valor = Me.txtValParametro.Text End If TipoOperacion = 0 Command.spsql = "spcbActValPar " & Me.Id_Grupo.ToString & " , " & Me.Id_Parametro.ToString & " , '" & Me.Valor.ToString & " ' , " & TipoOperacion.ToString Command.Ejecuta(Command.spsql) ActivaCatalogo() LlenaGrid.LlenaData("spcbGriParGrup " & Me.Id_Grupo.ToString, Me.dtgParGru, Me.dtGridParamtros) '1:Catalgo ; 2:Alias AparienciaGrid(dtgParGru) SetSelectedIndex(dtgParGru) End If If Activa = False Then Actualizar() End If End Sub Private Sub cboGruCue_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cboGruCue.SelectedValueChanged Try Me.Id_Grupo = Me.cboGruCue.SelectedValue LlenaGrid.LlenaData("spcbGriParGrup " & Id_Grupo.ToString, Me.dtgParGru, Me.dtGridParamtros) '1:Catalgo ; 2:Alias Registro(dtgParGru) Catch End Try End Sub Private Sub btnCancelar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancelar.Click Actualizar() End Sub Private Sub ActivaCatalogo() Dim Indice, i As Integer Try Indice = Me.dtGridParamtros.Rows.Count For i = 0 To Indice - 1 If dtGridParamtros.Rows(i).Item(2) = " " Then Exit For RbtnActivo.Checked = False Else If i = Indice - 1 Then TipoOperacion = 1 Command.spsql = "spcbActValPar " & Me.Id_Grupo.ToString & " , " & Me.Id_Parametro.ToString & " , '" & Me.Valor.ToString & " ' ," & TipoOperacion.ToString Command.Ejecuta(Command.spsql) Activa = False RbtnActivo.Checked = True End If End If Next Catch e As Exception MessageBox.Show(e.Message) End Try End Sub End Class