270 lines
11 KiB
VB.net
270 lines
11 KiB
VB.net
|
Public Class FRCalificacion
|
|||
|
|
|||
|
|
|||
|
Private Sub CBPatron_DropDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles CBPatron.DropDown
|
|||
|
|
|||
|
Dim SQL As String
|
|||
|
Dim clCmj1 As clsComplejo
|
|||
|
|
|||
|
Try
|
|||
|
clCmj1 = New clsComplejo
|
|||
|
|
|||
|
'SQL = "spLlenaComboPatronI " & clsVaribles.idproducto
|
|||
|
|
|||
|
'SQL = " sp_ConsultarPatronXProducto " & clsVaribles.idproducto
|
|||
|
SQL = "SELECT IDPATRON as clave,PATRON as nombre from cat_patron where IDPATRON = 4 "
|
|||
|
'clCmj1.cm.CommandText = SQL
|
|||
|
'clCmj1.ad.SelectCommand = clCmj1.cm
|
|||
|
|
|||
|
clCmj1.sbLlenaCombo(SQL, CBPatron)
|
|||
|
|
|||
|
Catch ex As Exception
|
|||
|
MessageBox.Show("Mensaje: " & ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
|
|||
|
Exit Sub
|
|||
|
End Try
|
|||
|
|
|||
|
End Sub
|
|||
|
Private Sub llenaComboPatron()
|
|||
|
Dim SQL As String
|
|||
|
Dim clCmj1 As clsComplejo
|
|||
|
Try
|
|||
|
clCmj1 = New clsComplejo
|
|||
|
SQL = "SELECT IDPATRON as clave,PATRON as nombre from cat_patron where IDPATRON = 4 "
|
|||
|
clCmj1.sbLlenaCombo(SQL, CBPatron)
|
|||
|
|
|||
|
Catch ex As Exception
|
|||
|
MessageBox.Show("Mensaje: " & ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
|
|||
|
Exit Sub
|
|||
|
End Try
|
|||
|
End Sub
|
|||
|
|
|||
|
Private Sub CBPatron_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CBPatron.SelectedIndexChanged
|
|||
|
|
|||
|
End Sub
|
|||
|
|
|||
|
Private Sub FRCalificacion_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
|||
|
|
|||
|
Dim strTabla As String
|
|||
|
Dim cmdSQL As String
|
|||
|
Dim Classcom As New clsComplejo
|
|||
|
Dim strNota As String
|
|||
|
|
|||
|
|
|||
|
TXTNombre.Text = clsVaribles.Nombre
|
|||
|
TXTReferencia.Text = clsVaribles.No_Referencia
|
|||
|
TXTTransaccion.Text = clsVaribles.varTransaccion
|
|||
|
|
|||
|
If Me.TXTDescripcion.Text = "" Then
|
|||
|
|
|||
|
Select Case clsVaribles.idproducto
|
|||
|
Case 1
|
|||
|
strTabla = "BANCATRADICIONAL"
|
|||
|
Case 2
|
|||
|
strTabla = "MERCADODECAPITALES" '"MERCADODEDINERO"
|
|||
|
Case 3
|
|||
|
strTabla = "MERCADODECAPITALES"
|
|||
|
Case 4
|
|||
|
strTabla = "SOCIEDADESDEINVERSION"
|
|||
|
Case 11
|
|||
|
strTabla = "DIVISAS"
|
|||
|
Case 8
|
|||
|
strTabla = "CREDITO"
|
|||
|
Case 7
|
|||
|
strTabla = "BANCAINTERNACIONAL"
|
|||
|
|
|||
|
End Select
|
|||
|
|
|||
|
'Se asignan valores a los controles
|
|||
|
|
|||
|
|
|||
|
'clsVAr.idproducto
|
|||
|
|
|||
|
'cmdSQL = "SELECT i.InstrumentoMonetario, t.tipooperacion as nombretipooperacion,c.monto,c.fecha,I.IdInstrumentoMonetario FROM " & strTabla & " c "
|
|||
|
'cmdSQL = cmdSQL & " inner join cat_tipooperacion t on t.idtipooperacion = c.idtipooperacion "
|
|||
|
'cmdSQL = cmdSQL & " inner join cat_instrumentomonetario i on i.IdInstrumentoMonetario = c.IdInstrumentoMonetario"
|
|||
|
'cmdSQL = cmdSQL & " WHERE idtransaccion = '" & clsVaribles.varTransaccion & "'"
|
|||
|
|
|||
|
|
|||
|
cmdSQL = "SELECT i.Nombre, t.tipooperacion as nombretipooperacion,c.monto,c.fecha,I.IdInstrumentoMonetario FROM " & strTabla & " c "
|
|||
|
cmdSQL = cmdSQL & " inner join cat_tipooperacion t on t.idtipooperacion = c.idtipooperacion "
|
|||
|
cmdSQL = cmdSQL & " inner join cat_instrumentomonetario i on i.IdInstrumentoMonetario = c.IdInstrumentoMonetario"
|
|||
|
cmdSQL = cmdSQL & " WHERE idtransaccion = '" & clsVaribles.varTransaccion & "'"
|
|||
|
|
|||
|
|
|||
|
' cmdSQL = "SELECT * FROM " & strTabla & " WHERE NO_REFERENCIA = '" & clsVaribles.No_Referencia & "'"
|
|||
|
|
|||
|
Classcom.fdtDataSet(cmdSQL)
|
|||
|
|
|||
|
If Classcom.ds.Tables(0).Rows.Count <> 0 Then
|
|||
|
|
|||
|
'Select Case Classcom.ds.Tables(0).Rows(0).Item("id_tipooperacion").ToString
|
|||
|
|
|||
|
' Case Is = "1" 'DEPOSITO
|
|||
|
' strNota = "Deposito "
|
|||
|
' Case Is = "2" 'RETIRO
|
|||
|
' strNota = "Retiro "
|
|||
|
' Case Is = "8" 'OTORGAMENTO DE CREDITO
|
|||
|
' strNota = "Otorgamiento de Credito"
|
|||
|
' Case Is = "9" 'PAGO DE CREDITO
|
|||
|
' strNota = "Pago de Credito"
|
|||
|
|
|||
|
'End Select
|
|||
|
strNota = Classcom.ds.Tables(0).Rows(0).Item("nombretipooperacion").ToString & " en " & Classcom.ds.Tables(0).Rows(0).Item("Nombre").ToString & " por " & Classcom.ds.Tables(0).Rows(0).Item("monto").ToString
|
|||
|
|
|||
|
|
|||
|
|
|||
|
'Select Case Classcom.ds.Tables(0).Rows(0).Item("ID_INSMONETARIO").ToString
|
|||
|
|
|||
|
' Case Is = "1" 'EFECTIVO
|
|||
|
' strNota = Classcom.ds.Tables(0).Rows(0).Item("nombretipooperacion").ToString & " en Efectivo por " & Classcom.ds.Tables(0).Rows(0).Item("monto").ToString
|
|||
|
' Case Is = "2" 'CHEQUE
|
|||
|
' strNota = Classcom.ds.Tables(0).Rows(0).Item("nombretipooperacion").ToString & " mediante Cheque por " & Classcom.ds.Tables(0).Rows(0).Item("monto").ToString
|
|||
|
' Case Is = "3" 'TRANSFERENCIA
|
|||
|
' strNota = Classcom.ds.Tables(0).Rows(0).Item("nombretipooperacion").ToString & " mediante Transferencia por " & Classcom.ds.Tables(0).Rows(0).Item("monto").ToString
|
|||
|
|
|||
|
'End Select
|
|||
|
|
|||
|
End If
|
|||
|
|
|||
|
Me.TXTDescripcion.Text = strNota
|
|||
|
|
|||
|
End If
|
|||
|
DesHeader.Text = Me.Text
|
|||
|
llenaComboPatron()
|
|||
|
End Sub
|
|||
|
|
|||
|
Private Sub CBEstatus_DropDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles CBEstatus.DropDown
|
|||
|
|
|||
|
Dim SQL As String
|
|||
|
Dim clCmj1 As clsComplejo
|
|||
|
|
|||
|
Try
|
|||
|
clCmj1 = New clsComplejo
|
|||
|
|
|||
|
SQL = "spLlenaComboEstatusTransacciones"
|
|||
|
|
|||
|
'clCmj1.cm.CommandText = SQL
|
|||
|
'clCmj1.ad.SelectCommand = clCmj1.cm
|
|||
|
|
|||
|
clCmj1.sbLlenaCombo(SQL, CBEstatus)
|
|||
|
|
|||
|
Catch ex As Exception
|
|||
|
MessageBox.Show("Error CBO2Plaza_DropDown: " & ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
|
|||
|
Exit Sub
|
|||
|
End Try
|
|||
|
|
|||
|
|
|||
|
End Sub
|
|||
|
|
|||
|
Private Sub CBEstatus_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CBEstatus.SelectedIndexChanged
|
|||
|
|
|||
|
End Sub
|
|||
|
|
|||
|
Private Sub BTAceptar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTAceptar.Click
|
|||
|
|
|||
|
Dim classCom As New clsComplejo
|
|||
|
Dim strSQL As String
|
|||
|
Dim varIDTransaccion As Long
|
|||
|
Dim varPatron As Long
|
|||
|
Dim varEstatus As Long
|
|||
|
Dim varFecha As String
|
|||
|
Dim varProducto As String
|
|||
|
Dim varSubproducto As Integer
|
|||
|
Dim forma As New FrmNewInsuales
|
|||
|
|
|||
|
Try
|
|||
|
|
|||
|
'validacion de los campos requeridos
|
|||
|
|
|||
|
If Me.CBPatron.Text = "" Then
|
|||
|
MessageBox.Show("Es necesario el patr<74>n para reportar ", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
|
|||
|
Exit Sub
|
|||
|
End If
|
|||
|
|
|||
|
If Me.CBEstatus.Text = "" Then
|
|||
|
MessageBox.Show("Es necesario el estatus para reportar ", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
|
|||
|
Exit Sub
|
|||
|
End If
|
|||
|
|
|||
|
If Me.TXTDescripcion.Text = "" Then
|
|||
|
MessageBox.Show("Es necesaria la descripci<63>n para reportar ", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
|
|||
|
Exit Sub
|
|||
|
End If
|
|||
|
|
|||
|
If Me.TXTRazon.Text = "" Then
|
|||
|
MessageBox.Show("Es necesaria la raz<61>n para reportar ", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
|
|||
|
Exit Sub
|
|||
|
End If
|
|||
|
|
|||
|
'idtransaccion,idproducto,ID_SUBPRODUCTO,ID_PATRON,ID_ALARMA,ID_ESTATUSTRANSACCION,FECHa,NOTA,RAZON
|
|||
|
'INSERTA EN TRANSACCIONREPORTE
|
|||
|
|
|||
|
varProducto = classCom.BuscaValores("isnull(idproducto,0)", "cat_producto", "producto = '" & clsVaribles.strProdFraccionada & "'")
|
|||
|
|
|||
|
varPatron = classCom.BuscaValores("isnull(idpatron,0)", "cat_patron", "patron = '" & Me.CBPatron.Text & "'")
|
|||
|
|
|||
|
varSubproducto = classCom.BuscaValores("idsubproducto", clsVaribles.strProdFraccionada, " idtransaccion = " & clsVaribles.varTransaccion)
|
|||
|
|
|||
|
strSQL = "INSERT INTO TRANSACCIONREPORTE (idtransaccion, idproducto, IDSUBPRODUCTO, IDPATRON, IDTIPOALARMA, "
|
|||
|
strSQL = strSQL & "IDESTATUSALARMA, FECHA, NOTA, RAZON, FECHADETECCION) VALUES ( "
|
|||
|
strSQL = strSQL & clsVaribles.varTransaccion & ", " & varProducto & ", " & varSubproducto & ", "
|
|||
|
strSQL = strSQL & varPatron & ", 2, " & Me.CBEstatus.SelectedValue & ", "
|
|||
|
'''strSQL = strSQL & "CONVERT(DATETIME,'" & clsVaribles.varFecha & "',103), "
|
|||
|
strSQL = strSQL & "'" & Year(clsVaribles.varFecha) & "-" & Month(clsVaribles.varFecha).ToString("00") & "-" & DateAndTime.Day(clsVaribles.varFecha).ToString("00") & "', "
|
|||
|
strSQL = strSQL & "'" & TXTDescripcion.Text & "', "
|
|||
|
strSQL = strSQL & "'" & TXTRazon.Text & "', "
|
|||
|
'''strSQL = strSQL & "'" & classCom.ObtenFecha(Now.Date, "yyyymmdd") & "')"
|
|||
|
strSQL = strSQL & "convert(datetime,'" & classCom.ObtenFecha(Now.Date, "yyyymmdd") & "',112))"
|
|||
|
|
|||
|
classCom.sbInserta(strSQL)
|
|||
|
|
|||
|
classCom = New clsComplejo
|
|||
|
|
|||
|
'- para kuspit no se usa el 24Horas
|
|||
|
'classCom.sbInserta("Update Transaccionreporte set r24 = " & Math.Abs(CInt(Me.CHKr24.Checked)) & " where idtransaccion = " & clsVaribles.varTransaccion & " AND idproducto = " & varProducto)
|
|||
|
|
|||
|
MessageBox.Show("Operaci<EFBFBD>n satisfactoria ", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information)
|
|||
|
''Auditoria
|
|||
|
Dim ClassAud As New ClassMyUtils
|
|||
|
Dim sTextoAud As String
|
|||
|
sTextoAud = "Calificacion de la transaccion : idtransaccion: " & clsVaribles.varTransaccion & ",Producto:" & clsVaribles.strProdFraccionada & ", Patron:" & Me.CBPatron.Text & ",Estatus: " & Me.CBEstatus.Text & ",Fecha: " & clsVaribles.varFecha & ",Nota: " & TXTDescripcion.Text & ",Razon: " & TXTRazon.Text & ",Fecha Deteccion. " & classCom.ObtenFecha(Now.Date, "dd/mm/yyyy")
|
|||
|
ClassAud.RT_Auditoria(clsVaribles.varUsuario, 112, 1, sTextoAud)
|
|||
|
''Fin de Auditoria
|
|||
|
forma.BTConsultar.PerformClick()
|
|||
|
|
|||
|
Me.Close()
|
|||
|
|
|||
|
Catch ex As Exception
|
|||
|
MessageBox.Show("Error BTAceptar_Click: " & ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
|
|||
|
Exit Sub
|
|||
|
End Try
|
|||
|
|
|||
|
End Sub
|
|||
|
|
|||
|
Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox1.Enter
|
|||
|
|
|||
|
End Sub
|
|||
|
|
|||
|
Private Sub CHKr24_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CHKr24.CheckedChanged
|
|||
|
Dim strDescripcionAnt As String
|
|||
|
|
|||
|
If Me.TXTDescripcion.Text <> "Reporte de 24 horas" Then
|
|||
|
strDescripcionAnt = Me.TXTDescripcion.Text.Trim
|
|||
|
End If
|
|||
|
|
|||
|
If CHKr24.Checked = True Then
|
|||
|
|
|||
|
TXTDescripcion.Text = "Reporte de 24 horas"
|
|||
|
Else
|
|||
|
TXTDescripcion.Text = strDescripcionAnt
|
|||
|
End If
|
|||
|
End Sub
|
|||
|
|
|||
|
Private Sub BtSalir_Click(sender As System.Object, e As System.EventArgs) Handles BtSalir.Click
|
|||
|
Me.Close()
|
|||
|
End Sub
|
|||
|
|
|||
|
Private Sub panel3_Paint(sender As Object, e As PaintEventArgs) Handles panel3.Paint
|
|||
|
|
|||
|
End Sub
|
|||
|
End Class
|