client/FrmDoctosCh.vb

779 lines
31 KiB
VB.net
Raw Blame History

Public Class FrmDoctosCh
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
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents LBLCliente As System.Windows.Forms.Label
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents LBLCuenta As System.Windows.Forms.Label
Friend WithEvents Panel1 As System.Windows.Forms.Panel
Friend WithEvents BTCerrar As System.Windows.Forms.Button
Friend WithEvents BTApo As System.Windows.Forms.Button
Friend WithEvents Panel4 As System.Windows.Forms.Panel
Friend WithEvents BTCancelar As System.Windows.Forms.Button
Friend WithEvents BTActuaizar As System.Windows.Forms.Button
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Panel3 As System.Windows.Forms.Panel
Friend WithEvents RDBCopia As System.Windows.Forms.RadioButton
Friend WithEvents Panel2 As System.Windows.Forms.Panel
Friend WithEvents LSTDoctos As System.Windows.Forms.CheckedListBox
Friend WithEvents TXTProrroga As System.Windows.Forms.TextBox
Friend WithEvents RDBOriginal As System.Windows.Forms.RadioButton
Friend WithEvents RDBExento As System.Windows.Forms.RadioButton
Friend WithEvents RDBvigente As System.Windows.Forms.RadioButton
Friend WithEvents Panel5 As System.Windows.Forms.Panel
Friend WithEvents BTFecha As System.Windows.Forms.Button
Friend WithEvents TXT0FechaId As System.Windows.Forms.TextBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents DTPfecha_vigencia As System.Windows.Forms.DateTimePicker
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.LBLCliente = New System.Windows.Forms.Label()
Me.Label1 = New System.Windows.Forms.Label()
Me.LBLCuenta = New System.Windows.Forms.Label()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.LSTDoctos = New System.Windows.Forms.CheckedListBox()
Me.BTCerrar = New System.Windows.Forms.Button()
Me.BTApo = New System.Windows.Forms.Button()
Me.Panel4 = New System.Windows.Forms.Panel()
Me.Panel5 = New System.Windows.Forms.Panel()
Me.BTFecha = New System.Windows.Forms.Button()
Me.TXT0FechaId = New System.Windows.Forms.TextBox()
Me.Label2 = New System.Windows.Forms.Label()
Me.BTCancelar = New System.Windows.Forms.Button()
Me.BTActuaizar = New System.Windows.Forms.Button()
Me.TXTProrroga = New System.Windows.Forms.TextBox()
Me.Label3 = New System.Windows.Forms.Label()
Me.Panel3 = New System.Windows.Forms.Panel()
Me.RDBCopia = New System.Windows.Forms.RadioButton()
Me.RDBOriginal = New System.Windows.Forms.RadioButton()
Me.Panel2 = New System.Windows.Forms.Panel()
Me.RDBExento = New System.Windows.Forms.RadioButton()
Me.RDBvigente = New System.Windows.Forms.RadioButton()
Me.DTPfecha_vigencia = New System.Windows.Forms.DateTimePicker()
Me.Label4 = New System.Windows.Forms.Label()
Me.Panel1.SuspendLayout()
Me.Panel4.SuspendLayout()
Me.Panel5.SuspendLayout()
Me.Panel3.SuspendLayout()
Me.Panel2.SuspendLayout()
Me.SuspendLayout()
'
'LBLCliente
'
Me.LBLCliente.BackColor = System.Drawing.Color.White
Me.LBLCliente.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.LBLCliente.ForeColor = System.Drawing.Color.MidnightBlue
Me.LBLCliente.Location = New System.Drawing.Point(0, 0)
Me.LBLCliente.Name = "LBLCliente"
Me.LBLCliente.Size = New System.Drawing.Size(424, 24)
Me.LBLCliente.TabIndex = 2
Me.LBLCliente.Text = "CLIENTE"
Me.LBLCliente.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'Label1
'
Me.Label1.BackColor = System.Drawing.Color.White
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.ForeColor = System.Drawing.Color.MidnightBlue
Me.Label1.Location = New System.Drawing.Point(424, 0)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(136, 24)
Me.Label1.TabIndex = 3
Me.Label1.Text = "Numero de Cuenta"
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'LBLCuenta
'
Me.LBLCuenta.BackColor = System.Drawing.Color.White
Me.LBLCuenta.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.LBLCuenta.ForeColor = System.Drawing.Color.MidnightBlue
Me.LBLCuenta.Location = New System.Drawing.Point(556, 0)
Me.LBLCuenta.Name = "LBLCuenta"
Me.LBLCuenta.Size = New System.Drawing.Size(151, 24)
Me.LBLCuenta.TabIndex = 4
Me.LBLCuenta.Text = "CUENTA"
Me.LBLCuenta.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'Panel1
'
Me.Panel1.BackColor = System.Drawing.Color.LightSteelBlue
Me.Panel1.Controls.Add(Me.LSTDoctos)
Me.Panel1.Location = New System.Drawing.Point(8, 84)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(690, 230)
Me.Panel1.TabIndex = 6
'
'LSTDoctos
'
Me.LSTDoctos.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.LSTDoctos.Location = New System.Drawing.Point(8, 8)
Me.LSTDoctos.Name = "LSTDoctos"
Me.LSTDoctos.Size = New System.Drawing.Size(678, 212)
Me.LSTDoctos.TabIndex = 23
'
'BTCerrar
'
Me.BTCerrar.BackColor = System.Drawing.Color.MidnightBlue
Me.BTCerrar.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.BTCerrar.ForeColor = System.Drawing.Color.White
Me.BTCerrar.Location = New System.Drawing.Point(595, 364)
Me.BTCerrar.Name = "BTCerrar"
Me.BTCerrar.Size = New System.Drawing.Size(104, 32)
Me.BTCerrar.TabIndex = 17
Me.BTCerrar.Text = "Cerrar"
Me.BTCerrar.UseVisualStyleBackColor = False
'
'BTApo
'
Me.BTApo.BackColor = System.Drawing.Color.MidnightBlue
Me.BTApo.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.BTApo.ForeColor = System.Drawing.Color.White
Me.BTApo.Location = New System.Drawing.Point(487, 366)
Me.BTApo.Name = "BTApo"
Me.BTApo.Size = New System.Drawing.Size(104, 32)
Me.BTApo.TabIndex = 19
Me.BTApo.Text = "Apoderados"
Me.BTApo.UseVisualStyleBackColor = False
Me.BTApo.Visible = False
'
'Panel4
'
Me.Panel4.BackColor = System.Drawing.Color.White
Me.Panel4.Controls.Add(Me.Panel5)
Me.Panel4.Controls.Add(Me.BTCancelar)
Me.Panel4.Controls.Add(Me.BTActuaizar)
Me.Panel4.Controls.Add(Me.TXTProrroga)
Me.Panel4.Controls.Add(Me.Label3)
Me.Panel4.Controls.Add(Me.Panel3)
Me.Panel4.Controls.Add(Me.Panel2)
Me.Panel4.Location = New System.Drawing.Point(7, 321)
Me.Panel4.Name = "Panel4"
Me.Panel4.Size = New System.Drawing.Size(439, 79)
Me.Panel4.TabIndex = 21
Me.Panel4.Visible = False
'
'Panel5
'
Me.Panel5.Controls.Add(Me.BTFecha)
Me.Panel5.Controls.Add(Me.TXT0FechaId)
Me.Panel5.Controls.Add(Me.Label2)
Me.Panel5.Location = New System.Drawing.Point(169, 10)
Me.Panel5.Name = "Panel5"
Me.Panel5.Size = New System.Drawing.Size(150, 57)
Me.Panel5.TabIndex = 29
Me.Panel5.Visible = False
'
'BTFecha
'
Me.BTFecha.Location = New System.Drawing.Point(97, 20)
Me.BTFecha.Name = "BTFecha"
Me.BTFecha.Size = New System.Drawing.Size(47, 25)
Me.BTFecha.TabIndex = 25
Me.BTFecha.Text = ". . ."
Me.BTFecha.UseVisualStyleBackColor = True
'
'TXT0FechaId
'
Me.TXT0FechaId.Enabled = False
Me.TXT0FechaId.Location = New System.Drawing.Point(7, 22)
Me.TXT0FechaId.Name = "TXT0FechaId"
Me.TXT0FechaId.Size = New System.Drawing.Size(85, 20)
Me.TXT0FechaId.TabIndex = 24
'
'Label2
'
Me.Label2.ForeColor = System.Drawing.Color.MidnightBlue
Me.Label2.Location = New System.Drawing.Point(6, 7)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(88, 16)
Me.Label2.TabIndex = 23
Me.Label2.Text = "Fecha Vigencia"
'
'BTCancelar
'
Me.BTCancelar.BackColor = System.Drawing.Color.MidnightBlue
Me.BTCancelar.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.BTCancelar.ForeColor = System.Drawing.Color.White
Me.BTCancelar.Location = New System.Drawing.Point(327, 41)
Me.BTCancelar.Name = "BTCancelar"
Me.BTCancelar.Size = New System.Drawing.Size(104, 32)
Me.BTCancelar.TabIndex = 28
Me.BTCancelar.Text = "Cancelar"
Me.BTCancelar.UseVisualStyleBackColor = False
'
'BTActuaizar
'
Me.BTActuaizar.BackColor = System.Drawing.Color.MidnightBlue
Me.BTActuaizar.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.BTActuaizar.ForeColor = System.Drawing.Color.White
Me.BTActuaizar.Location = New System.Drawing.Point(327, 7)
Me.BTActuaizar.Name = "BTActuaizar"
Me.BTActuaizar.Size = New System.Drawing.Size(104, 32)
Me.BTActuaizar.TabIndex = 27
Me.BTActuaizar.Text = "OK"
Me.BTActuaizar.UseVisualStyleBackColor = False
'
'TXTProrroga
'
Me.TXTProrroga.Location = New System.Drawing.Point(439, 29)
Me.TXTProrroga.Name = "TXTProrroga"
Me.TXTProrroga.Size = New System.Drawing.Size(104, 20)
Me.TXTProrroga.TabIndex = 26
Me.TXTProrroga.Text = "0"
Me.TXTProrroga.Visible = False
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(439, 13)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(80, 16)
Me.Label3.TabIndex = 25
Me.Label3.Text = "Prorroga"
Me.Label3.Visible = False
'
'Panel3
'
Me.Panel3.Controls.Add(Me.RDBCopia)
Me.Panel3.Controls.Add(Me.RDBOriginal)
Me.Panel3.Location = New System.Drawing.Point(439, 52)
Me.Panel3.Name = "Panel3"
Me.Panel3.Size = New System.Drawing.Size(128, 32)
Me.Panel3.TabIndex = 24
Me.Panel3.Visible = False
'
'RDBCopia
'
Me.RDBCopia.Location = New System.Drawing.Point(72, 8)
Me.RDBCopia.Name = "RDBCopia"
Me.RDBCopia.Size = New System.Drawing.Size(56, 16)
Me.RDBCopia.TabIndex = 1
Me.RDBCopia.Text = "Copia"
'
'RDBOriginal
'
Me.RDBOriginal.Location = New System.Drawing.Point(8, 8)
Me.RDBOriginal.Name = "RDBOriginal"
Me.RDBOriginal.Size = New System.Drawing.Size(64, 16)
Me.RDBOriginal.TabIndex = 0
Me.RDBOriginal.Text = "Original"
'
'Panel2
'
Me.Panel2.Controls.Add(Me.RDBExento)
Me.Panel2.Controls.Add(Me.RDBvigente)
Me.Panel2.Location = New System.Drawing.Point(7, 10)
Me.Panel2.Name = "Panel2"
Me.Panel2.Size = New System.Drawing.Size(157, 56)
Me.Panel2.TabIndex = 23
'
'RDBExento
'
Me.RDBExento.ForeColor = System.Drawing.Color.MidnightBlue
Me.RDBExento.Location = New System.Drawing.Point(8, 32)
Me.RDBExento.Name = "RDBExento"
Me.RDBExento.Size = New System.Drawing.Size(127, 18)
Me.RDBExento.TabIndex = 1
Me.RDBExento.Text = "Exento de Vigencia"
'
'RDBvigente
'
Me.RDBvigente.ForeColor = System.Drawing.Color.MidnightBlue
Me.RDBvigente.Location = New System.Drawing.Point(8, 8)
Me.RDBvigente.Name = "RDBvigente"
Me.RDBvigente.Size = New System.Drawing.Size(128, 20)
Me.RDBvigente.TabIndex = 0
Me.RDBvigente.Text = "Fecha de Vigencia"
'
'DTPfecha_vigencia
'
Me.DTPfecha_vigencia.Enabled = False
Me.DTPfecha_vigencia.Location = New System.Drawing.Point(8, 55)
Me.DTPfecha_vigencia.Name = "DTPfecha_vigencia"
Me.DTPfecha_vigencia.Size = New System.Drawing.Size(224, 20)
Me.DTPfecha_vigencia.TabIndex = 21
'
'Label4
'
Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label4.ForeColor = System.Drawing.Color.MidnightBlue
Me.Label4.Location = New System.Drawing.Point(8, 38)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(229, 16)
Me.Label4.TabIndex = 24
Me.Label4.Text = "Ultima Fecha de Verificacion"
'
'FrmDoctosCh
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.BackColor = System.Drawing.Color.WhiteSmoke
Me.ClientSize = New System.Drawing.Size(704, 405)
Me.ControlBox = False
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.Panel4)
Me.Controls.Add(Me.BTApo)
Me.Controls.Add(Me.BTCerrar)
Me.Controls.Add(Me.Panel1)
Me.Controls.Add(Me.LBLCuenta)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.LBLCliente)
Me.Controls.Add(Me.DTPfecha_vigencia)
Me.Name = "FrmDoctosCh"
Me.Text = "Checklist de Documentacion"
Me.Panel1.ResumeLayout(False)
Me.Panel4.ResumeLayout(False)
Me.Panel4.PerformLayout()
Me.Panel5.ResumeLayout(False)
Me.Panel5.PerformLayout()
Me.Panel3.ResumeLayout(False)
Me.Panel2.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTApo.Click
End Sub
Private Sub FrmDoctosCh_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Classcom As New clsComplejo
Dim Fila As DataRow
Dim SQL As String
Dim Fver As String
Try
If clsVaribles.IDCliente <> 0 Then
'llena datos del cliente
If clsVaribles.TipoPersona = 1 Then
SQL = "SELECT c.nombre + ' ' + c.apaterno + ' ' + c.amaterno as Nombre,cta.no_cuenta "
ElseIf clsVaribles.TipoPersona = 2 Then
SQL = "SELECT c.nombre as Nombre,cta.no_cuenta "
End If
SQL = SQL & " FROM Cliente c,cuenta cta"
SQL = SQL & " WHERE c.idcliente = " & clsVaribles.IDCliente
SQL = SQL & " AND c.idcliente = cta.idcliente"
Classcom.fdtDataSet(SQL)
If Classcom.ds.Tables(0).Rows.Count <> 0 Then
Fila = Nothing
Fila = Classcom.ds.Tables(0).Rows(0)
LBLCliente.Text = Fila("Nombre")
LBLCuenta.Text = Fila("no_cuenta")
End If
Fila = Nothing
'llena lista de documentos
Classcom = New clsComplejo
'MessageBox.Show("BUSCA DOCTOS")
SQL = "SELECT ID_DoctoCheckList clave,Nombre nombre "
SQL = SQL & " FROM DoctosChecklist "
SQL = SQL & " WHERE tipopersona in ( " & clsVaribles.TipoPersona & ",0)"
SQL = SQL & " ORDER BY ID_DoctoCheckList "
Classcom.fdtDataSet(SQL)
If Classcom.ds.Tables(0).Rows.Count <> 0 Then
'MessageBox.Show("SI TRAE DOCTOS " & SQL)
Classcom.sbLlenaLista(SQL, LSTDoctos)
'verifica los documentos que el cliente cumpla
For i As Integer = 0 To LSTDoctos.Items.Count - 1
Fila = Classcom.ds.Tables(0).Rows(i)
LSTDoctos.SetItemChecked(i, Classcom.VerificaCheckList(clsVaribles.IDCliente, Fila("clave"), Fver))
Next
If Fver <> "" Then
If Classcom.ObtenFecha(CDate(Now()), "yyyymmdd") <> Classcom.ObtenFecha(CDate(Fver), "yyyymmdd") Then
clsVaribles.blnActualizaFecha = True
DTPfecha_vigencia.Value = Fver
Else
clsVaribles.blnActualizaFecha = False
End If
Else
clsVaribles.blnActualizaFecha = False
End If
Else
'MessageBox.Show("NO TRAE DOCTOS " & SQL)
End If
End If
Catch ex As Exception
MessageBox.Show("error en Lectura de la Forma; FrmDoctosCh_Load: " & ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
Private Sub BTActuaizar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTActuaizar.Click
Dim Classcom As New clsComplejo
Dim strChk As String
Dim Fila As DataRow
Dim Valor As Integer
Dim SQL As String
Dim ClassAud As New ClassMyUtils
Try
SQL = "SELECT * "
SQL = SQL & " FROM KYC_Checklist "
SQL = SQL & " WHERE idcliente = " & clsVaribles.IDCliente
SQL = SQL & " AND Id_DoctoCheckList = " & LSTDoctos.SelectedValue
Classcom = New clsComplejo
Classcom.fdtDataSet(SQL)
If Classcom.ds.Tables(0).Rows.Count <> 0 Then
strChk = "UPDATE KYC_Checklist SET "
If TXT0FechaId.Text <> "" Then
strChk = strChk & " fecha_vigencia = CONVERT(DATETIME,'" & Classcom.ObtenFecha(TXT0FechaId.Text, "yyyymmdd") & "',112) ,"
End If
Valor = 0
If RDBvigente.Checked Then Valor = 1 Else Valor = 0
strChk = strChk & " vigente = " & Valor & ","
Valor = 0
If RDBExento.Checked Then Valor = 1 Else Valor = 0
strChk = strChk & " exento = " & Valor & ","
Valor = 0
If RDBOriginal.Checked Then Valor = 1 Else Valor = 0
strChk = strChk & " original = " & Valor & ","
Valor = 0
If RDBCopia.Checked Then Valor = 1 Else Valor = 0
strChk = strChk & " copia = " & Valor & ","
Valor = 0
If LSTDoctos.GetItemChecked(LSTDoctos.SelectedIndex) = True Then Valor = 1 Else Valor = 0
strChk = strChk & " cumple = " & Valor
strChk = strChk & ", fecha_prorroga = convert(datetime,'" & DTPfecha_vigencia.Value.Date & "',103)"
strChk = strChk & " WHERE idcliente = " & clsVaribles.IDCliente
strChk = strChk & " AND Id_DoctoCheckList = " & LSTDoctos.SelectedValue
Classcom.sbModifica2(strChk)
ClassAud.RT_Auditoria(clsVaribles.varUsuario, 3, 1, "Actualizaci<EFBFBD>n Checklist de IdCliente: " & clsVaribles.IDCliente)
' ClassAud.RT_Auditoria(clsVaribles.varUsuario, 99, My.Computer.Name, "Minds Cliente", "Actualizacion de Documento " & LSTDoctos.Text & " para el Cliente " & clsVaribles.IDCliente)
MessageBox.Show("Actualizacion Realizada con Exito ", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information)
TXT0FechaId.Text = ""
Else
SQL = "INSERT INTO KYC_Checklist "
SQL = SQL & " (idcliente,Id_DoctoCheckList,fecha_vigencia,vigente,exento,original,copia,fecha_prorroga,cumple,AUDUSRID,AUDMAQUINA,AUDFECHRA)"
SQL = SQL & " VALUES ("
SQL = SQL & clsVaribles.IDCliente & ","
SQL = SQL & LSTDoctos.SelectedValue & ","
If TXT0FechaId.Text <> "" Then
SQL = SQL & " CONVERT(DATETIME,'" & Classcom.ObtenFecha(TXT0FechaId.Text, "yyyymmdd") & "',112) ,"
Else
SQL = SQL & " NULL,"
End If
Valor = 0
If RDBvigente.Checked Then Valor = 1 Else Valor = 0
SQL = SQL & Valor & ","
Valor = 0
If RDBExento.Checked Then Valor = 1 Else Valor = 0
SQL = SQL & Valor & ","
Valor = 0
If RDBOriginal.Checked Then Valor = 1 Else Valor = 0
SQL = SQL & Valor & ","
Valor = 0
If RDBCopia.Checked Then Valor = 1 Else Valor = 0
SQL = SQL & Valor & ","
Valor = 0
If LSTDoctos.GetItemChecked(LSTDoctos.SelectedIndex) = True = True Then Valor = 1 Else Valor = 0
SQL = SQL & Valor & ",'" & My.User.Name & "','" & My.Computer.Name & "',GETDATE())"
Classcom.sbInserta(SQL)
MessageBox.Show("Actualizacion Realizada con Exito ", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information)
ClassAud.RT_Auditoria(clsVaribles.varUsuario, 3, 1, "Inserci<EFBFBD>n Checklist de IdCliente: " & clsVaribles.IDCliente)
' ClassAud.RT_Auditoria(clsVaribles.varUsuario, 100, My.Computer.Name, "Minds Cliente", "Alta de Documento " & LSTDoctos.Text & " para el Cliente " & clsVaribles.IDCliente)
TXT0FechaId.Text = ""
RDBvigente.Checked = False
RDBExento.Checked = False
RDBCopia.Checked = False
RDBOriginal.Checked = False
DTPfecha_vigencia.Value = Now()
End If
Panel4.Visible = False
Catch ex As Exception
MessageBox.Show("error en Boton Actualizar: " & ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
Private Sub BTCancelar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTCancelar.Click
Panel4.Visible = False
End Sub
Private Sub BTApo_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles BTApo.MouseMove
Dim Etiqueta As Button
Etiqueta = sender
Etiqueta.BackColor = System.Drawing.Color.Blue
End Sub
Private Sub BTCerrar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTCerrar.Click
'FrmChekList.RDBMoral.Checked = True
'FrmChekList.Chart()
If MessageBox.Show("<EFBFBD>Deseas salir de CheckList?", "MINDS", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then
If clsVaribles.blnActualizaFecha Then
If MessageBox.Show("<EFBFBD>Deseas Actualizar la Fecha de Varificacion para este Cliente?", "MINDS", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then
'AUDITORIA
Dim ClassAud As New ClassMyUtils
Dim varUser As Long
Dim ClassComodin As New clsComplejo
ClassComodin.sbInserta("UPDATE KYC_CHECKLIST SET FECHA_PRORROGA = GETDATE() WHERE idcliente = " & clsVaribles.IDCliente)
ClassAud.RT_Auditoria(clsVaribles.varUsuario, 3, 1, "Inserci<EFBFBD>n Checklist de IdCliente: " & clsVaribles.IDCliente)
' ClassAud.RT_Auditoria(clsVaribles.varUsuario, 101, My.Computer.Name, "Checklist", "Cambio Feha Verificacion para el Cliente " & clsVaribles.IDCliente)
'FIN AUDITORIA
End If
Me.Close()
Else
Me.Close()
End If
Else
End If
End Sub
Private Sub BTCerrar_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles BTCerrar.MouseMove
Dim Etiqueta As Button
Etiqueta = sender
Etiqueta.BackColor = System.Drawing.Color.Blue
End Sub
Private Sub BTCancelar_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles BTCancelar.MouseMove
Dim Etiqueta As Button
Etiqueta = sender
Etiqueta.BackColor = System.Drawing.Color.Blue
End Sub
Private Sub BTActuaizar_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles BTActuaizar.MouseMove
Dim Etiqueta As Button
Etiqueta = sender
Etiqueta.BackColor = System.Drawing.Color.Blue
End Sub
Private Sub BTActuaizar_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTActuaizar.MouseLeave
Dim Etiqueta As Button
Etiqueta = sender
Etiqueta.BackColor = System.Drawing.Color.MidnightBlue
End Sub
Private Sub BTCancelar_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTCancelar.MouseLeave
Dim Etiqueta As Button
Etiqueta = sender
Etiqueta.BackColor = System.Drawing.Color.MidnightBlue
End Sub
Private Sub BTApo_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTApo.MouseLeave
Dim Etiqueta As Button
Etiqueta = sender
Etiqueta.BackColor = System.Drawing.Color.MidnightBlue
End Sub
Private Sub BTCerrar_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTCerrar.MouseLeave
Dim Etiqueta As Button
Etiqueta = sender
Etiqueta.BackColor = System.Drawing.Color.MidnightBlue
End Sub
Private Sub LSTDoctos_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LSTDoctos.Click
Dim Classcom As New clsComplejo
Dim strChk As String
Dim Fila As DataRow
If LSTDoctos.Items.Count <= 0 Then
Exit Sub
End If
strChk = "SELECT * "
strChk = strChk & " FROM KYC_Checklist "
strChk = strChk & " WHERE idcliente = " & clsVaribles.IDCliente
strChk = strChk & " AND Id_DoctoCheckList = " & LSTDoctos.SelectedValue
Classcom.fdtDataSet(strChk)
If Classcom.ds.Tables(0).Rows.Count <> 0 Then
Fila = Classcom.ds.Tables(0).Rows(0)
If Not IsDBNull(Fila("fecha_vigencia")) Then
Me.TXT0FechaId.Text = Fila("fecha_vigencia")
Else
Me.TXT0FechaId.Text = ""
End If
If Not IsDBNull(Fila("vigente")) Then
If (Fila("vigente") = 0) Then RDBvigente.Checked = False Else RDBvigente.Checked = True
End If
If Not IsDBNull(Fila("exento")) Then
If (Fila("exento") = 0) Then RDBExento.Checked = False Else RDBExento.Checked = True
End If
If Not IsDBNull(Fila("original")) Then
If (Fila("original") = 0) Then RDBOriginal.Checked = False Else RDBOriginal.Checked = True
End If
If Not IsDBNull(Fila("copia")) Then
If Fila("copia") = 0 Then RDBCopia.Checked = False Else RDBCopia.Checked = True
End If
End If
Panel4.Visible = True
End Sub
Private Sub LSTDoctos_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LSTDoctos.SelectedIndexChanged
End Sub
Private Sub LSTDoctos_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LSTDoctos.DoubleClick
End Sub
Private Sub BTCerrar_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTCerrar.Validated
End Sub
Private Sub LSTDoctos_EnabledChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles LSTDoctos.EnabledChanged
End Sub
Private Sub LSTDoctos_HandleDestroyed(ByVal sender As Object, ByVal e As System.EventArgs) Handles LSTDoctos.HandleDestroyed
End Sub
Private Sub LSTDoctos_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles LSTDoctos.Validated
End Sub
Private Sub LSTDoctos_ItemCheck(ByVal sender As Object, ByVal e As System.Windows.Forms.ItemCheckEventArgs) Handles LSTDoctos.ItemCheck
If LSTDoctos.GetItemText(LSTDoctos.Items.Item(LSTDoctos.SelectedIndex)) = "Tarjeta de Firma (Cr<43>dito)" Then
RDBOriginal.Checked = True
End If
End Sub
Private Sub LSTDoctos_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles LSTDoctos.SelectedValueChanged
End Sub
Private Sub LSTDoctos_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles LSTDoctos.Validating
End Sub
Private Sub LSTDoctos_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles LSTDoctos.MouseEnter
End Sub
Private Sub LSTDoctos_BackColorChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles LSTDoctos.BackColorChanged
End Sub
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTFecha.Click
Dim FormaFecha As New FrmCal
FormaFecha.ShowDialog()
TXT0FechaId.Text = clsVaribles.FechaComodin
End Sub
Private Sub RDBvigente_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RDBvigente.CheckedChanged
If RDBvigente.Checked = True Then
Panel5.Visible = True
Else
Panel5.Visible = False
End If
End Sub
Private Sub RDBExento_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RDBExento.CheckedChanged
If RDBExento.Checked = True Then
TXT0FechaId.Text = ""
Panel5.Visible = False
Else
End If
End Sub
End Class