Public Class PersonasRelacionadas Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. 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 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer Friend WithEvents ImageList1 As System.Windows.Forms.ImageList Private WithEvents panel2 As Panel Private WithEvents Img_logoCabecera As PictureBox Friend WithEvents desHeader As Label Friend WithEvents Button1 As Button Friend WithEvents BntSalie As Button Friend WithEvents BtnAlta As Button Private WithEvents panel3 As Panel Friend WithEvents Label1 As Label Friend WithEvents lblFooter As Label Friend WithEvents btnVer As Button Friend WithEvents dtgPersonas As C1.Win.C1TrueDBGrid.C1TrueDBGrid Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(PersonasRelacionadas)) Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components) Me.dtgPersonas = New C1.Win.C1TrueDBGrid.C1TrueDBGrid() Me.panel2 = New System.Windows.Forms.Panel() Me.Img_logoCabecera = New System.Windows.Forms.PictureBox() Me.desHeader = New System.Windows.Forms.Label() Me.Button1 = New System.Windows.Forms.Button() Me.BntSalie = New System.Windows.Forms.Button() Me.BtnAlta = New System.Windows.Forms.Button() Me.panel3 = New System.Windows.Forms.Panel() Me.Label1 = New System.Windows.Forms.Label() Me.lblFooter = New System.Windows.Forms.Label() Me.btnVer = New System.Windows.Forms.Button() CType(Me.dtgPersonas, System.ComponentModel.ISupportInitialize).BeginInit() Me.panel2.SuspendLayout() CType(Me.Img_logoCabecera, System.ComponentModel.ISupportInitialize).BeginInit() Me.panel3.SuspendLayout() Me.SuspendLayout() ' '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, "") Me.ImageList1.Images.SetKeyName(8, "") Me.ImageList1.Images.SetKeyName(9, "") ' 'dtgPersonas ' Me.dtgPersonas.GroupByCaption = "AGRUPAR" Me.dtgPersonas.Images.Add(CType(resources.GetObject("dtgPersonas.Images"), System.Drawing.Image)) Me.dtgPersonas.Location = New System.Drawing.Point(12, 55) Me.dtgPersonas.Name = "dtgPersonas" Me.dtgPersonas.PreviewInfo.Location = New System.Drawing.Point(0, 0) Me.dtgPersonas.PreviewInfo.Size = New System.Drawing.Size(0, 0) Me.dtgPersonas.PreviewInfo.ZoomFactor = 75.0R Me.dtgPersonas.PrintInfo.PageSettings = CType(resources.GetObject("dtgPersonas.PrintInfo.PageSettings"), System.Drawing.Printing.PageSettings) Me.dtgPersonas.Size = New System.Drawing.Size(644, 234) Me.dtgPersonas.TabIndex = 42 Me.dtgPersonas.Text = "C1TrueDBGrid1" Me.dtgPersonas.PropBag = resources.GetString("dtgPersonas.PropBag") ' 'panel2 ' Me.panel2.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.panel2.BackColor = System.Drawing.Color.Black Me.panel2.Controls.Add(Me.Img_logoCabecera) Me.panel2.Controls.Add(Me.desHeader) Me.panel2.ForeColor = System.Drawing.Color.Navy Me.panel2.Location = New System.Drawing.Point(-3, -4) Me.panel2.Name = "panel2" Me.panel2.Size = New System.Drawing.Size(805, 50) Me.panel2.TabIndex = 161 ' 'Img_logoCabecera ' Me.Img_logoCabecera.Image = Global.CLIENTE.My.Resources.Resources.blackrock_logo Me.Img_logoCabecera.Location = New System.Drawing.Point(681, 3) Me.Img_logoCabecera.Name = "Img_logoCabecera" Me.Img_logoCabecera.Size = New System.Drawing.Size(117, 50) Me.Img_logoCabecera.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage Me.Img_logoCabecera.TabIndex = 360 Me.Img_logoCabecera.TabStop = False ' 'desHeader ' Me.desHeader.AutoSize = True Me.desHeader.BackColor = System.Drawing.Color.Transparent Me.desHeader.Font = New System.Drawing.Font("Century Gothic", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.desHeader.ForeColor = System.Drawing.SystemColors.Window Me.desHeader.Location = New System.Drawing.Point(21, 8) Me.desHeader.Name = "desHeader" Me.desHeader.Size = New System.Drawing.Size(70, 22) Me.desHeader.TabIndex = 2 Me.desHeader.Text = "Perfiles" ' 'Button1 ' Me.Button1.BackColor = System.Drawing.Color.Black Me.Button1.Cursor = System.Windows.Forms.Cursors.Hand Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.White Me.Button1.Location = New System.Drawing.Point(678, 94) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(106, 33) Me.Button1.TabIndex = 164 Me.Button1.Text = "Eliminar" Me.Button1.UseVisualStyleBackColor = False ' 'BntSalie ' Me.BntSalie.BackColor = System.Drawing.Color.Black Me.BntSalie.Cursor = System.Windows.Forms.Cursors.Hand Me.BntSalie.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BntSalie.ForeColor = System.Drawing.Color.White Me.BntSalie.Location = New System.Drawing.Point(678, 256) Me.BntSalie.Name = "BntSalie" Me.BntSalie.Size = New System.Drawing.Size(106, 33) Me.BntSalie.TabIndex = 163 Me.BntSalie.Text = "Cerrar" Me.BntSalie.UseVisualStyleBackColor = False ' 'BtnAlta ' Me.BtnAlta.BackColor = System.Drawing.Color.Black Me.BtnAlta.Cursor = System.Windows.Forms.Cursors.Hand Me.BtnAlta.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BtnAlta.ForeColor = System.Drawing.Color.White Me.BtnAlta.Location = New System.Drawing.Point(678, 55) Me.BtnAlta.Name = "BtnAlta" Me.BtnAlta.Size = New System.Drawing.Size(106, 33) Me.BtnAlta.TabIndex = 162 Me.BtnAlta.Text = "Nuevo" Me.BtnAlta.UseVisualStyleBackColor = False ' 'panel3 ' Me.panel3.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.panel3.BackColor = System.Drawing.Color.Black Me.panel3.Controls.Add(Me.Label1) Me.panel3.Controls.Add(Me.lblFooter) Me.panel3.ForeColor = System.Drawing.Color.Navy Me.panel3.Location = New System.Drawing.Point(-3, 355) Me.panel3.Name = "panel3" Me.panel3.Size = New System.Drawing.Size(805, 33) Me.panel3.TabIndex = 362 ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.BackColor = System.Drawing.Color.Transparent Me.Label1.Font = New System.Drawing.Font("Century Gothic", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.SystemColors.Window Me.Label1.Location = New System.Drawing.Point(745, 5) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(42, 17) Me.Label1.TabIndex = 3 Me.Label1.Text = "Minds" ' 'lblFooter ' Me.lblFooter.AutoSize = True Me.lblFooter.BackColor = System.Drawing.Color.Transparent Me.lblFooter.Font = New System.Drawing.Font("Century Gothic", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblFooter.ForeColor = System.Drawing.SystemColors.Window Me.lblFooter.Location = New System.Drawing.Point(1019, 7) Me.lblFooter.Name = "lblFooter" Me.lblFooter.Size = New System.Drawing.Size(42, 17) Me.lblFooter.TabIndex = 2 Me.lblFooter.Text = "Minds" ' 'btnVer ' Me.btnVer.BackColor = System.Drawing.Color.Black Me.btnVer.Cursor = System.Windows.Forms.Cursors.Hand Me.btnVer.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btnVer.ForeColor = System.Drawing.Color.White Me.btnVer.Location = New System.Drawing.Point(678, 133) Me.btnVer.Name = "btnVer" Me.btnVer.Size = New System.Drawing.Size(106, 33) Me.btnVer.TabIndex = 363 Me.btnVer.Text = "Ver" Me.btnVer.UseVisualStyleBackColor = False ' 'PersonasRelacionadas ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.White Me.ClientSize = New System.Drawing.Size(796, 385) Me.Controls.Add(Me.btnVer) Me.Controls.Add(Me.panel3) Me.Controls.Add(Me.Button1) Me.Controls.Add(Me.BntSalie) Me.Controls.Add(Me.BtnAlta) Me.Controls.Add(Me.panel2) Me.Controls.Add(Me.dtgPersonas) Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.MaximizeBox = False Me.Name = "PersonasRelacionadas" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Personas Relacionadas" CType(Me.dtgPersonas, System.ComponentModel.ISupportInitialize).EndInit() Me.panel2.ResumeLayout(False) Me.panel2.PerformLayout() CType(Me.Img_logoCabecera, System.ComponentModel.ISupportInitialize).EndInit() Me.panel3.ResumeLayout(False) Me.panel3.PerformLayout() Me.ResumeLayout(False) End Sub #End Region Public IdTipoalarma As String 'Private Sub tlbOperatividadBaja_ButtonClick(sender As System.Object, e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles tlbOperatividadBaja.ButtonClick ' Select Case e.Button.Text ' Case "Nuevo" ' Dim frmDetalles As PersonasRelacionadasDet = New PersonasRelacionadasDet ' frmDetalles.ModoNuevo = True ' frmDetalles.IdPatron = clsVaribles.Id_Patron ' frmDetalles.IdTransaccion = clsVaribles.Id_Transaccion ' frmDetalles.IdProducto = clsVaribles.Id_Producto ' frmDetalles.IdTipoAlarma = IdTipoalarma 'inusuales o preocupantes ' frmDetalles.ShowDialog() ' CargaGrid() ' Case "Salir" ' Me.Close() ' Case "Eliminar" ' If dtgPersonas.SelectedRows.Count = 1 Then ' Dim clCmp As clsComplejo = New clsComplejo ' Dim CadDelete As String = "DELETE PersonasRelacionadas WHERE IdElemento =" & dtgPersonas.Columns("IdElemento").Text ' clCmp.sbGuardaModifica(CadDelete) ' CargaGrid() ' End If ' End Select 'End Sub Private Sub PersonasRelacionadas_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load 'If clsVaribles.Id_EstatusTransaccion = 3 Or clsVaribles.Id_EstatusTransaccion = 4 Or clsVaribles.Id_EstatusTransaccion = 5 Then ' 'tlbOperatividadBaja.Buttons(0).Enabled = False ' 'tlbOperatividadBaja.Buttons(1).Enabled = False 'Else ' 'tlbOperatividadBaja.Buttons(0).Enabled = True ' 'tlbOperatividadBaja.Buttons(1).Enabled = True 'End If CargaGrid() desHeader.Text = Me.Text End Sub Private Sub CargaGrid() Dim clCmp As clsComplejo = New clsComplejo Dim CadSelect As String = "Select PR.*, INS.RAZONSOCIAL Institucion from PersonasRelacionadas PR inner join cat_CASFIM_ext INS on PR.claveCNBVInstitucion = INS.clave WHERE PR.IdTransaccion =" & clsVaribles.Id_Transaccion & " and IdPatron = " & clsVaribles.Id_Patron & " and IdProducto = " & clsVaribles.Id_Producto & " and IdTipoAlarma = " & IdTipoalarma & " order by IdElemento asc" clCmp.fdtDataSet(CadSelect) Me.dtgPersonas.SetDataBinding(clCmp.ds, "Table") End Sub Dim _NoCuenta As String Dim _ClaveInstitucion As String Dim _Nombre As String Dim _Apaterno As String Dim _Amaterno As String Dim _IdElemento As String Private Sub dtgPersonas_DoubleClick(sender As System.Object, e As System.EventArgs) Handles dtgPersonas.DoubleClick ' Dim frmDetalles As PersonasRelacionadasDet = New PersonasRelacionadasDet If dtgPersonas.RowCount = 0 Then MessageBox.Show("No existen registros en el grid", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information) Exit Sub End If 'frmDetalles.ModoNuevo = False 'frmDetalles.IdPatron = clsVaribles.Id_Patron 'frmDetalles.IdTransaccion = clsVaribles.Id_Transaccion 'frmDetalles.IdProducto = clsVaribles.Id_Producto 'frmDetalles.IdTipoAlarma = IdTipoalarma 'inusuales o preocupantes _NoCuenta = dtgPersonas.Columns("NoCuenta").Text _ClaveInstitucion = dtgPersonas.Columns("ClaveCNBVInstitucion").Text _Nombre = dtgPersonas.Columns("Nombre").Text _Apaterno = dtgPersonas.Columns("APaterno").Text _Amaterno = dtgPersonas.Columns("AMaterno").Text _IdElemento = dtgPersonas.Columns("IdElemento").Text 'Dim frmDetalles As PersonasRelacionadasDet = New PersonasRelacionadasDet 'frmDetalles.ShowDialog() 'CargaGrid() End Sub Private Sub BtnAlta_Click(sender As Object, e As EventArgs) Handles BtnAlta.Click Dim frmDetalles As PersonasRelacionadasDet = New PersonasRelacionadasDet frmDetalles.ModoNuevo = True frmDetalles.IdPatron = clsVaribles.Id_Patron frmDetalles.IdTransaccion = clsVaribles.Id_Transaccion frmDetalles.IdProducto = clsVaribles.Id_Producto frmDetalles.IdTipoAlarma = IdTipoalarma 'inusuales o preocupantes frmDetalles.ShowDialog() CargaGrid() End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim result1 As DialogResult = MessageBox.Show("Estas seguro(a) que deseas eliminar a la persona relacionada " & _Nombre & " " & _Apaterno & " " & _Amaterno & " ", "Minds", MessageBoxButtons.YesNo) Dim clCmp As clsComplejo = New clsComplejo Dim CadDelete As String = "DELETE PersonasRelacionadas WHERE IdElemento =" & _IdElemento clCmp.sbGuardaModifica(CadDelete) CargaGrid() End Sub Private Sub BntSalie_Click(sender As Object, e As EventArgs) Handles BntSalie.Click Me.Close() End Sub Private Sub btnVer_Click(sender As Object, e As EventArgs) Handles btnVer.Click Dim frmDetalles As PersonasRelacionadasDet = New PersonasRelacionadasDet frmDetalles.ModoNuevo = False frmDetalles.IdPatron = clsVaribles.Id_Patron frmDetalles.IdTransaccion = clsVaribles.Id_Transaccion frmDetalles.IdProducto = clsVaribles.Id_Producto frmDetalles.IdTipoAlarma = IdTipoalarma 'inusuales o preocupantes frmDetalles.txtNoCuenta.Text = _NoCuenta frmDetalles.ClaveInstitucion = _ClaveInstitucion frmDetalles.txtNombre.Text = _Nombre frmDetalles.txtApaterno.Text = _Apaterno frmDetalles.txtAmaterno.Text = _Amaterno frmDetalles.IdElemento = _IdElemento frmDetalles.ShowDialog() CargaGrid() End Sub End Class