client/Reportes/OperInuSinTran.vb

1079 lines
51 KiB
VB.net

Imports System.Text.RegularExpressions
Public Class OperInuSinTran
Dim plazaSucursalSeleccionada As String
Public bProvieneDeRepAnonimo As Boolean = False
Private Sub OperPreoAdminDetalle_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Dim cargarCbo As New clsComplejo
Dim sSQL As String
dtpFechaOper.MaxDate = Now
Try
''Llenar combo de estados
sSQL = "SELECT IdEstado clave, Estado as Nombre FROM Cat_Estado WHERE IdEstado BETWEEN 1 AND 33 ORDER BY IdEstado"
'sSQL = "SELECT IdEstado clave, Estado Nombre FROM Cat_Estado ORDER BY IdEstado"
cargarCbo.sbLlenaCombo(sSQL, cmbEstado)
cmbEstado.SelectedIndex = -1
cargarCbo = Nothing
cargarCbo = New clsComplejo
''LLenar combo de Actividades Económicas
sSQL = "SELECT IdActividadEconomica Clave,ActividadEconomica as Nombre FROM Cat_ActividadEconomica ORDER BY ActividadEconomica "
cargarCbo.sbLlenaCombo(sSQL, cmbActEconom)
cmbActEconom.SelectedIndex = -1
'cmbPlaza.Text = "Seleccione primero un estado"
addRegistro()
cmbPlaza.SelectedIndex = 0
cargarCbo = Nothing
cargarCbo = New clsComplejo
cargarCbo.sbLlenaCombo("SELECT IdEstatusAlarma as clave, EstatusAlarma as nombre FROM CAT_ESTATUSALARMA", cmbEstatusOper)
cmbEstatusOper.SelectedIndex = -1
cargarCbo = Nothing
cargarCbo = New clsComplejo
cargarCbo.sbLlenaCombo("select IDNACIONALIDAD clave, DESCRIPCION nombre FROM CAT_NACIONALIDAD", cboNacionalidad)
cboNacionalidad.SelectedIndex = -1
' ''Funcionario
'cargarCbo.sbLlenaCombo("spConsultarFuncionario", Me.cmbFuncionario)
'cmbFuncionario.SelectedIndex = -1
cargarCbo = Nothing
cargarCbo = New clsComplejo
cargarCbo.sbLlenaCombo("select idproducto clave, ALIAS nombre FROM cat_producto where activo = 1", cboProducto)
cboProducto.SelectedIndex = -1
cargarCbo = Nothing
cargarCbo = New clsComplejo
cargarCbo.sbLlenaCombo("select IDTIPOPERSONA clave, TIPOPERSONA nombre FROM CAT_TIPOPERSONA where activo = 1", cmbTipoPersona)
cmbTipoPersona.SelectedIndex = -1
'BtnLimpiar.PerformClick()
ActualizaGrid()
cargarSucursal()
'Actualiza grid
lblIdPreocupSinTran.Text = ""
dtpFechaDetecion.Enabled = False
btnRelacionadas.Enabled = False
btnRelacionadas.BackColor = Color.DarkGray
Catch ex As Exception
MessageBox.Show(ex.Message, "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Try
End Sub
Private Sub BntSalie_Click(sender As System.Object, e As System.EventArgs) Handles BntSalie.Click
Me.Close()
End Sub
Private Function ObtenerCPSucursal() As String
Dim strSQL As String
Dim ClassDatos2 As New clsComplejo
Dim FilaDatos As DataRow
ObtenerCPSucursal = ""
strSQL = "select CODIGOPOSTAL,IDPLAZA from CAT_SUCURSAL where IDSUCURSAL= " & cboSucursal.SelectedValue & " "
ClassDatos2 = New clsComplejo
ClassDatos2.fdtDataSet(strSQL)
If ClassDatos2.ds.Tables(0).Rows.Count <> 0 Then
For x As Integer = 0 To ClassDatos2.ds.Tables(0).Rows.Count - 1
FilaDatos = ClassDatos2.ds.Tables(0).Rows(x)
ObtenerCPSucursal = FilaDatos("CODIGOPOSTAL").ToString()
plazaSucursalSeleccionada = FilaDatos("IDPLAZA").ToString()
Next
End If
End Function
Private Sub txtNombre_KeyPress(sender As System.Object, e As System.Windows.Forms.KeyPressEventArgs)
If Char.IsDigit(e.KeyChar) Then
e.Handled = True
End If
End Sub
Private Sub txtApePaterno_KeyPress(sender As System.Object, e As System.Windows.Forms.KeyPressEventArgs)
If Char.IsDigit(e.KeyChar) Then
e.Handled = True
End If
End Sub
Private Sub txtApeMaterno_KeyPress(sender As System.Object, e As System.Windows.Forms.KeyPressEventArgs)
If Char.IsDigit(e.KeyChar) Then
e.Handled = True
End If
End Sub
Private Sub txtRFC_Validating(sender As System.Object, e As System.ComponentModel.CancelEventArgs) Handles txtRFC.Validating
'Try
' txtRFC.Text = txtRFC.Text.ToUpper()
' If txtRFC.Text <> String.Empty Then
' If Regex.IsMatch(txtRFC.Text.Trim, "^([A-Z\s]{4})\d{6}$") = True Then
' Return
' End If
' If Regex.IsMatch(txtRFC.Text.Trim, "^([A-Z\s]{4})\d{6}([A-Z\w]{2,3})$") = False Then
' MsgBox("El RFC no es válido. El formato correcto es: LLLL###### ó LLLL######AA ó LLLL######AAA. L=Letra, #=Número, A=Alfanumérico.")
' End If
' End If
'Catch ex As Exception
' MessageBox.Show(ex.Message, "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
'End Try
End Sub
Private Sub txtCURP_Validating(sender As System.Object, e As System.ComponentModel.CancelEventArgs)
'Try
' txtCURP.Text = txtCURP.Text.ToUpper()
' If txtCURP.Text <> String.Empty Then
' If Regex.IsMatch(txtCURP.Text.Trim, "[a-zA-Z]{4,4}[0-9]{6}[a-zA-Z]{6,6}[0-9]{2}") = True Then
' Return
' Else
' ''
' MsgBox("La CURP no es válida. El formato correcto es: LLLL######LLLLLL## ")
' End If
' End If
'Catch ex As Exception
' MessageBox.Show(ex.Message, "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
'End Try
End Sub
Private Sub CambiaColorAzul()
lblNombre.ForeColor = Color.MidnightBlue
lblMaterno.ForeColor = Color.MidnightBlue
lblCurp.ForeColor = Color.MidnightBlue
lblPaterno.ForeColor = Color.MidnightBlue
Label4.ForeColor = Color.MidnightBlue
Label6.ForeColor = Color.MidnightBlue
Label7.ForeColor = Color.MidnightBlue
Label8.ForeColor = Color.MidnightBlue
Label9.ForeColor = Color.MidnightBlue
Label11.ForeColor = Color.MidnightBlue
Label14.ForeColor = Color.MidnightBlue
Label23.ForeColor = Color.MidnightBlue
Label12.ForeColor = Color.MidnightBlue
Label10.ForeColor = Color.MidnightBlue
Label15.ForeColor = Color.MidnightBlue
Label24.ForeColor = Color.MidnightBlue
Label16.ForeColor = Color.MidnightBlue
Label21.ForeColor = Color.MidnightBlue
Label20.ForeColor = Color.MidnightBlue
Label22.ForeColor = Color.MidnightBlue
Label18.ForeColor = Color.MidnightBlue
Label26.ForeColor = Color.MidnightBlue
End Sub
Private Sub BtnAlta_Click(sender As System.Object, e As System.EventArgs) Handles BtnAlta.Click
''Inserta o Actualiza el registro
Dim ClassCom As New clsComplejo
Dim strSQL As String
Dim mensaje As String = ""
CambiaColorAzul()
Dim is24Hrs As Boolean
Try
If cmbTipoPersona.Text.Trim = "" Then
MsgBox("Es necesario elegir el tipo de Persona")
lblNombre.ForeColor = Color.Red
Exit Sub
End If
If txtNombre.Text = "" Then
'MessageBox.Show("Definir el nombre.", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
'Return
mensaje = mensaje + lblNombre.Text + vbCrLf + " "
lblNombre.ForeColor = Color.Red
End If
If txtApePaterno.Text = "" And cmbTipoPersona.SelectedValue = 2 Then
'MessageBox.Show("Definir el apellido paterno.", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
'Return
mensaje = mensaje + "Apellido Paterno " + vbCrLf + " "
lblPaterno.ForeColor = Color.Red
End If
'If txtApeMaterno.Text = "" Then
' 'MessageBox.Show("Definir el apellido materno.", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
' 'Return
' mensaje = mensaje + "Apellido Materno " + vbCrLf + " "
' Label1.ForeColor = Color.Red
'End If
If txtRFC.Text = "" Then
'MessageBox.Show("Definir el RFC.", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
'Return
mensaje = mensaje + "RFC " + vbCrLf + " "
Label4.ForeColor = Color.Red
End If
'If Regex.IsMatch(txtRFC.Text, "^([a-zA-Z]{4})([0-9]{6})([a-zA-Z0-9]{3})") = False Or txtRFC.Text.Length <> 13 Then
' If Regex.IsMatch(txtRFC.Text, "^([a-zA-Z]{4})([0-9]{6})") = False Or txtRFC.Text.Length <> 10 Then
' MsgBox("El Registro no es válido. El formato correcto es: XXXX######XXX ó XXXX######")
' Return
' End If
'End If
If txtCURP.Text = "" And cmbTipoPersona.SelectedValue = 2 Then
'MessageBox.Show("Definir la CURP.", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
'Return
mensaje = mensaje + "CURP " + vbCrLf + " "
lblCurp.ForeColor = Color.Red
End If
'If Regex.IsMatch(txtRFC.Text, "^([a-zA-Z]{4})([0-9]{6})([a-zA-Z]{6})([0-9]{2})") = False Or txtRFC.Text.Length <> 18 Then
' MsgBox("El Registro no es válido. El formato correcto es: XXXX######XXXXXX## ")
' Return
'End If
If txtDomicilio.Text = "" Then
'MessageBox.Show("Definir el domicilio.", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
'Return
mensaje = mensaje + "Domicilio " + vbCrLf + " "
Label7.ForeColor = Color.Red
End If
If txtColonia.Text = "" Then
'MessageBox.Show("Definir la colonia.", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
'Return
mensaje = mensaje + "Colonia " + vbCrLf + " "
Label8.ForeColor = Color.Red
End If
If cmbEstado.SelectedValue = Nothing Then
'MessageBox.Show("Definir el estado.", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
'Return
mensaje = mensaje + "Estado " + vbCrLf + " "
Label12.ForeColor = Color.Red
End If
If cmbLocalidad.SelectedValue = Nothing Then
'MessageBox.Show("Definir la ciudad.", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
'Return
mensaje = mensaje + "Localidad " + vbCrLf + " "
Label26.ForeColor = Color.Red
End If
If txtTelefono.Text = "" Then
'MessageBox.Show("Definir el teléfono.", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
'Return
mensaje = mensaje + "Teléfono " + vbCrLf + " "
Label10.ForeColor = Color.Red
End If
If cmbActEconom.SelectedValue = "" Then
'MessageBox.Show("Definir la actividad económica.", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
'Return
mensaje = mensaje + "Actividad Económica " + vbCrLf + " "
Label11.ForeColor = Color.Red
End If
'If cmbFuncionario.SelectedValue Is Nothing Then
' MessageBox.Show("Definir el agente o funcionario de la operación.", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
' Return
'End If
If txtNota.Text = "" Then
'MessageBox.Show("Definir la descripción de la operación.", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
'Return
mensaje = mensaje + "Descripción " + vbCrLf + " "
Label21.ForeColor = Color.Red
End If
If txtRazon.Text = "" Then
'MessageBox.Show("Definir la razón de la operación.", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
'Return
mensaje = mensaje + "Razón " + vbCrLf + " "
Label20.ForeColor = Color.Red
End If
If cmbEstatusOper.SelectedValue Is Nothing Then
'MessageBox.Show("Definir el estatus de la operación.", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
'Return
mensaje = mensaje + "Estatus Operación " + vbCrLf + " "
Label18.ForeColor = Color.Red
End If
If Me.cmbEstatusOper.SelectedValue = 5 Then
MessageBox.Show("No es posible almacenar una alarma con estatus 'Enviado', este estatus es informativo.", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Return
End If
If cboNacionalidad.SelectedValue Is Nothing Then
'MessageBox.Show("Definir la nacionalidad.", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
'Return
mensaje = mensaje + "Nacionalidad " + vbCrLf + " "
Label15.ForeColor = Color.Red
End If
'If cboProducto.SelectedValue Is Nothing Then
' 'MessageBox.Show("Definir el producto.", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
' 'Return
' mensaje = mensaje + "Producto " + vbCrLf + " "
' Label16.ForeColor = Color.Red
'End If
If cboSucursal.SelectedValue Is Nothing Then
mensaje = mensaje + "Sucursal " + vbCrLf + " "
Label23.ForeColor = Color.Red
End If
If txtCPSucursal.Text.Trim = "" Then
mensaje = mensaje + "Código Postal Sucursal " + vbCrLf + " "
Label24.ForeColor = Color.Red
End If
If cmbEstado.SelectedValue Is Nothing Then
'MessageBox.Show("Definir el Estado.", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
'Return
mensaje = mensaje + "Producto " + vbCrLf + " "
Label12.ForeColor = Color.Red
End If
Dim NombreProducto As String
NombreProducto = cboProducto.Text
If cboProducto.Text = "MERCADO DE CAPITALES" Then
'NombreProducto = "MERCADO DE DINERO"
End If
If mensaje.Length > 0 Then
mensaje = "Campos Obligatorios " + vbCrLf + " " + mensaje
MessageBox.Show(mensaje, "Minds", MessageBoxButtons.OK, MessageBoxIcon.Warning)
Exit Sub
End If
If chk24H.Checked Then
is24Hrs = True
Else
is24Hrs = False
End If
txtNombre.Text = txtNombre.Text.ToUpper()
txtApePaterno.Text = txtApePaterno.Text.ToUpper()
txtApeMaterno.Text = txtApeMaterno.Text.ToUpper()
txtRFC.Text = txtRFC.Text.ToUpper()
txtCURP.Text = txtCURP.Text.ToUpper()
txtDomicilio.Text = txtDomicilio.Text.ToUpper()
txtColonia.Text = txtColonia.Text.ToUpper()
txtTelefono.Text = txtTelefono.Text.ToUpper()
strSQL = "spOperacionesSinTran " & Chr(39) & lblIdPreocupSinTran.Text & Chr(39) & "," & Chr(39) & txtNombre.Text & Chr(39) & ","
If txtApePaterno.Text = "" Then
strSQL = strSQL & Chr(39) & "" & Chr(39) & ","
Else
strSQL = strSQL & Chr(39) & txtApePaterno.Text & Chr(39) & ","
End If
If txtApeMaterno.Text = "" Then
strSQL = strSQL & Chr(39) & "" & Chr(39) & ","
Else
strSQL = strSQL & Chr(39) & txtApeMaterno.Text & Chr(39) & ","
End If
strSQL = strSQL & Chr(39) & txtRFC.Text & Chr(39) & ","
strSQL = strSQL & Chr(39) & txtCURP.Text & Chr(39) & ","
strSQL = strSQL & Chr(39) & dtpFechaNac.Value.Year.ToString & dtpFechaNac.Value.Month.ToString("d2") & dtpFechaNac.Value.Day.ToString("d2") & Chr(39) & ","
strSQL = strSQL & Chr(39) & txtDomicilio.Text & Chr(39) & ","
strSQL = strSQL & Chr(39) & txtColonia.Text & Chr(39) & ","
strSQL = strSQL & Chr(39) & cmbLocalidad.SelectedValue & Chr(39) & ","
strSQL = strSQL & Chr(39) & txtTelefono.Text & Chr(39) & ","
strSQL = strSQL & Chr(39) & cmbActEconom.SelectedValue & Chr(39) & ","
''Controles de la pagina 2
'strSQL = strSQL & Chr(39) & cmbFuncionario.SelectedValue & Chr(39) & ","
strSQL = strSQL & Chr(39) & txtNota.Text & Chr(39) & ","
strSQL = strSQL & Chr(39) & txtRazon.Text & Chr(39) & ","
strSQL = strSQL & Chr(39) & dtpFechaDetecion.Value.Year.ToString & dtpFechaDetecion.Value.Month.ToString("d2") & dtpFechaDetecion.Value.Day.ToString("d2") & Chr(39) & ","
strSQL = strSQL & Chr(39) & cmbEstatusOper.SelectedValue & Chr(39) & ","
'strSQL = strSQL & Chr(39) & NombreProducto & Chr(39) & ","
strSQL = strSQL & "NULL" & ","
strSQL = strSQL & Chr(39) & "PATRON NUEVA INUSUAL" & Chr(39) & ","
strSQL = strSQL & Chr(39) & "INUSUAL" & Chr(39) & ", " & IIf(bProvieneDeRepAnonimo = True, "1", "0") & ","
strSQL = strSQL & Chr(39) & dtpFechaOper.Value.Year.ToString & dtpFechaOper.Value.Month.ToString("d2") & dtpFechaOper.Value.Day.ToString("d2") & Chr(39) & ","
strSQL = strSQL & Chr(39) & cboNacionalidad.SelectedValue & Chr(39) & ","
strSQL = strSQL & Chr(39) & cboSucursal.SelectedValue & Chr(39) & ","
strSQL = strSQL & Chr(39) & txtCPSucursal.Text & Chr(39) & ","
strSQL = strSQL & Chr(39) & plazaSucursalSeleccionada & Chr(39) & ","
strSQL = strSQL & Chr(39) & cmbLocalidad.SelectedValue & Chr(39) & ","
strSQL = strSQL & Chr(39) & cmbTipoPersona.SelectedValue & Chr(39) & ","
strSQL = strSQL & is24Hrs
ClassCom = New clsComplejo
ClassCom.fdtDataSetTabla(strSQL)
If ClassCom.ds.Tables(0).Rows(0)("Resultado") = -1 Then
''Mensaje de error
MessageBox.Show(ClassCom.ds.Tables(0).Rows(0)("MsgError"), "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
'AUDITORIA
Dim ClassAud As New ClassMyUtils
Dim varUser As Long
Dim ClassComodin As New clsComplejo
Dim sAuditoria As String
Dim strNota As String
Dim clCmp As clsComplejo = New clsComplejo
'strNota = clCmp.BuscaValores("nombreproducto", "producto", "id_producto = " & clsVaribles.Id_Producto)
sAuditoria = "Detalle de alarma preocupante sin transacción " &
"; Nombre = " & txtNombre.Text.Trim() &
"; Apellido Paterno = " & txtApePaterno.Text.Trim() &
"; Apellido Materno = " & txtApeMaterno.Text.Trim() &
"; RFC = " & txtRFC.Text.Trim &
"; CURP = " & txtCURP.Text.Trim &
"; Fecha Nacimiento o Constitución = " & dtpFechaNac.Text &
"; Domicilio = " & txtDomicilio.Text.Trim &
"; Colonia = " & txtColonia.Text.Trim &
"; Estado = " & cmbEstado.Text.Trim &
"; Ciudad = " & cmbPlaza.Text.Trim &
"; Telefono = " & txtTelefono.Text.Trim &
"; Act. Económica = " & cmbActEconom.Text.Trim &
"; Fecha Operación = " & dtpFechaOper.Text &
"; País Nacionalidad = " & cboNacionalidad.Text.Trim &
"; Descripción = " & txtNota.Text.Trim.Replace(vbCrLf, " ") &
"; Razón = " & txtRazon.Text.Trim.Replace(vbCrLf, " ") &
"; Fecha detección = " & dtpFechaDetecion.Text &
"; Estatus Operación = " & cmbEstatusOper.Text.Trim()
ClassAud.RT_Auditoria(VariablesGlobales.gblIdUsuario, 126, My.Computer.Name, "Minds Cliente", sAuditoria)
MessageBox.Show("Registro creado o actualizado correctamente.", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
ActualizaGrid()
BtnLimpiar.PerformClick()
'DesBloqueaCtrls()
End If
Catch ex As Exception
MessageBox.Show(ex.Message, "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Try
End Sub
Private Sub DataGrid1_MouseDoubleClick(sender As System.Object, e As System.Windows.Forms.MouseEventArgs)
Dim MiRow As DataRow
Try
Dim is24Hrs As Boolean
'MiRow = DataGrid1.DataSource.Tables(0).Rows(DataGrid1.CurrentRowIndex)
clsVaribles.Id_Transaccion = Me.DataGrid1.Columns("ID").Value
clsVaribles.Id_Producto = Me.DataGrid1.Columns("Id Producto").Value
clsVaribles.Id_Patron = Me.DataGrid1.Columns("Id Patrón").Value
clsVaribles.Id_EstatusTransaccion = Me.DataGrid1.Columns("IDESTATUSTRANSACCION").Value
'clsVaribles.Id_Transaccion = MiRow.Item("ID")
'clsVaribles.Id_Producto = MiRow.Item("Id Producto")
'clsVaribles.Id_Patron = MiRow.Item("Id Patrón")
'clsVaribles.Id_EstatusTransaccion = ("IDESTATUSTRANSACCION")
'lblIdPreocupSinTran.Text = MiRow.Item("idSinTransaccion")
lblIdPreocupSinTran.Text = Me.DataGrid1.Columns("ID").Value
'lblIdPreocupSinTran.Text = MiRow.Item("ID")
txtNombre.Text = Me.DataGrid1.Columns("Nombre").Value
'txtNombre.Text = MiRow.Item("Nombre")
txtApePaterno.Text = Me.DataGrid1.Columns("Apellido Paterno").Value
'txtApePaterno.Text = MiRow.Item("Apellido Paterno")
txtApeMaterno.Text = Me.DataGrid1.Columns("Apellido Materno").Value
'txtApeMaterno.Text = MiRow.Item("Apellido Materno")
txtRFC.Text = Me.DataGrid1.Columns("RFC").Value
'txtRFC.Text = MiRow.Item("RFC")
txtCURP.Text = Me.DataGrid1.Columns("CURP").Value
'txtCURP.Text = MiRow.Item("CURP")
dtpFechaNac.Value = Me.DataGrid1.Columns("Fecha Nacimiento").Value
'dtpFechaNac.Value = MiRow.Item("Fecha Nacimiento")
txtDomicilio.Text = Me.DataGrid1.Columns("Domicilio").Value
'txtDomicilio.Text = MiRow.Item("Domicilio")
txtColonia.Text = Me.DataGrid1.Columns("Colonia").Value
'txtColonia.Text = MiRow.Item("Colonia")
cmbEstado.SelectedValue = Me.DataGrid1.Columns("Id Estado").Value
'cmbEstado.SelectedValue = MiRow.Item("Id Estado")
cargarPlaza()
cboSucursal.SelectedValue = Me.DataGrid1.Columns("idsucursal").Value
'cboSucursal.SelectedValue = MiRow.Item("idsucursal")
txtCPSucursal.Text = Me.DataGrid1.Columns("CodigoPostalSucursal").Value
'txtCPSucursal.Text = MiRow.Item("CodigoPostalSucursal")
cmbPlaza.SelectedValue = Me.DataGrid1.Columns("Ciudad").Value
'cmbPlaza.SelectedValue = MiRow.Item("Ciudad")
txtTelefono.Text = Me.DataGrid1.Columns("Telefono").Value
'txtTelefono.Text = MiRow.Item("Telefono")
cmbActEconom.SelectedValue = Me.DataGrid1.Columns("ACT. ECONOMICA").Value
'cmbActEconom.SelectedValue = MiRow.Item("ACT. ECONOMICA")
'cmbFuncionario.SelectedValue = MiRow.Item("IdAgente")
txtNota.Text = Me.DataGrid1.Columns("Nota").Value
'txtNota.Text = MiRow.Item("Nota")
txtRazon.Text = Me.DataGrid1.Columns("Razon").Value
'txtRazon.Text = MiRow.Item("Razon")
dtpFechaDetecion.Value = Me.DataGrid1.Columns("FECHA DETENCIÓN").Value
'dtpFechaDetecion.Value = MiRow.Item("FECHA DETENCIÓN")
dtpFechaOper.Value = Me.DataGrid1.Columns("FECHA OPERACIÓN").Value
'dtpFechaOper.Value = MiRow.Item("FECHA OPERACIÓN")
cboNacionalidad.SelectedValue = Me.DataGrid1.Columns("Pais Nacionalidad").Value
'cboNacionalidad.SelectedValue = MiRow.Item("Pais Nacionalidad")
is24Hrs = Me.DataGrid1.Columns("24horas").Value
'is24Hrs = MiRow.Item("24horas")
cmbTipoPersona.SelectedValue = Me.DataGrid1.Columns("idTipoPersona").Value
'cmbTipoPersona.SelectedValue = MiRow.Item("idTipoPersona")
cmbLocalidad.SelectedValue = Me.DataGrid1.Columns("idPlaza").Value
'cmbLocalidad.SelectedValue = MiRow.Item("idPlaza")
chk24H.Checked = is24Hrs
'revisar si el estatus obtenido es final,
'si es asi entonces hay que bloquear los controles
'Dim clCmpX As clsComplejo = New clsComplejo
'Dim EsEstadoFinal As Boolean
'EsEstadoFinal = clCmpX.BuscaValores("bEsfinal", "EstatusTransacciones", "id_estatus = " & MiRow.Item("IdEstatusTransaccion"))
'obtener solo el estatus actual y los siguientes
'Dim cargarCbo As New clsComplejo
'cargarCbo.sbLlenaCombo("SELECT ET.Id_Estatus AS clave, ET.CDesc_Estatus AS nombre FROM EstatusTransacciones ET " &
' "INNER JOIN tbl_ReglasEstatusTransaccion RT ON ET.ID_ESTATUS = RT.IDESTATUSFINAL " &
' "WHERE RT.IDESTATUSINICIAL = " & MiRow.Item("IdEstatusTransaccion") & " ORDER BY 1", Me.cmbEstatusOper)
cboProducto.SelectedValue = Me.DataGrid1.Columns("Id Producto").Value
'cboProducto.SelectedValue = MiRow.Item("Id Producto")
cmbEstatusOper.SelectedValue = MiRow.Item("ID ESTATUS TRANSACCIÓN")
If cmbTipoPersona.SelectedValue = 1 Or cmbTipoPersona.SelectedValue = 7 Then
'Persona Moral
If cmbTipoPersona.SelectedValue = 7 Then
lblNombre.Text = "Número de Fideicomiso"
Else
lblNombre.Text = "Denominación o Razón Social"
End If
lblCurp.Visible = False
txtCURP.Visible = False
txtApePaterno.Visible = False
txtApeMaterno.Visible = False
lblPaterno.Visible = False
lblMaterno.Visible = False
txtNombre.Location = New Point(188, 30)
txtNombre.Size = New Size(495, 21)
lblNombre.Location = New Point(5, 33)
lblNombre.Size = New Size(165, 15)
End If
If cmbTipoPersona.SelectedValue = 2 Then
'Persona Fisica
'cmbTipoPersona.SelectedValue = cmbTipoPersona.SelectedValue
lblNombre.Text = "Nombre "
lblCurp.Visible = True
txtCURP.Visible = True
txtApePaterno.Visible = True
lblPaterno.Visible = True
lblMaterno.Visible = True
txtApeMaterno.Visible = True
txtNombre.Location = New Point(112, 20)
txtNombre.Size = New Size(571, 21)
lblNombre.Location = New Point(5, 23)
lblNombre.Size = New Size(52, 15)
End If
If MiRow.Item("ID ESTATUS TRANSACCIÓN") = "4" Or
MiRow.Item("ID ESTATUS TRANSACCIÓN") = "5" Then
BloqueaCtrls()
Else
DesBloqueaCtrls()
End If
CambiaColor()
'If MiRow.Item("OrigenRepAnonimo").ToString() = "True" Then
' txtNota.ReadOnly = True
'Else
' txtNota.ReadOnly = False
'End If
Catch ex As Exception
MessageBox.Show(ex.Message, "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Try
End Sub
Private Sub CambiaColor()
If BtnAlta.Enabled = False Then
BtnAlta.BackColor = Color.DarkGray
Else
BtnAlta.BackColor = Color.Black
End If
If btnRelacionadas.Enabled = False Then
btnRelacionadas.BackColor = Color.DarkGray
Else
btnRelacionadas.BackColor = Color.Black
End If
End Sub
Private Sub ActualizaGrid()
Dim ClassCom As New clsComplejo
Dim sSQL As String
Dim MiDS As New DataSet
Try
sSQL = "SELECT idSinTransaccion ID, IDPRODUCTO [ID PRODUCTO], IDPATRON [ID PATRÓN], IDALARMA [ID ALARMA], PD.NOMBRE, ApePaterno 'APELLIDO PATERNO', ApeMaterno 'APELLIDO MATERNO', "
sSQL = sSQL & " RFC, CURP, FECHANACIMIENTO [FECHA NACIMIENTO], DOMICILIO, COLONIA, CIUDAD, TELEFONO, "
sSQL = sSQL & " ActividadEcon 'ACT. ECONOMICA', NOTA, RAZON, PD.IDESTATUSTRANSACCION [ID ESTATUS TRANSACCIÓN], ET.EstatusAlarma [ESTATUS TRANSACCIÓN], FECHADETECCION [FECHA DETENCIÓN], "
sSQL = sSQL & " CP.PLAZA, CP.IDESTADO [ID ESTADO], CE.ESTADO, PD.PAISNACIONALIDAD [PAIS NACIONALIDAD], PD.FECHAOPERACION [FECHA OPERACIÓN],idsucursal,CodigoPostalSucursal,isnull(PD.es24Horas,0) as '24HORAS',TP.TIPOPERSONA,CP.PLAZA, PD.idTipoPersona,PD.idPlaza"
sSQL = sSQL & " FROM OperacionesSinTran PD "
sSQL = sSQL & " INNER JOIN Cat_Plaza CP ON PD.Ciudad = CP.IdPlaza "
sSQL = sSQL & " INNER JOIN Cat_Estado CE ON CE.IdEstado = CP.IdEstado "
sSQL = sSQL & " INNER JOIN CAT_ESTATUSALARMA ET on ET.IdEstatusAlarma = PD.IdEstatusTransaccion "
sSQL = sSQL & " INNER JOIN CAT_TIPO_ALARMA TA ON PD.IdAlarma=TA.IdTipoAlarma "
sSQL = sSQL & " LEFT JOIN CAT_TIPOPERSONA TP ON TP.IDTIPOPERSONA = PD.idTipoPersona "
sSQL = sSQL & " WHERE TA.Alarma='INUSUAL'"
ClassCom.fdtDataSetTabla(sSQL)
If ClassCom.ds.Tables(0).Rows.Count <> 0 Then
ClassCom.ds.Tables("tabla").Columns("idsucursal").ColumnMapping = MappingType.Hidden
ClassCom.ds.Tables("tabla").Columns("CodigoPostalSucursal").ColumnMapping = MappingType.Hidden
DataGrid1.SetDataBinding(ClassCom.ds, "tabla")
For number As Integer = 0 To DataGrid1.Columns.Count - 1
DataGrid1.Splits(0).DisplayColumns(number).AutoSize()
Next
'DataGrid1.Splits(0).DisplayColumns(32).Width = 0
DataGrid1.Splits(0).DisplayColumns(30).Visible = False
DataGrid1.Splits(0).DisplayColumns(31).Visible = False
'DataGrid1.Splits(0).DisplayColumns(33).Visible = False
End If
Catch ex As Exception
MessageBox.Show(ex.Message, "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Try
End Sub
Private Sub BtnLimpiar_Click(sender As System.Object, e As System.EventArgs) Handles BtnLimpiar.Click
Try
lblIdPreocupSinTran.Text = ""
txtNombre.Text = ""
txtApePaterno.Text = ""
txtApeMaterno.Text = ""
txtRFC.Text = ""
txtCURP.Text = ""
dtpFechaNac.Value = Now.Date
txtDomicilio.Text = ""
txtColonia.Text = ""
cmbEstado.SelectedValue = -1
cmbPlaza.SelectedValue = -1
txtTelefono.Text = ""
cmbActEconom.SelectedValue = -1
'cmbFuncionario.SelectedValue = -1
txtNota.Text = ""
txtNota.ReadOnly = False
txtRazon.Text = ""
dtpFechaDetecion.Value = Now.Date
cmbEstatusOper.SelectedValue = -1
cmbLocalidad.SelectedValue = -1
cmbEstado.SelectedValue = -1
cmbPlaza.SelectedValue = -1
cmbActEconom.SelectedValue = -1
dtpFechaOper.Value = Now.Date
cboNacionalidad.SelectedValue = -1
'cmbFuncionario.SelectedValue = -1
' ''Estatus de la operacion
'Dim cargarCbo As New clsComplejo
'cargarCbo.sbLlenaCombo("spLlenaComboEstatusTransacciones", cmbEstatusOper)
'cargarCbo.sbLlenaCombo("SELECT Id_Estatus as clave, CDesc_Estatus as nombre FROM EstatusTransacciones WHERE Id_Estatus = 0", cmbEstatusOper)
cmbEstatusOper.SelectedIndex = -1
bProvieneDeRepAnonimo = False
cboProducto.SelectedValue = -1
cboSucursal.SelectedValue = -1
txtCPSucursal.Text = ""
DesBloqueaCtrls()
btnRelacionadas.Enabled = False
Catch ex As Exception
MessageBox.Show(ex.Message, "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Try
End Sub
Private Sub BtnImprimir_Click(sender As System.Object, e As System.EventArgs) Handles BtnImprimir.Click
Dim Classcom As New clsComplejo
'Dim oApp As New Excel.Application()
'Dim m_Excel As New Excel.Application
'm_Excel = New Excel.Application
''hago una copia por valor de la tabla
Dim copyDS As DataSet = DataGrid1.DataSource.Copy()
''Classcom.fdtDataSetTabla(clsVaribles.VarSQL)
'GrdPrincipal.SaveLayout( "C:\EXP.XLS")
Try
If copyDS.Tables.Count = 0 Then
MessageBox.Show("Realiza una consulta ", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
If copyDS.Tables(0).Rows.Count = 0 Then
MessageBox.Show("No hay datos para exportar ", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
Dim Resul As DialogResult
Resul = MessageBox.Show("Este proceso puede tardar varios minutos, ¿Deseas continuar? ", "MINDS", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If Resul = DialogResult.Yes Then
'Creo una instancia de la clase aExcel
Dim clsExcel As aExcel = New aExcel
'Obtenemos el nombre o el titulo del form
clsExcel.Titulo = Me.Text
'Utilizo la funcion ExportDataset de la clase aExcel
'REVISAR la siguiente linea
'clsExcel.ExportCSV("Preocupantes sin Transaccion", copyDS) 'Asigno el dataset a exportar
clsExcel.ExportDataset(copyDS)
End If
End If
End If
Catch ex As Exception
MessageBox.Show(ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
Private Sub BloqueaCtrls()
For Each ctrl As Object In Me.Controls
If ctrl.GetType.Name.ToUpper() = "BUTTON" Then
ctrl.Enabled = False
End If
If ctrl.GetType.Name.ToUpper() = "TEXTBOX" Then
ctrl.Enabled = False
End If
If ctrl.GetType.Name.ToUpper() = "GROUPBOX" Then
For Each miControl As Object In ctrl.Controls
If miControl.GetType.Name.ToUpper() = "TEXTBOX" Then
miControl.Enabled = False
End If
Next
End If
If ctrl.GetType.Name.ToUpper() = "TABCONTROL" Then
For Each MiTab As Object In ctrl.Controls
For Each MiTabCtrls As Object In MiTab.Controls
If MiTabCtrls.GetType.Name.ToUpper() = "GROUPBOX" Then
For Each miControl As Object In MiTabCtrls.Controls
If miControl.GetType.Name.ToUpper() = "TEXTBOX" Then
miControl.Enabled = False
End If
If miControl.GetType.Name.ToUpper() = "COMBOBOX" Then
miControl.Enabled = False
End If
If miControl.GetType.Name.ToUpper() = "DATETIMEPICKER" Then
miControl.Enabled = False
End If
Next
End If
Next
Next
End If
Next
BntSalie.Enabled = True
BtnImprimir.Enabled = True
BtnLimpiar.Enabled = True
BtnAlta.BackColor = Color.DarkGray
End Sub
Private Sub DesBloqueaCtrls()
For Each ctrl As Object In Me.Controls
If ctrl.GetType.Name.ToUpper() = "BUTTON" Then
ctrl.Enabled = True
End If
If ctrl.GetType.Name.ToUpper() = "TEXTBOX" Then
ctrl.Enabled = True
End If
If ctrl.GetType.Name.ToUpper() = "GROUPBOX" Then
For Each miControl As Object In ctrl.Controls
If miControl.GetType.Name.ToUpper() = "TEXTBOX" Then
miControl.Enabled = True
End If
Next
End If
If ctrl.GetType.Name.ToUpper() = "TABCONTROL" Then
For Each MiTab As Object In ctrl.Controls
For Each MiTabCtrls As Object In MiTab.Controls
If MiTabCtrls.GetType.Name.ToUpper() = "GROUPBOX" Then
For Each miControl As Object In MiTabCtrls.Controls
If miControl.GetType.Name.ToUpper() = "TEXTBOX" Then
miControl.Enabled = True
End If
If miControl.GetType.Name.ToUpper() = "COMBOBOX" Then
miControl.Enabled = True
End If
If miControl.GetType.Name.ToUpper() = "DATETIMEPICKER" Then
miControl.Enabled = True
End If
Next
End If
Next
Next
End If
Next
dtpFechaDetecion.Enabled = False
BtnAlta.BackColor = Color.Black
End Sub
Private Sub cmbEstado_DropDownClosed(sender As System.Object, e As System.EventArgs) Handles cmbEstado.DropDownClosed
cargarPlaza()
End Sub
Private Sub cargarPlaza()
Dim ClassCom As New clsComplejo
Dim sSQL As String
Try
If cmbEstado.SelectedValue <> Nothing Then
'If cmbEstado.SelectedValue = "33" Then
' sSQL = "select Idplaza as Clave, plaza Nombre from cat_plaza where AliasId = '99999999'"
' ClassCom.sbLlenaCombo(sSQL, cmbPlaza)
' cmbPlaza.SelectedIndex = -1
' 'Else
sSQL = "select Idplaza as Clave, plaza Nombre from cat_plaza where IdEstado =" & cmbEstado.SelectedValue & " ORDER BY plaza"
'sSQL = "select idsucursal,CodigoPostalSucursal from OperacionesSinTran where idSinTransaccion =" & clsVaribles.Id_Transaccion
ClassCom.sbLlenaCombo(sSQL, cmbPlaza)
cmbPlaza.SelectedIndex = -1
'End If
Else
addRegistro()
cmbPlaza.SelectedIndex = 0
End If
Catch ex As Exception
MessageBox.Show(ex.Message, "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Try
End Sub
Private Sub cargarSucursal()
Dim ClassCom As New clsComplejo
Dim sSQL As String
Try
sSQL = "select IDSUCURSAL as Clave, NOMBRESUCURSAL Nombre from CAT_SUCURSAL order by 1 asc"
ClassCom.sbLlenaCombo(sSQL, cboSucursal)
cboSucursal.SelectedIndex = -1
Catch ex As Exception
MessageBox.Show(ex.Message, "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Try
End Sub
Private Sub addRegistro()
cmbPlaza.DataSource = Nothing
cmbPlaza.Items.Clear()
cmbPlaza.Refresh()
cmbPlaza.Items.Add("Elija primero Entidad")
End Sub
Private Sub cboSucursal_SelectionChangeCommitted(sender As Object, e As EventArgs) Handles cboSucursal.SelectionChangeCommitted
txtCPSucursal.Text = ObtenerCPSucursal()
End Sub
Private Sub btnRelacionadas_Click(sender As Object, e As EventArgs) Handles btnRelacionadas.Click
Dim frmDetalles As PersonasRelacionadas = New PersonasRelacionadas
frmDetalles.IdTipoalarma = 2 '--Inusual
frmDetalles.ShowDialog()
End Sub
Private Sub cmbEstado_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbEstado.SelectedIndexChanged
'cargarPlaza()
End Sub
Private Sub cmbTipoPersona_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbTipoPersona.SelectedIndexChanged
End Sub
Private Sub cmbTipoPersona_SelectionChangeCommitted(sender As Object, e As EventArgs) Handles cmbTipoPersona.SelectionChangeCommitted
If cmbTipoPersona.SelectedValue = 1 Or cmbTipoPersona.SelectedValue = 7 Then
'Persona Moral
If cmbTipoPersona.SelectedValue = 7 Then
lblNombre.Text = "Número de Fideicomiso"
Else
lblNombre.Text = "Denominación o Razon Social"
End If
lblCurp.Visible = False
txtCURP.Visible = False
txtApePaterno.Visible = False
txtApeMaterno.Visible = False
lblPaterno.Visible = False
lblMaterno.Visible = False
txtNombre.Location = New Point(188, 30)
txtNombre.Size = New Size(495, 21)
lblNombre.Location = New Point(5, 33)
lblNombre.Size = New Size(165, 15)
End If
If cmbTipoPersona.SelectedValue = 2 Then
'Persona Fisica
'cmbTipoPersona.SelectedValue = cmbTipoPersona.SelectedValue
lblNombre.Text = "Nombre "
lblCurp.Visible = True
txtCURP.Visible = True
txtApePaterno.Visible = True
lblPaterno.Visible = True
lblMaterno.Visible = True
txtApeMaterno.Visible = True
txtNombre.Location = New Point(112, 20)
txtNombre.Size = New Size(571, 21)
lblNombre.Location = New Point(5, 23)
lblNombre.Size = New Size(52, 15)
End If
End Sub
Private Sub cmbEstado_SelectionChangeCommitted(sender As Object, e As EventArgs) Handles cmbEstado.SelectionChangeCommitted
Dim cargarCbo As New clsComplejo
Dim sSQL As String
cargarCbo = Nothing
cargarCbo = New clsComplejo
cargarCbo.sbLlenaCombo("select IDPLAZA clave, PLAZA nombre FROM CAT_PLAZA where activo = 1 and IDESTADO=" & cmbEstado.SelectedValue & " ", cmbLocalidad)
cmbLocalidad.SelectedIndex = -1
End Sub
Private Sub DataGrid1_DoubleClick(sender As Object, e As EventArgs) Handles DataGrid1.DoubleClick
Dim cargarCbo As New clsComplejo
Dim sSQL As String
cargarCbo = Nothing
cargarCbo = New clsComplejo
Try
Dim is24Hrs As Boolean
'MiRow = DataGrid1.DataSource.Tables(0).Rows(DataGrid1.CurrentRowIndex)
clsVaribles.Id_Transaccion = Me.DataGrid1.Columns("ID").Value
clsVaribles.Id_Producto = Me.DataGrid1.Columns("Id Producto").Value
clsVaribles.Id_Patron = Me.DataGrid1.Columns("Id Patrón").Value
'clsVaribles.Id_EstatusTransaccion = Me.DataGrid1.Columns("IDESTATUSTRANSACCION").Value
'clsVaribles.Id_Transaccion = MiRow.Item("ID")
'clsVaribles.Id_Producto = MiRow.Item("Id Producto")
'clsVaribles.Id_Patron = MiRow.Item("Id Patrón")
clsVaribles.Id_EstatusTransaccion = ("IDESTATUSTRANSACCION")
'lblIdPreocupSinTran.Text = MiRow.Item("idSinTransaccion")
lblIdPreocupSinTran.Text = Me.DataGrid1.Columns("ID").Value
'lblIdPreocupSinTran.Text = MiRow.Item("ID")
txtNombre.Text = Me.DataGrid1.Columns("Nombre").Value
'txtNombre.Text = MiRow.Item("Nombre")
txtApePaterno.Text = Me.DataGrid1.Columns("Apellido Paterno").Value
'txtApePaterno.Text = MiRow.Item("Apellido Paterno")
txtApeMaterno.Text = Me.DataGrid1.Columns("Apellido Materno").Value
'txtApeMaterno.Text = MiRow.Item("Apellido Materno")
txtRFC.Text = Me.DataGrid1.Columns("RFC").Value
'txtRFC.Text = MiRow.Item("RFC")
txtCURP.Text = Me.DataGrid1.Columns("CURP").Value
'txtCURP.Text = MiRow.Item("CURP")
dtpFechaNac.Value = Me.DataGrid1.Columns("Fecha Nacimiento").Value
'dtpFechaNac.Value = MiRow.Item("Fecha Nacimiento")
txtDomicilio.Text = Me.DataGrid1.Columns("Domicilio").Value
'txtDomicilio.Text = MiRow.Item("Domicilio")
txtColonia.Text = Me.DataGrid1.Columns("Colonia").Value
'txtColonia.Text = MiRow.Item("Colonia")
cmbEstado.SelectedValue = Me.DataGrid1.Columns("Id Estado").Value
'cmbEstado.SelectedValue = MiRow.Item("Id Estado")
cargarPlaza()
cboSucursal.SelectedValue = Me.DataGrid1.Columns("idsucursal").Value
'cboSucursal.SelectedValue = MiRow.Item("idsucursal")
txtCPSucursal.Text = Me.DataGrid1.Columns("CodigoPostalSucursal").Value
'txtCPSucursal.Text = MiRow.Item("CodigoPostalSucursal")
cmbPlaza.SelectedValue = Me.DataGrid1.Columns("Ciudad").Value
'cmbPlaza.SelectedValue = MiRow.Item("Ciudad")
txtTelefono.Text = Me.DataGrid1.Columns("Telefono").Value
'txtTelefono.Text = MiRow.Item("Telefono")
cmbActEconom.SelectedValue = Me.DataGrid1.Columns("ACT. ECONOMICA").Value
'cmbActEconom.SelectedValue = MiRow.Item("ACT. ECONOMICA")
'cmbFuncionario.SelectedValue = MiRow.Item("IdAgente")
txtNota.Text = Me.DataGrid1.Columns("Nota").Value
'txtNota.Text = MiRow.Item("Nota")
txtRazon.Text = Me.DataGrid1.Columns("Razon").Value
'txtRazon.Text = MiRow.Item("Razon")
dtpFechaDetecion.Value = Me.DataGrid1.Columns("FECHA DETENCIÓN").Value
'dtpFechaDetecion.Value = MiRow.Item("FECHA DETENCIÓN")
dtpFechaOper.Value = Me.DataGrid1.Columns("FECHA OPERACIÓN").Value
'dtpFechaOper.Value = MiRow.Item("FECHA OPERACIÓN")
cboNacionalidad.SelectedValue = Me.DataGrid1.Columns("Pais Nacionalidad").Value
'cboNacionalidad.SelectedValue = MiRow.Item("Pais Nacionalidad")
is24Hrs = Me.DataGrid1.Columns("24horas").Value
'is24Hrs = MiRow.Item("24horas")
cmbTipoPersona.SelectedValue = Me.DataGrid1.Columns("idTipoPersona").Value
'cmbTipoPersona.SelectedValue = MiRow.Item("idTipoPersona")
cargarCbo.sbLlenaCombo("select IDPLAZA clave, PLAZA nombre FROM CAT_PLAZA where activo = 1 and IDESTADO=" & cmbEstado.SelectedValue & " ", cmbLocalidad)
cmbLocalidad.SelectedIndex = -1
cmbLocalidad.SelectedValue = Me.DataGrid1.Columns("idPlaza").Value
'cmbLocalidad.SelectedValue = MiRow.Item("idPlaza")
chk24H.Checked = is24Hrs
'revisar si el estatus obtenido es final,
'si es asi entonces hay que bloquear los controles
'Dim clCmpX As clsComplejo = New clsComplejo
'Dim EsEstadoFinal As Boolean
'EsEstadoFinal = clCmpX.BuscaValores("bEsfinal", "EstatusTransacciones", "id_estatus = " & MiRow.Item("IdEstatusTransaccion"))
'obtener solo el estatus actual y los siguientes
'Dim cargarCbo As New clsComplejo
'cargarCbo.sbLlenaCombo("SELECT ET.Id_Estatus AS clave, ET.CDesc_Estatus AS nombre FROM EstatusTransacciones ET " &
' "INNER JOIN tbl_ReglasEstatusTransaccion RT ON ET.ID_ESTATUS = RT.IDESTATUSFINAL " &
' "WHERE RT.IDESTATUSINICIAL = " & MiRow.Item("IdEstatusTransaccion") & " ORDER BY 1", Me.cmbEstatusOper)
cboProducto.SelectedValue = Me.DataGrid1.Columns("Id Producto").Value
'cboProducto.SelectedValue = MiRow.Item("Id Producto")
cmbEstatusOper.SelectedValue = Me.DataGrid1.Columns("ID ESTATUS TRANSACCIÓN").Value
'cmbEstatusOper.SelectedValue = MiRow.Item("ID ESTATUS TRANSACCIÓN")
If cmbTipoPersona.SelectedValue = 1 Or cmbTipoPersona.SelectedValue = 7 Then
'Persona Moral
If cmbTipoPersona.SelectedValue = 7 Then
lblNombre.Text = "Número de Fideicomiso"
Else
lblNombre.Text = "Denominación o Razon Social"
End If
lblCurp.Visible = False
txtCURP.Visible = False
txtApePaterno.Visible = False
txtApeMaterno.Visible = False
lblPaterno.Visible = False
lblMaterno.Visible = False
txtNombre.Location = New Point(188, 30)
txtNombre.Size = New Size(495, 21)
lblNombre.Location = New Point(5, 33)
lblNombre.Size = New Size(165, 15)
End If
If cmbTipoPersona.SelectedValue = 2 Then
'Persona Fisica
'cmbTipoPersona.SelectedValue = cmbTipoPersona.SelectedValue
lblNombre.Text = "Nombre "
lblCurp.Visible = True
txtCURP.Visible = True
txtApePaterno.Visible = True
lblPaterno.Visible = True
lblMaterno.Visible = True
txtApeMaterno.Visible = True
txtNombre.Location = New Point(112, 20)
txtNombre.Size = New Size(571, 21)
lblNombre.Location = New Point(5, 23)
lblNombre.Size = New Size(52, 15)
End If
If DataGrid1.Columns("ID ESTATUS TRANSACCIÓN").Value = "4" Or
DataGrid1.Columns("ID ESTATUS TRANSACCIÓN").Value = "5" Then
BloqueaCtrls()
Else
DesBloqueaCtrls()
End If
'If MiRow.Item("ID ESTATUS TRANSACCIÓN") = "4" Or
' MiRow.Item("ID ESTATUS TRANSACCIÓN") = "5" Then
' BloqueaCtrls()
'Else
' DesBloqueaCtrls()
'End If
CambiaColor()
'If MiRow.Item("OrigenRepAnonimo").ToString() = "True" Then
' txtNota.ReadOnly = True
'Else
' txtNota.ReadOnly = False
'End If
Catch ex As Exception
MessageBox.Show(ex.Message, "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Try
End Sub
Private Sub panel2_Paint(sender As Object, e As PaintEventArgs) Handles panel2.Paint
End Sub
End Class