client/Reportes/Detalles.vb

920 lines
41 KiB
VB.net
Raw Normal View History

'Imports Microsoft.VisualBasic.Compatibility
Imports System.Data.SqlClient
Imports CLIENTE.SenteciasSQL
Public Class Detalles
Inherits System.Windows.Forms.Form
#Region " C<>digo generado por el Dise<73>ador de Windows Forms "
Public Sub New()
MyBase.New()
'El Dise<73>ador de Windows Forms requiere esta llamada.
InitializeComponent()
'Agregar cualquier inicializaci<63>n despu<70>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<73>ador de Windows Forms
Private components As System.ComponentModel.IContainer
'NOTA: el Dise<73>ador de Windows Forms requiere el siguiente procedimiento
'Puede modificarse utilizando el Dise<73>ador de Windows Forms.
'No lo modifique con el editor de c<>digo.
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents ImageList1 As System.Windows.Forms.ImageList
Friend WithEvents txtReportadoPor As System.Windows.Forms.TextBox
Friend WithEvents txtNombre As System.Windows.Forms.TextBox
Friend WithEvents txtNo_Referencia As System.Windows.Forms.TextBox
Friend WithEvents cmbEstatus As System.Windows.Forms.ComboBox
Friend WithEvents lblRazon As System.Windows.Forms.Label
Friend WithEvents chkListRazon As System.Windows.Forms.CheckedListBox
Friend WithEvents txtDescripcion As System.Windows.Forms.TextBox
Friend WithEvents DataGrid1 As System.Windows.Forms.DataGrid
Friend WithEvents BtnSal As System.Windows.Forms.Button
Friend WithEvents BtnGuardar As System.Windows.Forms.Button
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents btnAgregarEvidencia As System.Windows.Forms.Button
Friend WithEvents btnVerEvidencia As System.Windows.Forms.Button
Friend WithEvents btnAlarma24h As System.Windows.Forms.Button
Friend WithEvents chk24H As System.Windows.Forms.CheckBox
Friend WithEvents btnPersonasRelacionadas As System.Windows.Forms.Button
Private WithEvents panel2 As Panel
Private WithEvents Img_logoCabecera As PictureBox
Friend WithEvents desHeader As Label
Private WithEvents panel3 As Panel
Friend WithEvents Label6 As Label
Friend WithEvents lblFooter As Label
Friend WithEvents txtRazon As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Detalles))
Me.Label1 = New System.Windows.Forms.Label()
Me.Label3 = New System.Windows.Forms.Label()
Me.Label4 = New System.Windows.Forms.Label()
Me.Label5 = New System.Windows.Forms.Label()
Me.txtReportadoPor = New System.Windows.Forms.TextBox()
Me.txtNombre = New System.Windows.Forms.TextBox()
Me.txtDescripcion = New System.Windows.Forms.TextBox()
Me.txtNo_Referencia = New System.Windows.Forms.TextBox()
Me.cmbEstatus = New System.Windows.Forms.ComboBox()
Me.Label2 = New System.Windows.Forms.Label()
Me.lblRazon = New System.Windows.Forms.Label()
Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
Me.chkListRazon = New System.Windows.Forms.CheckedListBox()
Me.DataGrid1 = New System.Windows.Forms.DataGrid()
Me.txtRazon = New System.Windows.Forms.TextBox()
Me.BtnSal = New System.Windows.Forms.Button()
Me.BtnGuardar = New System.Windows.Forms.Button()
Me.Button1 = New System.Windows.Forms.Button()
Me.btnAgregarEvidencia = New System.Windows.Forms.Button()
Me.btnVerEvidencia = New System.Windows.Forms.Button()
Me.btnAlarma24h = New System.Windows.Forms.Button()
Me.chk24H = New System.Windows.Forms.CheckBox()
Me.btnPersonasRelacionadas = New System.Windows.Forms.Button()
Me.panel2 = New System.Windows.Forms.Panel()
Me.Img_logoCabecera = New System.Windows.Forms.PictureBox()
Me.desHeader = New System.Windows.Forms.Label()
Me.panel3 = New System.Windows.Forms.Panel()
Me.Label6 = New System.Windows.Forms.Label()
Me.lblFooter = New System.Windows.Forms.Label()
CType(Me.DataGrid1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.panel2.SuspendLayout()
CType(Me.Img_logoCabecera, System.ComponentModel.ISupportInitialize).BeginInit()
Me.panel3.SuspendLayout()
Me.SuspendLayout()
'
'Label1
'
Me.Label1.ForeColor = System.Drawing.Color.MidnightBlue
Me.Label1.Location = New System.Drawing.Point(19, 59)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(80, 16)
Me.Label1.TabIndex = 0
Me.Label1.Text = "Reportado por:"
'
'Label3
'
Me.Label3.ForeColor = System.Drawing.Color.MidnightBlue
Me.Label3.Location = New System.Drawing.Point(19, 143)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(46, 16)
Me.Label3.TabIndex = 2
Me.Label3.Text = "Estatus:"
'
'Label4
'
Me.Label4.ForeColor = System.Drawing.Color.MidnightBlue
Me.Label4.Location = New System.Drawing.Point(19, 115)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(84, 16)
Me.Label4.TabIndex = 3
Me.Label4.Text = "No. Referencia:"
'
'Label5
'
Me.Label5.ForeColor = System.Drawing.Color.MidnightBlue
Me.Label5.Location = New System.Drawing.Point(19, 87)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(48, 16)
Me.Label5.TabIndex = 4
Me.Label5.Text = "Nombre:"
'
'txtReportadoPor
'
Me.txtReportadoPor.Location = New System.Drawing.Point(105, 55)
Me.txtReportadoPor.Name = "txtReportadoPor"
Me.txtReportadoPor.Size = New System.Drawing.Size(366, 20)
Me.txtReportadoPor.TabIndex = 5
Me.txtReportadoPor.Text = "TextBox1"
'
'txtNombre
'
Me.txtNombre.Location = New System.Drawing.Point(105, 85)
Me.txtNombre.Name = "txtNombre"
Me.txtNombre.Size = New System.Drawing.Size(366, 20)
Me.txtNombre.TabIndex = 6
Me.txtNombre.Text = "TextBox2"
'
'txtDescripcion
'
Me.txtDescripcion.Location = New System.Drawing.Point(11, 187)
Me.txtDescripcion.MaxLength = 4000
Me.txtDescripcion.Multiline = True
Me.txtDescripcion.Name = "txtDescripcion"
Me.txtDescripcion.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
Me.txtDescripcion.Size = New System.Drawing.Size(460, 63)
Me.txtDescripcion.TabIndex = 9
'
'txtNo_Referencia
'
Me.txtNo_Referencia.Location = New System.Drawing.Point(105, 113)
Me.txtNo_Referencia.Name = "txtNo_Referencia"
Me.txtNo_Referencia.Size = New System.Drawing.Size(366, 20)
Me.txtNo_Referencia.TabIndex = 10
Me.txtNo_Referencia.Text = "TextBox6"
'
'cmbEstatus
'
Me.cmbEstatus.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbEstatus.Location = New System.Drawing.Point(105, 141)
Me.cmbEstatus.Name = "cmbEstatus"
Me.cmbEstatus.Size = New System.Drawing.Size(174, 21)
Me.cmbEstatus.TabIndex = 11
'
'Label2
'
Me.Label2.BackColor = System.Drawing.Color.Transparent
Me.Label2.ForeColor = System.Drawing.Color.MidnightBlue
Me.Label2.Location = New System.Drawing.Point(19, 168)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(70, 16)
Me.Label2.TabIndex = 1
Me.Label2.Text = "Descripci<EFBFBD>n:"
'
'lblRazon
'
Me.lblRazon.BackColor = System.Drawing.Color.Transparent
Me.lblRazon.ForeColor = System.Drawing.Color.MidnightBlue
Me.lblRazon.Location = New System.Drawing.Point(19, 253)
Me.lblRazon.Name = "lblRazon"
Me.lblRazon.Size = New System.Drawing.Size(40, 16)
Me.lblRazon.TabIndex = 13
Me.lblRazon.Text = "Raz<EFBFBD>n:"
'
'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, "")
'
'chkListRazon
'
Me.chkListRazon.CheckOnClick = True
Me.chkListRazon.Location = New System.Drawing.Point(11, 283)
Me.chkListRazon.Name = "chkListRazon"
Me.chkListRazon.Size = New System.Drawing.Size(449, 64)
Me.chkListRazon.TabIndex = 15
'
'DataGrid1
'
Me.DataGrid1.BackColor = System.Drawing.Color.Black
Me.DataGrid1.BackgroundColor = System.Drawing.Color.White
Me.DataGrid1.DataMember = ""
Me.DataGrid1.ForeColor = System.Drawing.Color.White
Me.DataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText
Me.DataGrid1.Location = New System.Drawing.Point(131, 407)
Me.DataGrid1.Name = "DataGrid1"
Me.DataGrid1.Size = New System.Drawing.Size(50, 40)
Me.DataGrid1.TabIndex = 16
'
'txtRazon
'
Me.txtRazon.Location = New System.Drawing.Point(11, 272)
Me.txtRazon.MaxLength = 1500
Me.txtRazon.Multiline = True
Me.txtRazon.Name = "txtRazon"
Me.txtRazon.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
Me.txtRazon.Size = New System.Drawing.Size(460, 113)
Me.txtRazon.TabIndex = 17
'
'BtnSal
'
Me.BtnSal.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.BtnSal.BackColor = System.Drawing.Color.Black
Me.BtnSal.Cursor = System.Windows.Forms.Cursors.Hand
Me.BtnSal.ForeColor = System.Drawing.Color.White
Me.BtnSal.Location = New System.Drawing.Point(17, 407)
Me.BtnSal.Name = "BtnSal"
Me.BtnSal.Size = New System.Drawing.Size(108, 33)
Me.BtnSal.TabIndex = 153
Me.BtnSal.Text = "&Cerrar"
Me.BtnSal.UseVisualStyleBackColor = False
Me.BtnSal.Visible = False
'
'BtnGuardar
'
Me.BtnGuardar.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.BtnGuardar.BackColor = System.Drawing.Color.Black
Me.BtnGuardar.Cursor = System.Windows.Forms.Cursors.Hand
Me.BtnGuardar.ForeColor = System.Drawing.Color.White
Me.BtnGuardar.Location = New System.Drawing.Point(487, 316)
Me.BtnGuardar.Name = "BtnGuardar"
Me.BtnGuardar.Size = New System.Drawing.Size(108, 33)
Me.BtnGuardar.TabIndex = 152
Me.BtnGuardar.Text = "&Guardar"
Me.BtnGuardar.UseVisualStyleBackColor = False
'
'Button1
'
Me.Button1.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Button1.BackColor = System.Drawing.Color.Black
Me.Button1.Cursor = System.Windows.Forms.Cursors.Hand
Me.Button1.ForeColor = System.Drawing.Color.White
Me.Button1.Location = New System.Drawing.Point(487, 355)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(108, 33)
Me.Button1.TabIndex = 154
Me.Button1.Text = "&Cerrar"
Me.Button1.UseVisualStyleBackColor = False
'
'btnAgregarEvidencia
'
Me.btnAgregarEvidencia.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.btnAgregarEvidencia.BackColor = System.Drawing.Color.Black
Me.btnAgregarEvidencia.Cursor = System.Windows.Forms.Cursors.Hand
Me.btnAgregarEvidencia.ForeColor = System.Drawing.Color.White
Me.btnAgregarEvidencia.Location = New System.Drawing.Point(487, 100)
Me.btnAgregarEvidencia.Name = "btnAgregarEvidencia"
Me.btnAgregarEvidencia.Size = New System.Drawing.Size(108, 33)
Me.btnAgregarEvidencia.TabIndex = 160
Me.btnAgregarEvidencia.Text = "Agregar &Evidencia"
Me.btnAgregarEvidencia.UseVisualStyleBackColor = False
'
'btnVerEvidencia
'
Me.btnVerEvidencia.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.btnVerEvidencia.BackColor = System.Drawing.Color.Black
Me.btnVerEvidencia.Cursor = System.Windows.Forms.Cursors.Hand
Me.btnVerEvidencia.ForeColor = System.Drawing.Color.White
Me.btnVerEvidencia.Location = New System.Drawing.Point(487, 141)
Me.btnVerEvidencia.Name = "btnVerEvidencia"
Me.btnVerEvidencia.Size = New System.Drawing.Size(108, 33)
Me.btnVerEvidencia.TabIndex = 161
Me.btnVerEvidencia.Text = "&Ver Evidencia"
Me.btnVerEvidencia.UseVisualStyleBackColor = False
'
'btnAlarma24h
'
Me.btnAlarma24h.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.btnAlarma24h.BackColor = System.Drawing.Color.Black
Me.btnAlarma24h.Cursor = System.Windows.Forms.Cursors.Hand
Me.btnAlarma24h.ForeColor = System.Drawing.Color.White
Me.btnAlarma24h.Location = New System.Drawing.Point(197, 407)
Me.btnAlarma24h.Name = "btnAlarma24h"
Me.btnAlarma24h.Size = New System.Drawing.Size(108, 33)
Me.btnAlarma24h.TabIndex = 162
Me.btnAlarma24h.Text = "&Alarma 24 Horas"
Me.btnAlarma24h.UseVisualStyleBackColor = False
Me.btnAlarma24h.Visible = False
'
'chk24H
'
Me.chk24H.AutoSize = True
Me.chk24H.ForeColor = System.Drawing.Color.MidnightBlue
Me.chk24H.Location = New System.Drawing.Point(307, 145)
Me.chk24H.Name = "chk24H"
Me.chk24H.Size = New System.Drawing.Size(102, 17)
Me.chk24H.TabIndex = 163
Me.chk24H.Text = "Alarma 24 horas"
Me.chk24H.UseVisualStyleBackColor = True
'
'btnPersonasRelacionadas
'
Me.btnPersonasRelacionadas.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.btnPersonasRelacionadas.BackColor = System.Drawing.Color.Black
Me.btnPersonasRelacionadas.Cursor = System.Windows.Forms.Cursors.Hand
Me.btnPersonasRelacionadas.ForeColor = System.Drawing.Color.White
Me.btnPersonasRelacionadas.Location = New System.Drawing.Point(487, 55)
Me.btnPersonasRelacionadas.Name = "btnPersonasRelacionadas"
Me.btnPersonasRelacionadas.Size = New System.Drawing.Size(108, 39)
Me.btnPersonasRelacionadas.TabIndex = 164
Me.btnPersonasRelacionadas.Text = "Personas Relacionadas"
Me.btnPersonasRelacionadas.UseVisualStyleBackColor = False
'
'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(-8, -3)
Me.panel2.Name = "panel2"
Me.panel2.Size = New System.Drawing.Size(627, 41)
Me.panel2.TabIndex = 165
'
'Img_logoCabecera
'
Me.Img_logoCabecera.Image = Global.CLIENTE.My.Resources.Resources.blackrock_logo
Me.Img_logoCabecera.Location = New System.Drawing.Point(495, -9)
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"
'
'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.Label6)
Me.panel3.Controls.Add(Me.lblFooter)
Me.panel3.ForeColor = System.Drawing.Color.Navy
Me.panel3.Location = New System.Drawing.Point(-1, 446)
Me.panel3.Name = "panel3"
Me.panel3.Size = New System.Drawing.Size(608, 33)
Me.panel3.TabIndex = 362
'
'Label6
'
Me.Label6.AutoSize = True
Me.Label6.BackColor = System.Drawing.Color.Transparent
Me.Label6.Font = New System.Drawing.Font("Century Gothic", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label6.ForeColor = System.Drawing.SystemColors.Window
Me.Label6.Location = New System.Drawing.Point(549, 5)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(42, 17)
Me.Label6.TabIndex = 3
Me.Label6.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"
'
'Detalles
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.BackColor = System.Drawing.Color.White
Me.ClientSize = New System.Drawing.Size(607, 470)
Me.Controls.Add(Me.panel3)
Me.Controls.Add(Me.panel2)
Me.Controls.Add(Me.btnPersonasRelacionadas)
Me.Controls.Add(Me.chk24H)
Me.Controls.Add(Me.btnAlarma24h)
Me.Controls.Add(Me.btnVerEvidencia)
Me.Controls.Add(Me.btnAgregarEvidencia)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.BtnSal)
Me.Controls.Add(Me.BtnGuardar)
Me.Controls.Add(Me.txtRazon)
Me.Controls.Add(Me.DataGrid1)
Me.Controls.Add(Me.chkListRazon)
Me.Controls.Add(Me.lblRazon)
Me.Controls.Add(Me.cmbEstatus)
Me.Controls.Add(Me.txtNo_Referencia)
Me.Controls.Add(Me.txtDescripcion)
Me.Controls.Add(Me.txtNombre)
Me.Controls.Add(Me.txtReportadoPor)
Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Label1)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.MaximizeBox = False
Me.Name = "Detalles"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
CType(Me.DataGrid1, 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)
Me.PerformLayout()
End Sub
#End Region
Dim frmReporteDivisas As InusualesDivisas = New InusualesDivisas
Dim clCmp As clsComplejo = New clsComplejo
Dim clCmp1 As clsComplejo = New clsComplejo
Dim clCmpCombo As clsComplejo = New clsComplejo
Dim clCmpGrid As clsComplejo = New clsComplejo
Dim clsVAr As clsVaribles = New clsVaribles
Public fecha24 As String
Public IdTipoAlarma As String
Dim i As Integer
Dim statusT, CadSQL As String
Private Sub DetalleDivisas_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.chkListRazon.Visible = False
Me.DataGrid1.Visible = False
Try
'si el estatus de transacion es = a 4 (cerrado) se muestran los controles deshabilitados
'Tambien las transacciones en estatus 5 (Enviado) se deshabilitan los controles.
If (clsVaribles.Id_EstatusTransaccion = 4) Or (clsVaribles.Id_EstatusTransaccion = 5) Then ' 4 es cerrado 'HRS
Me.txtNo_Referencia.Enabled = False
Me.txtNombre.Enabled = False
Me.txtReportadoPor.Enabled = False
Me.cmbEstatus.Enabled = False
Me.chkListRazon.Visible = True
clCmpCombo.sbLlenaCombo("SELECT IDESTATUSALARMA AS clave, ESTATUSALARMA AS nombre FROM CAT_ESTATUSALARMA", Me.cmbEstatus)
Me.cmbEstatus.Text = "CERRADO"
Me.BtnGuardar.Enabled = False
btnVerEvidencia.Enabled = False
btnAgregarEvidencia.Enabled = False
btnAlarma24h.Enabled = False
Me.txtDescripcion.Enabled = False
Me.txtRazon.Enabled = False
Me.chkListRazon.Visible = True
Me.chkListRazon.Enabled = False
btnPersonasRelacionadas.Enabled = False
chk24H.Enabled = False
'Llamo funcion para llenar la lista que contiene datos
'De la tabla de tesoreria para recuperar el campo de nota y
'de la tabla TransaccionRazon para recuperar las razones por las q se cerro
CargaDatos()
Else
'Recupera el nombre para asiganarlo a combo estatus
'CadSQL = "SELECT * FROM Cat_EstatusTransaccion WHERE IdEstatusTransaccion = " & clsVaribles.Id_EstatusTransaccion 'HRS
CadSQL = "SELECT * FROM CAT_ESTATUSALARMA WHERE IDESTATUSALARMA = " & clsVaribles.Id_EstatusTransaccion 'HRS
clCmp.fdtDataSetTabla(CadSQL)
Dim fila As DataRow
fila = clCmp.ds.Tables(0).Rows(0)
statusT = fila("ESTATUSALARMA")
'LLENO COMBO de estatus de transaccion
'clCmpCombo.sbLlenaCombo("SELECT IdEstatusTransaccion AS clave, EstatusTransaccion AS nombre FROM Cat_EstatusTransaccion", Me.cmbEstatus)
clCmpCombo.sbLlenaCombo("SELECT IDESTATUSALARMA AS clave, ESTATUSALARMA AS nombre FROM CAT_ESTATUSALARMA", Me.cmbEstatus)
Me.cmbEstatus.Text = statusT 'Sea asigna el valor q trae antes
Dim ClassHomologacion As New SenteciasSQL.ClassSQL
Dim SQLScript As String
SQLScript = "SELECT isnull(nota,'') Descr, isnull(razon,'') Razon, isnull(b24H,0) '24h'"
SQLScript = SQLScript & " FROM TransaccionReporte WHERE idtransaccion = " & clsVaribles.Id_Transaccion & " "
SQLScript = SQLScript & " AND idPatron = " & clsVaribles.Id_Patron & " "
SQLScript = SQLScript & " AND idproducto = " & clsVaribles.Id_Producto & " "
'SQLScript = SQLScript & "AND idsubproducto = " & clsVaribles.Id_SubProducto & " "
ClassHomologacion = New SenteciasSQL.ClassSQL
ClassHomologacion.fdtDataSet(SQLScript)
If ClassHomologacion.ds.Tables(0).Rows.Count <> 0 Then
Me.txtDescripcion.Text = ClassHomologacion.ds.Tables(0).Rows(0).Item("Descr")
Me.txtRazon.Text = ClassHomologacion.ds.Tables(0).Rows(0).Item("Razon")
Me.chk24H.Checked = ClassHomologacion.ds.Tables(0).Rows(0).Item("24h")
End If
ClassHomologacion = Nothing
End If
Me.cmbEstatus.SelectedValue = clsVaribles.Id_EstatusTransaccion
'Se asignan valores a los controles
Me.txtNo_Referencia.Text = clsVaribles.No_Referencia 'HRS 3 lineas
Me.txtNombre.Text = clsVaribles.Nombre
Me.txtReportadoPor.Text = clsVaribles.ReportadoPor
Catch er As Exception
MessageBox.Show("Reportes; DetalleDivisas_Load:" & er.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
desHeader.Text = Me.Text
If btnPersonasRelacionadas.Enabled = False Then
btnPersonasRelacionadas.BackColor = Color.DarkGray
Else
btnPersonasRelacionadas.BackColor = Color.Black
End If
If btnAgregarEvidencia.Enabled = False Then
btnAgregarEvidencia.BackColor = Color.DarkGray
Else
btnAgregarEvidencia.BackColor = Color.Black
End If
If btnVerEvidencia.Enabled = False Then
btnVerEvidencia.BackColor = Color.DarkGray
Else
btnVerEvidencia.BackColor = Color.Black
End If
If BtnGuardar.Enabled = False Then
BtnGuardar.BackColor = Color.DarkGray
Else
BtnGuardar.BackColor = Color.Black
End If
If Me.cmbEstatus.SelectedValue < 4 Then
txtReportadoPor.Enabled = False
txtNombre.Enabled = False
txtNo_Referencia.Enabled = False
End If
End Sub ' Fin carga form+
Public Function IsRelevante() As Boolean
Try
txtReportadoPor.Enabled = False
txtNombre.Enabled = False
txtNo_Referencia.Enabled = False
cmbEstatus.Enabled = False
txtDescripcion.Enabled = False
txtRazon.Enabled = False
btnAlarma24h.Enabled = False
BtnGuardar.Enabled = False
chk24H.Enabled = False
btnPersonasRelacionadas.Enabled = False
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Function
Private Sub CargaDatos()
'-- estas lineas se comentan pues para el caso de AGROFINANZAS no se usa
'-- esta tabla TransaccionRazon, para las razones predefinidas
'-- c.clain 22/Nov/2011
'' ''Try
'' '' DataGrid1.Location = New System.Drawing.Point(6, 206)
'' '' DataGrid1.Size = New System.Drawing.Size(792, 274)
'' '' Me.DataGrid1.Visible = True
'' '' 'Carga datos TransaccionRazon,Razon, para mostrarlos en el grid
'' '' Dim cadSQL As String
'' '' cadSQL = "SELECT TR.IdRazon as ID, R.Razon FROM " & _
'' '' " TransaccionRazon TR, Razon R WHERE TR.IdTransaccion = " & _
'' '' clsVaribles.Id_Transaccion & " AND TR.IdProducto = " & _
'' '' clsVaribles.Id_Producto & " AND TR.IdPatron = " & _
'' '' clsVaribles.Id_Patron & " AND TR.IdRazon = R.IdRazon "
'' '' clCmpGrid.sbLlenaDataGrid(cadSQL, Me.DataGrid1)
'' ''Catch er As Exception
'' '' MessageBox.Show(er.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
'' ''End Try
Try
'Carga el valor del campo NOTA
Dim SQLcad As String
SQLcad = "SELECT isnull(Nota,'') nota , isnull(Razon,'') razon, isnull(b24h,0) hours FROM " & _
" TransaccionReporte TR WHERE TR.IdTransaccion = " & _
clsVaribles.Id_Transaccion & " AND TR.IdProducto = " & _
clsVaribles.Id_Producto & " AND TR.IdPatron = " & _
clsVaribles.Id_Patron
clCmp.fdtDataSet(SQLcad)
Dim fila As DataRow
fila = clCmp.ds.Tables(0).Rows(0)
Me.txtDescripcion.Text = fila("Nota")
Me.txtRazon.Text = fila("Razon")
chk24H.Checked = fila("hours")
Dim strTabla As String = ""
Dim fila1 As DataRow
Select Case clsVaribles.Id_Producto
Case 1
strTabla = "BANCATRADICIONAL"
Case 2
strTabla = "MERCADODEDINERO"
Case 5
strTabla = "TESORERIA"
Case 6
strTabla = "DERIVADOS"
End Select
'-- se comentan estas lineas pues el producto es credito, y aun revisando la tabla de c redito,
'-- en ella no viene el dato de la razon, lo trae transaccion reporte
'-- c.clain 22/Nov/2011
''SQLcad = "SELECT REPLACE(REPLACE(Razon, CHAR(13), ''), CHAR(10), '') AS Razon FROM " & strTabla & " WHERE IdTransaccion = " & _
''clsVaribles.Id_Transaccion & " "
''clCmp1.fdtDataSet(SQLcad)
''fila1 = clCmp1.ds.Tables(0).Rows(0)
''Me.txtRazon.Text = fila1(0) & ""
Catch er As Exception
MessageBox.Show(er.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
Sub ejecutoQuery()
Dim ClassAud As New ClassMyUtils
'Sub que ejecuta los querys de Update para la tabla TransaccionReporte y la de Insert para la tabla de Transaccionrazon
'Declaro Varibles
Dim cont As Integer
cont = Me.chkListRazon.Items.Count
Dim Vector(cont) As Integer
Dim Is24h As Boolean
Is24h = chk24H.Checked
Try
If Me.cmbEstatus.Text = "Cerrado" Then
Dim CadUpdate As String
CadUpdate = ""
CadUpdate = "UPDATE TransaccionReporte SET Nota = " & _
"'" & Me.txtDescripcion.Text & "', Razon = '" & Me.txtRazon.Text & "', IDESTATUSALARMA = " & Me.cmbEstatus.SelectedValue & _
", b24H = " & Convert.ToByte(Is24h) & _
" WHERE IdTransaccion = " & _
clsVAr.Id_Transaccion & " AND IdProducto = " & _
clsVAr.Id_Producto & " AND IdPatron = " & clsVAr.Id_Patron
clCmp.sbGuardaModifica(CadUpdate) 'Ejecuta query
'If VariablesGlobales.gblA24Hrs = 0 Then
MessageBox.Show("Actualizaci<EFBFBD>n Realizada", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information)
'End If
''Auditoria
Dim sTextoAud As String
sTextoAud = "Reportado por:" & txtReportadoPor.Text & ", Nombre:" & txtNombre.Text & ", No. Referencia:" & txtNo_Referencia.Text & ", Estatus:" & cmbEstatus.Text & ", IdProducto:" & clsVAr.Id_Producto & ", Patron:" & clsVAr.Id_Patron
ClassAud.RT_Auditoria(clsVaribles.varUsuario, 112, 1, "Cambio de estatus de alarma: " & sTextoAud)
''Fin de auditoria
'MessageBox.Show("Actualizacion Realizada", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
If Me.cmbEstatus.Text <> "Cerrado" Then
'******************** UPDATE **************************
Dim CadUpdate As String
CadUpdate = ""
CadUpdate = "UPDATE TransaccionReporte SET Nota = " & _
"'" & Me.txtDescripcion.Text & "', Razon = '" & Me.txtRazon.Text & "', IDESTATUSALARMA = " & Me.cmbEstatus.SelectedValue & _
", b24H = " & Convert.ToByte(Is24h) & _
" WHERE IdTransaccion = " & _
clsVAr.Id_Transaccion & " AND IdProducto = " & _
clsVAr.Id_Producto & " AND IdPatron = " & clsVAr.Id_Patron
' MsgBox(CadUpdate)
clCmp.sbGuardaModifica(CadUpdate) 'Ejecuta query
'If VariablesGlobales.gblA24Hrs = 0 Then
MessageBox.Show("Actualizacion Realizada", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information)
'End If
''Auditoria
Dim sTextoAud As String
sTextoAud = "Reportado por:" & txtReportadoPor.Text & ", Nombre:" & txtNombre.Text & ", No. Referencia:" & txtNo_Referencia.Text & ", Estatus:" & cmbEstatus.Text & ", IdProducto:" & clsVAr.Id_Producto & ", Patron:" & clsVAr.Id_Patron
ClassAud.RT_Auditoria(clsVaribles.varUsuario, 112, 1, "Cierre de alarma: " & sTextoAud)
''Fin de auditoria
End If
End If
Close()
Catch ex As Exception
MessageBox.Show("Sp Actualizacion Estatus Razones:" & ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
Sub Razones()
'Lleno el control checkListoBox de razones
Try
Me.chkListRazon.DataSource = Nothing
Me.chkListRazon.Items.Clear()
'clCmp.sbLlenaLista("SELECT Id_Razon as clave, razon as nombre FROM razon", Me.chkListRazon)
clCmp.sbLlenaLista("spLlenaListaRazon ", Me.chkListRazon)
Catch er As Exception
MessageBox.Show("Reportes; Razones:" & er.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
Private Sub cmbEstatus_SelectedValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbEstatus.SelectedValueChanged
'Oculata o muestra "Controles"
Try
If Me.cmbEstatus.SelectedValue = 3 Then 'Si es Cerrado
lblRazon.Visible = True
'chkListRazon.Visible = True
'Llama al sub Razones
'Razones() -- se quita el que llame al catalogo de razones, se debe de colocar iun texto por parte del usuaruio c.clain 22/nov/2011
Else
'lblRazon.Visible = False
chkListRazon.Visible = False
End If
Catch er As Exception
End Try
End Sub
Private Sub BtnGuardar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnGuardar.Click
If txtRazon.Text <> "" Then
ejecutoQuery() 'Mando a traer el sub para guardar los cambios
Else
MessageBox.Show("Debe de indicar una raz<61>n por la que esta guardando la alarma", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Warning)
End If
End Sub
Private Sub BtnSal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSal.Click
Me.Close()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Close()
End Sub
Private Sub btnAgregarEvidencia_Click(sender As System.Object, e As System.EventArgs) Handles btnAgregarEvidencia.Click
GuardarEvidencia()
End Sub
Private Function GuardarEvidencia() As Boolean
Dim myDesktopDir As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
Dim opfDialog As New System.Windows.Forms.OpenFileDialog
Dim Folder_Path_Destino As String
Dim strSQL As String
Dim classCom As New clsComplejo
Dim idTransaccion As String
Folder_Path_Destino = Application.StartupPath & "\EvidenciaAlarmas\IdProducto_" & clsVAr.Id_Producto & _
"-IdTransaccion_" & clsVAr.Id_Transaccion & _
"-IdPatron_" & clsVAr.Id_Patron
opfDialog.InitialDirectory = myDesktopDir
opfDialog.Filter = "All files (*.*)|*.*"
If opfDialog.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
Try
If (opfDialog.FileName IsNot Nothing) Then
' Insert code to read the stream here.
'agregar a la base de datos el archivo seleccionado
Dim bytes = My.Computer.FileSystem.ReadAllBytes(opfDialog.FileName)
Dim clsSQL As New ClassSQL
Dim resultado As Boolean
idTransaccion = clsVAr.Id_Transaccion
If idTransaccion.Trim = String.Empty Then
Else
If clsSQL.BuscaDatos("select * from tbl_Evidencias where nombrearchivo = '" & opfDialog.SafeFileName & "' AND IdTransaccion = " & (idTransaccion)) Then
MessageBox.Show("La alarma " & idTransaccion & " ya cuenta con un archivo del mismo nombre, favor de verificar!", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Exit Function
End If
End If
If idTransaccion.Trim <> String.Empty Then
'Add File
resultado = clsSQL.IngresaArchivoAlarma(clsVAr.Id_Producto, clsVAr.Id_Patron, idTransaccion, opfDialog.SafeFileName, bytes)
End If
'FIN Ingresa alarmas de forma grupal
If resultado = True Then
'-----
strSQL = "spGrabaAuditoria 115" & "," & clsVaribles.varUsuario & _
", 24" & ",'Se agreg<65> archivo de evidencia en Id. Producto = " & clsVAr.Id_Producto & _
";Id. Transaccion = " & clsVAr.Id_Transaccion & ";Id. Patron = " & clsVAr.Id_Patron & _
"','" & My.Application.Info.ProductName & "/" & _
VariablesGlobales.gblUsuario & "','" & VariablesGlobales.gblMaquina & "','" & classCom.ObtenFecha(Date.Now.Date, "YYYYMMDD") & "'"
classCom.sbInserta(strSQL)
MessageBox.Show("Los archivos se agregaron correctamente !", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
End If
Catch Ex As Exception
MessageBox.Show("No se puede obtener el archivo seleccionado. Original error: " & Ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End If
End Function
Private Sub btnVerEvidencia_Click(sender As System.Object, e As System.EventArgs) Handles btnVerEvidencia.Click
VerEvidencia()
End Sub
Private Function VerEvidencia() As Boolean
Try
Dim frmEvidencias As New frmListaEvidenciasAlarmas
frmEvidencias.Id_Patron = clsVAr.Id_Patron
frmEvidencias.Id_Transaccion = clsVAr.Id_Transaccion
frmEvidencias.Id_Producto = clsVAr.Id_Producto
frmEvidencias.ShowDialog(Me)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Function
Private Sub btnAlarma24h_Click(sender As System.Object, e As System.EventArgs) Handles btnAlarma24h.Click
Alarma24h()
End Sub
Private Function Alarma24h() As Boolean
Try
VariablesGlobales.gblA24Hrs = 1
txtReportadoPor.Enabled = False
txtNombre.Enabled = False
txtNo_Referencia.Enabled = False
cmbEstatus.SelectedValue = 3
txtDescripcion.Text = "Alarma de 24 Horas"
txtRazon.Text = "Alarma de 24 Horas"
Me.chkListRazon.Visible = False
Me.chkListRazon.Enabled = False
cmbEstatus.Enabled = False
BtnGuardar.Enabled = False
Dim frmDetalles As Detalles = New Detalles
frmDetalles.Text = "Detalle Cr<43>dito"
frmDetalles.Refresh()
ejecutoQuery() 'Mando a traer el sub para guardar los cambios
Dim ClassSITI As New ClassSITI
'ClassSITI.ArchivoInusuales(fecha24, fecha24)
cmbEstatus.SelectedValue = 5
btnAlarma24h.Enabled = False
txtDescripcion.Enabled = False
txtRazon.Enabled = False
frmDetalles.Refresh()
ejecutoQuery()
VariablesGlobales.gblA24Hrs = 0
Catch ex As Exception
End Try
End Function
Private Sub btnPersonasRelacionadas_Click(sender As System.Object, e As System.EventArgs) Handles btnPersonasRelacionadas.Click
Dim frmDetalles As PersonasRelacionadas = New PersonasRelacionadas
frmDetalles.IdTipoalarma = IdTipoAlarma '--insuules
frmDetalles.ShowDialog()
End Sub
End Class