784 lines
34 KiB
VB.net
784 lines
34 KiB
VB.net
'Imports Microsoft.VisualBasic.Compatibility
|
|
Imports System.Data.SqlClient
|
|
Imports CLIENTE.SenteciasSQL
|
|
Public Class DetallesSin
|
|
Inherits System.Windows.Forms.Form
|
|
|
|
#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
|
|
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 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 btnAlarma24h As System.Windows.Forms.Button
|
|
Friend WithEvents chk24H As System.Windows.Forms.CheckBox
|
|
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(DetallesSin))
|
|
Me.Label3 = New System.Windows.Forms.Label()
|
|
Me.Label4 = New System.Windows.Forms.Label()
|
|
Me.Label5 = New System.Windows.Forms.Label()
|
|
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.btnAlarma24h = New System.Windows.Forms.Button()
|
|
Me.chk24H = New System.Windows.Forms.CheckBox()
|
|
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()
|
|
'
|
|
'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, 83)
|
|
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, 55)
|
|
Me.Label5.Name = "Label5"
|
|
Me.Label5.Size = New System.Drawing.Size(48, 16)
|
|
Me.Label5.TabIndex = 4
|
|
Me.Label5.Text = "Nombre:"
|
|
'
|
|
'txtNombre
|
|
'
|
|
Me.txtNombre.Location = New System.Drawing.Point(105, 53)
|
|
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, 81)
|
|
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 = "Descripcion:"
|
|
'
|
|
'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ó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
|
|
'
|
|
'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
|
|
'
|
|
'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"
|
|
'
|
|
'DetallesSin
|
|
'
|
|
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.chk24H)
|
|
Me.Controls.Add(Me.btnAlarma24h)
|
|
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.Label5)
|
|
Me.Controls.Add(Me.Label4)
|
|
Me.Controls.Add(Me.Label3)
|
|
Me.Controls.Add(Me.Label2)
|
|
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D
|
|
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
|
Me.MaximizeBox = False
|
|
Me.Name = "DetallesSin"
|
|
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.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
|
|
btnAlarma24h.Enabled = False
|
|
Me.txtDescripcion.Enabled = False
|
|
Me.txtRazon.Enabled = False
|
|
Me.chkListRazon.Visible = True
|
|
Me.chkListRazon.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(es24Horas,0) '24h'"
|
|
SQLScript = SQLScript & " FROM OperacionesSinTran WHERE idSinTransaccion = " & clsVaribles.Id_Transaccion
|
|
|
|
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
|
|
Catch er As Exception
|
|
MessageBox.Show("Reportes; DetalleDivisas_Load:" & er.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
|
|
End Try
|
|
desHeader.Text = Me.Text
|
|
|
|
If BtnGuardar.Enabled = False Then
|
|
BtnGuardar.BackColor = Color.DarkGray
|
|
Else
|
|
BtnGuardar.BackColor = Color.Black
|
|
End If
|
|
|
|
If Me.cmbEstatus.SelectedValue < 4 Then
|
|
txtNombre.Enabled = False
|
|
txtNo_Referencia.Enabled = False
|
|
End If
|
|
|
|
End Sub ' Fin carga form+
|
|
|
|
|
|
Public Function IsRelevante() As Boolean
|
|
Try
|
|
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
|
|
Catch ex As Exception
|
|
MessageBox.Show(ex.Message)
|
|
End Try
|
|
End Function
|
|
|
|
|
|
Private Sub CargaDatos()
|
|
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
|
|
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 OperacionesSinTran SET Nota = " &
|
|
"'" & Me.txtDescripcion.Text & "', Razon = '" & Me.txtRazon.Text & "', IdEstatusTransaccion = " & Me.cmbEstatus.SelectedValue &
|
|
", es24Horas = " & Convert.ToByte(Is24h) &
|
|
" WHERE idSinTransaccion = " &
|
|
clsVAr.Id_Transaccion
|
|
|
|
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: 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 OperacionesSinTran SET Nota = " &
|
|
"'" & Me.txtDescripcion.Text & "', Razon = '" & Me.txtRazon.Text & "', IdEstatusTransaccion = " & Me.cmbEstatus.SelectedValue &
|
|
", es24Horas = " & Convert.ToByte(Is24h) &
|
|
" WHERE idSinTransaccion = " &
|
|
clsVAr.Id_Transaccion
|
|
' 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: 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ó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)
|
|
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ó 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)
|
|
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
|
|
|
|
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é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)
|
|
Dim frmDetalles As PersonasRelacionadas = New PersonasRelacionadas
|
|
frmDetalles.IdTipoalarma = IdTipoAlarma '--insuules
|
|
frmDetalles.ShowDialog()
|
|
End Sub
|
|
End Class
|