1423 lines
75 KiB
VB.net
1423 lines
75 KiB
VB.net
Imports System.Xml
|
|
Imports System.IO
|
|
Public Class FrmInformes
|
|
Private VIDInf As Integer = 0
|
|
Private Sub FrmInformes_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
|
Dim ColCheck As New DataGridViewCheckBoxColumn
|
|
CargaComboOrganismo()
|
|
CargaComboinstitucion()
|
|
CargaComboTipoVigencia()
|
|
CargaComboPaisU()
|
|
CargaComboPaisS()
|
|
CargaGridA("A")
|
|
DgvInformes.Columns.Insert(23, ColCheck)
|
|
ColCheck.HeaderText = "ENVIADO"
|
|
ColCheck.Name = "enviado"
|
|
DgvInformes.Refresh()
|
|
DgvInformes.Columns(0).Visible = False
|
|
DgvInformes.Columns(4).Visible = False
|
|
DgvInformes.Columns(5).Visible = False
|
|
DgvInformes.Columns(6).Visible = False
|
|
DgvInformes.Columns(8).Visible = False
|
|
DgvInformes.Columns(9).Visible = False
|
|
DgvInformes.Columns(10).Visible = False
|
|
DgvInformes.Columns(11).Visible = False
|
|
DgvInformes.Columns(12).Visible = False
|
|
DgvInformes.Columns(13).Visible = False
|
|
DgvInformes.Columns(14).Visible = False
|
|
DgvInformes.Columns(15).Visible = False
|
|
DgvInformes.Columns(16).Visible = False
|
|
DgvInformes.Columns(17).Visible = False
|
|
DgvInformes.Columns(18).Visible = False
|
|
DgvInformes.Columns(19).Visible = False
|
|
DgvInformes.Columns(20).Visible = False
|
|
DgvInformes.Columns(22).Visible = False
|
|
DgvInformes.Columns(23).Visible = False
|
|
RDBUnificado.Checked = True
|
|
End Sub
|
|
Private Sub RDBUnificado_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles RDBUnificado.CheckedChanged
|
|
If RDBUnificado.Checked Then
|
|
GRPDomicilioSeparado.Visible = False
|
|
GRPDomicilioUnificado.Visible = True
|
|
If CmbPaisU.SelectedIndex = -1 Then
|
|
CmbPaisU.SelectedIndex = 0
|
|
End If
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub RDBSeparado_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles RDBSeparado.CheckedChanged
|
|
If RDBSeparado.Checked Then
|
|
GRPDomicilioUnificado.Visible = False
|
|
GRPDomicilioSeparado.Visible = True
|
|
If CmbPaisS.SelectedIndex = -1 Then
|
|
CmbPaisS.SelectedIndex = 0
|
|
End If
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub GRPDomicilioSeparado_Enter(sender As System.Object, e As System.EventArgs) Handles GRPDomicilioSeparado.Enter
|
|
|
|
End Sub
|
|
|
|
Private Sub TextBox13_TextChanged(sender As System.Object, e As System.EventArgs) Handles TxtNumIntS.TextChanged
|
|
If CaracteresNoValidos(TxtNumIntS.Text, 4) = True Then
|
|
MsgBox("Existen caracteres invalidos, verifique por favor", MsgBoxStyle.Exclamation)
|
|
TxtNumIntS.Text = ""
|
|
End If
|
|
End Sub
|
|
Private Sub CargaComboOrganismo()
|
|
Dim Classcom As New clsComplejo
|
|
Classcom.sbLlenaCombo("select Clave,CLAVE + ' ' + Nombre AS NOMBRE from IEF_CATORGANISMOS", Me.CmbOrg)
|
|
End Sub
|
|
Private Sub CargaComboinstitucion()
|
|
Dim Classcom As New clsComplejo
|
|
Classcom.sbLlenaCombo("select clave,CLAVE + ' ' + nombre AS NOMBRE from IEF_CATENTFIN", Me.CmbInst)
|
|
End Sub
|
|
Private Sub CargaComboTipoVigencia()
|
|
Dim Classcom As New clsComplejo
|
|
Classcom.sbLlenaCombo("select clave, nombre from IEF_TIPOVIGENCIA", Me.CmbVigencia)
|
|
End Sub
|
|
Private Sub CargaComboPaisU()
|
|
Dim Classcom As New clsComplejo
|
|
Classcom.sbLlenaCombo("select ISO AS CLAVE, PAIS AS NOMBRE from CAT_PAIS WHERE LEN(ISO) = 2", Me.CmbPaisU)
|
|
End Sub
|
|
Private Sub CargaComboPaisS()
|
|
Dim Classcom As New clsComplejo
|
|
Classcom.sbLlenaCombo("select ISO AS CLAVE, PAIS AS NOMBRE from CAT_PAIS WHERE LEN(ISO) = 2", Me.CmbPaisS)
|
|
End Sub
|
|
Private Sub CargaGridA(Estatus As String)
|
|
Dim Classcom As New clsComplejo
|
|
Dim ClassCatalogos As New ClassCatalogos
|
|
Dim SQL As String
|
|
Dim FILA As DataRow
|
|
Dim Parametros As New ArrayList
|
|
Dim DsDatos As New DataSet
|
|
Try
|
|
'LLENA GRID
|
|
'SQL = "SELECT DTDIAINHABIL, ID, DIA, MES, ANO FROM CAT_DIASINHABILES WHERE ANO = '" & Anio & "'"
|
|
SQL = "SELECT IDINFORME,ID_ORG_REGULADOR AS ORGANISMO,CLAVE_INSTITUCION AS INSTITUCION,FECHA_FIRMA AS ""FECHA FIRMA"",TIPO_VIGENCIA,INICIO_VIGENCIA,FIN_VIGENCIA,OBJETO_CONVENIO AS ""OBJETO DEL CONVENIO"",CLAVE_PAIS,UNIFICADO,DOMICILIO_UNIFICADO,CIUDAD_POBLACIONU,COLONIAU,CODIGO_POSTALU,ESTADO_PROVINCIAS,CODIGO_POSTALS,CIUDAD_POBLACIONS,COLONIAS,CALLES,NUM_EXTS,NUM_INTS,NOM_ENT_FIN_EXT AS ""ENTIDAD FINANCIERA EXTRANJERA"",ESTATUS FROM IEF_INFORMES WHERE ESTATUS = '" & Estatus & "'"
|
|
If ChkHistoria.Checked = True Then
|
|
SQL = SQL & " OR ESTATUS = 'E'"
|
|
End If
|
|
DsDatos = Classcom.fdtDataSet(SQL)
|
|
If DsDatos.Tables(0).Rows.Count >= 0 Then
|
|
DgvInformes.DataSource = DsDatos.Tables(0)
|
|
If DsDatos.Tables(0).Rows.Count > 0 Then
|
|
DgvInformes.CurrentCell = DgvInformes.Rows(0).Cells("ORGANISMO")
|
|
DgvInformes.CurrentRow.Selected = True
|
|
End If
|
|
'DgvInformes.Columns(0).Visible = False
|
|
'DgvInformes.Columns(4).Visible = False
|
|
'DgvInformes.Columns(5).Visible = False
|
|
'DgvInformes.Columns(6).Visible = False
|
|
'DgvInformes.Columns(8).Visible = False
|
|
'DgvInformes.Columns(9).Visible = False
|
|
'DgvInformes.Columns(10).Visible = False
|
|
'DgvInformes.Columns(11).Visible = False
|
|
'DgvInformes.Columns(12).Visible = False
|
|
'DgvInformes.Columns(13).Visible = False
|
|
'DgvInformes.Columns(14).Visible = False
|
|
'DgvInformes.Columns(15).Visible = False
|
|
'DgvInformes.Columns(16).Visible = False
|
|
'DgvInformes.Columns(17).Visible = False
|
|
'DgvInformes.Columns(18).Visible = False
|
|
'DgvInformes.Columns(19).Visible = False
|
|
'DgvInformes.Columns(20).Visible = False
|
|
'DgvInformes.Columns(22).Visible = False
|
|
If Estatus = "C" Then
|
|
For Each row As DataGridViewRow In DgvInformes.Rows
|
|
If row.Cells("ESTATUS").Value = "E" Then
|
|
row.Cells("ENVIADO").Value = 1
|
|
End If
|
|
Next
|
|
End If
|
|
End If
|
|
Catch ex As Exception
|
|
MessageBox.Show("Error al cargar llenar Grid" & ex.Message, "Minds", MessageBoxButtons.OK, MessageBoxIcon.Warning)
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub BtnGuardar_Click(sender As System.Object, e As System.EventArgs) Handles BtnGuardar.Click
|
|
Dim strSQLComodin As String
|
|
Dim liId As Integer
|
|
Dim ClassAud As New ClassMyUtils
|
|
Dim varUser As Long
|
|
Dim ClassComodin As New clsComplejo
|
|
Dim Parametros As New ArrayList
|
|
Dim Exist As Boolean = False
|
|
Dim Sql As String = ""
|
|
Dim FechaGuardar As String = ""
|
|
Dim Fechaok As String = ""
|
|
Dim Unificado As String
|
|
Dim ClavePais As String
|
|
Dim Classcom As New clsComplejo
|
|
Dim DsDatos As New DataSet
|
|
'VALIDACION DE CAMPOS TO_DATE('" & FechaGuardar & "','dd/MM/yyyy')
|
|
Try
|
|
|
|
If RDBUnificado.Checked = True Then
|
|
Unificado = "1"
|
|
ClavePais = CmbPaisU.SelectedValue
|
|
End If
|
|
If RDBSeparado.Checked = True Then
|
|
Unificado = "0"
|
|
ClavePais = CmbPaisS.SelectedValue
|
|
End If
|
|
|
|
If VIDInf = 0 Then
|
|
Sql = "INSERT INTO IEF_INFORMES (IDINFORME,ID_ORG_REGULADOR,CLAVE_INSTITUCION,FECHA_FIRMA,TIPO_VIGENCIA,INICIO_VIGENCIA,FIN_VIGENCIA,OBJETO_CONVENIO,CLAVE_PAIS,UNIFICADO,DOMICILIO_UNIFICADO,CIUDAD_POBLACIONU,COLONIAU,CODIGO_POSTALU,ESTADO_PROVINCIAS,CODIGO_POSTALS,CIUDAD_POBLACIONS,COLONIAS,CALLES,NUM_EXTS,NUM_INTS,NOM_ENT_FIN_EXT,ESTATUS) " &
|
|
"SELECT ISNULL(MAX(IDINFORME),0) + 1,'" & CmbOrg.SelectedValue & "','" & CmbInst.SelectedValue & "', CONVERT(DATETIME,'" & DtpFechaConvenio.Value.ToString("dd-MM-yyyy") & "', 103),'" & CmbVigencia.SelectedValue & "', CONVERT(DATETIME,'" & DtpFechaIni.Value.ToString("dd-MM-yyyy") & "', 103), CONVERT(DATETIME,'" & DtpFechaFin.Value.ToString("dd-MM-yyyy") & "', 103)," &
|
|
"'" & TxtObjeto.Text.Replace("'", "''") & "','" & ClavePais & "','" & Unificado & "','" & TxtDomicilioU.Text.Replace("'", "''") & "','" & TxtCiudadU.Text.Replace("'", "''") & "','" & TxtColoniaU.Text.Replace("'", "''") & "','" & TxtCPU.Text.Replace("'", "''") & "','" & TxtEstadoS.Text.Replace("'", "''") & "','" & TxtCPS.Text.Replace("'", "''") & "','" & TxtCiudadS.Text.Replace("'", "''") & "','" & TxtColoniaS.Text.Replace("'", "''") & "','" & TxtCalleS.Text.Replace("'", "''") & "','" & TxtNumExtS.Text.Replace("'", "''") & "','" & TxtNumIntS.Text.Replace("'", "''") & "','" & TxtNombreEFE.Text.Replace("'", "''") & "','A' FROM IEF_INFORMES"
|
|
Else
|
|
Sql = "UPDATE IEF_INFORMES SET ID_ORG_REGULADOR='" & CmbOrg.SelectedValue & "',CLAVE_INSTITUCION='" & CmbInst.SelectedValue & "',FECHA_FIRMA= CONVERT(DATETIME,'" & DtpFechaConvenio.Value.ToString("dd-MM-yyyy") & "', 103),TIPO_VIGENCIA= '" & CmbVigencia.SelectedValue & "',INICIO_VIGENCIA= CONVERT(DATETIME,'" & DtpFechaIni.Value.ToString("dd-MM-yyyy") & "', 103),FIN_VIGENCIA= CONVERT(DATETIME,'" & DtpFechaFin.Value.ToString("dd-MM-yyyy") & "', 103),OBJETO_CONVENIO= '" & TxtObjeto.Text.Replace("'", "''") & "',CLAVE_PAIS= '" & ClavePais & "',UNIFICADO= '" & Unificado & "',DOMICILIO_UNIFICADO= '" & TxtDomicilioU.Text.Replace("'", "''") & "',CIUDAD_POBLACIONU= '" & TxtCiudadU.Text.Replace("'", "''") & "',COLONIAU='" & TxtColoniaU.Text.Replace("'", "''") & "',CODIGO_POSTALU= '" & TxtCPU.Text.Replace("'", "''") & "',ESTADO_PROVINCIAS= '" & TxtEstadoS.Text.Replace("'", "''") & "',CODIGO_POSTALS='" & TxtCPS.Text.Replace("'", "''") & "',CIUDAD_POBLACIONS= '" & TxtCiudadS.Text.Replace("'", "''") & "',COLONIAS= '" & TxtColoniaS.Text.Replace("'", "''") & "',CALLES='" & TxtCalleS.Text.Replace("'", "''") & "',NUM_EXTS='" & TxtNumExtS.Text.Replace("'", "''") & "',NUM_INTS='" & TxtNumIntS.Text & "',NOM_ENT_FIN_EXT='" & TxtNombreEFE.Text.Replace("'", "''") & "' WHERE IDINFORME= " & VIDInf
|
|
End If
|
|
ClassComodin.sbModifica2(Sql)
|
|
|
|
If VIDInf = 0 Then
|
|
Sql = "SELECT MAX(IDINFORME) FROM IEF_INFORMES"
|
|
DsDatos = Classcom.fdtDataSet(Sql)
|
|
VIDInf = DsDatos.Tables(0).Rows(0)(0)
|
|
End If
|
|
|
|
Sql = "DELETE FROM IEF_CARGOSAUT WHERE IDINFORME= " & VIDInf
|
|
ClassComodin.sbModifica2(Sql)
|
|
|
|
For Each row As DataGridViewRow In DgvCargos.Rows
|
|
Sql = "INSERT INTO IEF_CARGOSAUT (IDINFORME,CARGO,TIPO) " &
|
|
" VALUES (" & VIDInf & ",'" & row.Cells("CARGO").Value.ToString.Replace("'", "''") & "','1')"
|
|
ClassComodin.sbModifica2(Sql)
|
|
Next
|
|
|
|
For Each row As DataGridViewRow In dgvCargosE.Rows
|
|
Sql = "INSERT INTO IEF_CARGOSAUT (IDINFORME,CARGO,TIPO) " &
|
|
" VALUES (" & VIDInf & ",'" & row.Cells("CARGOE").Value.ToString.Replace("'", "''") & "','2')"
|
|
ClassComodin.sbModifica2(Sql)
|
|
Next
|
|
|
|
If ChkHistoria.Checked = True Then
|
|
CargaGridA("C")
|
|
Else
|
|
CargaGridA("A")
|
|
End If
|
|
|
|
MessageBox.Show("Operacion Satisfactoria ", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information)
|
|
Catch ex As Exception
|
|
MessageBox.Show("Error al grabar Datos" & ex.Message, "Minds", MessageBoxButtons.OK, MessageBoxIcon.Warning)
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub DgvInformes_CellContentClick(sender As System.Object, e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DgvInformes.CellContentClick
|
|
|
|
End Sub
|
|
|
|
Private Sub DgvInformes_CellLeave(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DgvInformes.CellLeave
|
|
|
|
End Sub
|
|
|
|
Private Sub DgvInformes_CellValueChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DgvInformes.CellValueChanged
|
|
|
|
End Sub
|
|
|
|
Private Sub DgvInformes_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DgvInformes.Click
|
|
Dim Classcom As New clsComplejo
|
|
Dim ClassCatalogos As New ClassCatalogos
|
|
Dim SQL As String
|
|
Dim FILA As DataRow
|
|
Dim Parametros As New ArrayList
|
|
Dim DsDatos As New DataSet
|
|
Dim DsDatosP As New DataSet
|
|
Dim DsDatosPE As New DataSet
|
|
Dim UltRen As Integer
|
|
Dim DT As New DataGridViewRow
|
|
Dim DTE As New DataGridViewRow
|
|
Try
|
|
If DgvInformes.Rows.Count > 0 Then
|
|
Limpiar()
|
|
'LLENA GRID
|
|
'SQL = "SELECT DTDIAINHABIL, ID, DIA, MES, ANO FROM CAT_DIASINHABILES WHERE ANO = '" & Anio & "'"
|
|
SQL = "SELECT IDINFORME,ID_ORG_REGULADOR,CLAVE_INSTITUCION,FECHA_FIRMA,TIPO_VIGENCIA,INICIO_VIGENCIA,FIN_VIGENCIA,OBJETO_CONVENIO,CLAVE_PAIS,UNIFICADO,DOMICILIO_UNIFICADO,CIUDAD_POBLACIONU,COLONIAU,CODIGO_POSTALU,ESTADO_PROVINCIAS,CODIGO_POSTALS,CIUDAD_POBLACIONS,COLONIAS,CALLES,NUM_EXTS,NUM_INTS,NOM_ENT_FIN_EXT,ESTATUS FROM IEF_INFORMES WHERE IDINFORME = '" & DgvInformes.CurrentRow.Cells("IDINFORME").Value & "'"
|
|
DsDatos = Classcom.fdtDataSet(SQL)
|
|
VIDInf = DsDatos.Tables(0).Rows(0)("IDINFORME")
|
|
CmbOrg.SelectedValue = DsDatos.Tables(0).Rows(0)("ID_ORG_REGULADOR")
|
|
CmbInst.SelectedValue = DsDatos.Tables(0).Rows(0)("CLAVE_INSTITUCION")
|
|
DtpFechaConvenio.Value = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("FECHA_FIRMA")), "", DsDatos.Tables(0).Rows(0)("FECHA_FIRMA"))
|
|
CmbVigencia.SelectedValue = "0" & DsDatos.Tables(0).Rows(0)("TIPO_VIGENCIA")
|
|
If CmbVigencia.SelectedValue = "02" Then
|
|
DtpFechaIni.Value = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("INICIO_VIGENCIA")), "", DsDatos.Tables(0).Rows(0)("INICIO_VIGENCIA"))
|
|
DtpFechaFin.Value = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("FIN_VIGENCIA")), "", DsDatos.Tables(0).Rows(0)("FIN_VIGENCIA"))
|
|
End If
|
|
TxtObjeto.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("OBJETO_CONVENIO")), "", DsDatos.Tables(0).Rows(0)("OBJETO_CONVENIO"))
|
|
TxtNombreEFE.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("NOM_ENT_FIN_EXT")), "", DsDatos.Tables(0).Rows(0)("NOM_ENT_FIN_EXT"))
|
|
If IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("UNIFICADO")), -1, DsDatos.Tables(0).Rows(0)("UNIFICADO")) = 1 Then
|
|
RDBUnificado.Checked = True
|
|
ElseIf IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("UNIFICADO")), -1, DsDatos.Tables(0).Rows(0)("UNIFICADO")) = 2 Then
|
|
RDBSeparado.Checked = True
|
|
Else
|
|
RDBUnificado.Checked = False
|
|
RDBSeparado.Checked = False
|
|
GRPDomicilioUnificado.Visible = False
|
|
GRPDomicilioSeparado.Visible = False
|
|
End If
|
|
TxtDomicilioU.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("DOMICILIO_UNIFICADO")), "", DsDatos.Tables(0).Rows(0)("DOMICILIO_UNIFICADO"))
|
|
TxtCPU.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("CODIGO_POSTALU")), "", DsDatos.Tables(0).Rows(0)("CODIGO_POSTALU"))
|
|
CmbPaisU.SelectedValue = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("CLAVE_PAIS")), "", DsDatos.Tables(0).Rows(0)("CLAVE_PAIS"))
|
|
TxtCiudadU.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("CIUDAD_POBLACIONU")), "", DsDatos.Tables(0).Rows(0)("CIUDAD_POBLACIONU"))
|
|
TxtColoniaU.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("COLONIAU")), "", DsDatos.Tables(0).Rows(0)("COLONIAU"))
|
|
TxtCalleS.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("CALLES")), "", DsDatos.Tables(0).Rows(0)("CALLES"))
|
|
TxtNumExtS.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("NUM_EXTS")), "", DsDatos.Tables(0).Rows(0)("NUM_EXTS"))
|
|
TxtNumIntS.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("NUM_INTS")), "", DsDatos.Tables(0).Rows(0)("NUM_INTS"))
|
|
TxtCPS.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("CODIGO_POSTALS")), "", DsDatos.Tables(0).Rows(0)("CODIGO_POSTALS"))
|
|
CmbPaisS.SelectedValue = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("CLAVE_PAIS")), "", DsDatos.Tables(0).Rows(0)("CLAVE_PAIS"))
|
|
TxtEstadoS.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("ESTADO_PROVINCIAS")), "", DsDatos.Tables(0).Rows(0)("ESTADO_PROVINCIAS"))
|
|
TxtCiudadS.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("CIUDAD_POBLACIONS")), "", DsDatos.Tables(0).Rows(0)("CIUDAD_POBLACIONS"))
|
|
TxtColoniaS.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("COLONIAS")), "", DsDatos.Tables(0).Rows(0)("COLONIAS"))
|
|
|
|
If IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("ESTATUS")), "", DsDatos.Tables(0).Rows(0)("ESTATUS")) = "E" Then
|
|
DtpFechaConvenio.Enabled = False
|
|
CmbVigencia.Enabled = False
|
|
GbFechas.Enabled = False
|
|
TxtObjeto.Enabled = False
|
|
TxtNombreEFE.Enabled = False
|
|
GbP.Enabled = False
|
|
GbPE.Enabled = False
|
|
GbTD.Enabled = False
|
|
GRPDomicilioUnificado.Enabled = False
|
|
GRPDomicilioSeparado.Enabled = False
|
|
BtnGuardar.Enabled = False
|
|
BtnEliminar.Enabled = False
|
|
BtnEnviado.Enabled = False
|
|
BtnGenerar.Enabled = False
|
|
Else
|
|
DtpFechaConvenio.Enabled = True
|
|
GbFechas.Enabled = True
|
|
CmbVigencia.Enabled = True
|
|
TxtObjeto.Enabled = True
|
|
TxtNombreEFE.Enabled = True
|
|
GbP.Enabled = True
|
|
GbPE.Enabled = True
|
|
GbTD.Enabled = True
|
|
GRPDomicilioUnificado.Enabled = True
|
|
GRPDomicilioSeparado.Enabled = True
|
|
BtnGuardar.Enabled = True
|
|
BtnEliminar.Enabled = True
|
|
BtnEnviado.Enabled = True
|
|
BtnGenerar.Enabled = True
|
|
End If
|
|
|
|
SQL = "SELECT IDINFORME,CARGO,TIPO FROM IEF_CARGOSAUT WHERE IDINFORME = '" & DgvInformes.CurrentRow.Cells("IDINFORME").Value & "' AND TIPO = '1'"
|
|
DsDatosP = Classcom.fdtDataSet(SQL)
|
|
If DsDatosP.Tables(0).Rows.Count > 0 Then
|
|
For Each row As DataRow In DsDatosP.Tables(0).Rows
|
|
UltRen = DgvCargos.Rows.Count
|
|
DT = New DataGridViewRow
|
|
DT.CreateCells(DgvCargos)
|
|
DT.Cells(0).Value = row("CARGO")
|
|
DgvCargos.Rows.Insert(UltRen, DT)
|
|
Next
|
|
End If
|
|
|
|
SQL = "SELECT IDINFORME,CARGO,TIPO FROM IEF_CARGOSAUT WHERE IDINFORME = '" & DgvInformes.CurrentRow.Cells("IDINFORME").Value & "' AND TIPO = '2'"
|
|
DsDatosPE = Classcom.fdtDataSet(SQL)
|
|
If DsDatosPE.Tables(0).Rows.Count > 0 Then
|
|
For Each row As DataRow In DsDatosPE.Tables(0).Rows
|
|
DTE = New DataGridViewRow
|
|
UltRen = dgvCargosE.Rows.Count
|
|
DTE.CreateCells(dgvCargosE)
|
|
DTE.Cells(0).Value = row("CARGO")
|
|
dgvCargosE.Rows.Insert(UltRen, DTE)
|
|
Next
|
|
End If
|
|
|
|
If CmbVigencia.SelectedValue = "02" Then
|
|
GbFechas.Visible = True
|
|
Else
|
|
GbFechas.Visible = False
|
|
End If
|
|
If ChkHistoria.Checked = False Then
|
|
BtnEnviado.Enabled = False
|
|
End If
|
|
End If
|
|
Catch ex As Exception
|
|
MessageBox.Show("Error de conexión" & ex.Message, "Minds", MessageBoxButtons.OK, MessageBoxIcon.Warning)
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub DgvInformes_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DgvInformes.CurrentCellChanged
|
|
Dim Classcom As New clsComplejo
|
|
Dim ClassCatalogos As New ClassCatalogos
|
|
Dim SQL As String
|
|
Dim FILA As DataRow
|
|
Dim Parametros As New ArrayList
|
|
Dim DsDatos As New DataSet
|
|
Dim DsDatosP As New DataSet
|
|
Dim DsDatosPE As New DataSet
|
|
Dim UltRen As Integer
|
|
Dim DT As New DataGridViewRow
|
|
Dim DTE As New DataGridViewRow
|
|
Try
|
|
If Not IsNothing(DgvInformes.CurrentRow) Then
|
|
Limpiar()
|
|
'LLENA GRID
|
|
'SQL = "SELECT DTDIAINHABIL, ID, DIA, MES, ANO FROM CAT_DIASINHABILES WHERE ANO = '" & Anio & "'"
|
|
SQL = "SELECT IDINFORME,ID_ORG_REGULADOR,CLAVE_INSTITUCION,FECHA_FIRMA,TIPO_VIGENCIA,INICIO_VIGENCIA,FIN_VIGENCIA,OBJETO_CONVENIO,CLAVE_PAIS,UNIFICADO,DOMICILIO_UNIFICADO,CIUDAD_POBLACIONU,COLONIAU,CODIGO_POSTALU,ESTADO_PROVINCIAS,CODIGO_POSTALS,CIUDAD_POBLACIONS,COLONIAS,CALLES,NUM_EXTS,NUM_INTS,NOM_ENT_FIN_EXT,ESTATUS FROM IEF_INFORMES WHERE IDINFORME = '" & DgvInformes.CurrentRow.Cells("IDINFORME").Value & "'"
|
|
DsDatos = Classcom.fdtDataSet(SQL)
|
|
VIDInf = DsDatos.Tables(0).Rows(0)("IDINFORME")
|
|
CmbOrg.SelectedValue = DsDatos.Tables(0).Rows(0)("ID_ORG_REGULADOR")
|
|
CmbInst.SelectedValue = DsDatos.Tables(0).Rows(0)("CLAVE_INSTITUCION")
|
|
DtpFechaConvenio.Value = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("FECHA_FIRMA")), "", DsDatos.Tables(0).Rows(0)("FECHA_FIRMA"))
|
|
CmbVigencia.SelectedValue = "0" & DsDatos.Tables(0).Rows(0)("TIPO_VIGENCIA")
|
|
If CmbVigencia.SelectedValue = "02" Then
|
|
DtpFechaIni.Value = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("INICIO_VIGENCIA")), "", DsDatos.Tables(0).Rows(0)("INICIO_VIGENCIA"))
|
|
DtpFechaFin.Value = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("FIN_VIGENCIA")), "", DsDatos.Tables(0).Rows(0)("FIN_VIGENCIA"))
|
|
End If
|
|
TxtObjeto.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("OBJETO_CONVENIO")), "", DsDatos.Tables(0).Rows(0)("OBJETO_CONVENIO"))
|
|
TxtNombreEFE.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("NOM_ENT_FIN_EXT")), "", DsDatos.Tables(0).Rows(0)("NOM_ENT_FIN_EXT"))
|
|
If IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("UNIFICADO")), -1, DsDatos.Tables(0).Rows(0)("UNIFICADO")) = 1 Then
|
|
RDBUnificado.Checked = True
|
|
ElseIf IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("UNIFICADO")), -1, DsDatos.Tables(0).Rows(0)("UNIFICADO")) = 2 Then
|
|
RDBSeparado.Checked = True
|
|
Else
|
|
RDBUnificado.Checked = False
|
|
RDBSeparado.Checked = False
|
|
GRPDomicilioUnificado.Visible = False
|
|
GRPDomicilioSeparado.Visible = False
|
|
End If
|
|
TxtDomicilioU.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("DOMICILIO_UNIFICADO")), "", DsDatos.Tables(0).Rows(0)("DOMICILIO_UNIFICADO"))
|
|
TxtCPU.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("CODIGO_POSTALU")), "", DsDatos.Tables(0).Rows(0)("CODIGO_POSTALU"))
|
|
CmbPaisU.SelectedValue = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("CLAVE_PAIS")), "", DsDatos.Tables(0).Rows(0)("CLAVE_PAIS"))
|
|
TxtCiudadU.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("CIUDAD_POBLACIONU")), "", DsDatos.Tables(0).Rows(0)("CIUDAD_POBLACIONU"))
|
|
TxtColoniaU.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("COLONIAU")), "", DsDatos.Tables(0).Rows(0)("COLONIAU"))
|
|
TxtCalleS.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("CALLES")), "", DsDatos.Tables(0).Rows(0)("CALLES"))
|
|
TxtNumExtS.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("NUM_EXTS")), "", DsDatos.Tables(0).Rows(0)("NUM_EXTS"))
|
|
TxtNumIntS.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("NUM_INTS")), "", DsDatos.Tables(0).Rows(0)("NUM_INTS"))
|
|
TxtCPS.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("CODIGO_POSTALS")), "", DsDatos.Tables(0).Rows(0)("CODIGO_POSTALS"))
|
|
CmbPaisS.SelectedValue = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("CLAVE_PAIS")), "", DsDatos.Tables(0).Rows(0)("CLAVE_PAIS"))
|
|
TxtEstadoS.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("ESTADO_PROVINCIAS")), "", DsDatos.Tables(0).Rows(0)("ESTADO_PROVINCIAS"))
|
|
TxtCiudadS.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("CIUDAD_POBLACIONS")), "", DsDatos.Tables(0).Rows(0)("CIUDAD_POBLACIONS"))
|
|
TxtColoniaS.Text = IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("COLONIAS")), "", DsDatos.Tables(0).Rows(0)("COLONIAS"))
|
|
|
|
If IIf(IsDBNull(DsDatos.Tables(0).Rows(0)("ESTATUS")), "", DsDatos.Tables(0).Rows(0)("ESTATUS")) = "E" Then
|
|
DtpFechaConvenio.Enabled = False
|
|
CmbVigencia.Enabled = False
|
|
GbFechas.Enabled = False
|
|
TxtObjeto.Enabled = False
|
|
TxtNombreEFE.Enabled = False
|
|
GbP.Enabled = False
|
|
GbPE.Enabled = False
|
|
GbTD.Enabled = False
|
|
GRPDomicilioUnificado.Enabled = False
|
|
GRPDomicilioSeparado.Enabled = False
|
|
BtnGuardar.Enabled = False
|
|
BtnEliminar.Enabled = False
|
|
BtnEnviado.Enabled = False
|
|
BtnGenerar.Enabled = False
|
|
Else
|
|
DtpFechaConvenio.Enabled = True
|
|
GbFechas.Enabled = True
|
|
CmbVigencia.Enabled = True
|
|
TxtObjeto.Enabled = True
|
|
TxtNombreEFE.Enabled = True
|
|
GbP.Enabled = True
|
|
GbPE.Enabled = True
|
|
GbTD.Enabled = True
|
|
GRPDomicilioUnificado.Enabled = True
|
|
GRPDomicilioSeparado.Enabled = True
|
|
BtnGuardar.Enabled = True
|
|
BtnEliminar.Enabled = True
|
|
BtnEnviado.Enabled = True
|
|
BtnGenerar.Enabled = True
|
|
End If
|
|
|
|
SQL = "SELECT IDINFORME,CARGO,TIPO FROM IEF_CARGOSAUT WHERE IDINFORME = '" & DgvInformes.CurrentRow.Cells("IDINFORME").Value & "' AND TIPO = '1'"
|
|
DsDatosP = Classcom.fdtDataSet(SQL)
|
|
If DsDatosP.Tables(0).Rows.Count > 0 Then
|
|
For Each row As DataRow In DsDatosP.Tables(0).Rows
|
|
UltRen = DgvCargos.Rows.Count
|
|
DT = New DataGridViewRow
|
|
DT.CreateCells(DgvCargos)
|
|
DT.Cells(0).Value = row("CARGO")
|
|
DgvCargos.Rows.Insert(UltRen, DT)
|
|
Next
|
|
End If
|
|
|
|
SQL = "SELECT IDINFORME,CARGO,TIPO FROM IEF_CARGOSAUT WHERE IDINFORME = '" & DgvInformes.CurrentRow.Cells("IDINFORME").Value & "' AND TIPO = '2'"
|
|
DsDatosPE = Classcom.fdtDataSet(SQL)
|
|
If DsDatosPE.Tables(0).Rows.Count > 0 Then
|
|
For Each row As DataRow In DsDatosPE.Tables(0).Rows
|
|
DTE = New DataGridViewRow
|
|
UltRen = dgvCargosE.Rows.Count
|
|
DTE.CreateCells(dgvCargosE)
|
|
DTE.Cells(0).Value = row("CARGO")
|
|
dgvCargosE.Rows.Insert(UltRen, DTE)
|
|
Next
|
|
End If
|
|
|
|
End If
|
|
If CmbVigencia.SelectedValue = "02" Then
|
|
GbFechas.Visible = True
|
|
Else
|
|
GbFechas.Visible = False
|
|
End If
|
|
If ChkHistoria.Checked = False Then
|
|
BtnEnviado.Enabled = False
|
|
End If
|
|
Catch ex As Exception
|
|
MessageBox.Show("Error de conexión" & ex.Message, "Minds", MessageBoxButtons.OK, MessageBoxIcon.Warning)
|
|
End Try
|
|
|
|
End Sub
|
|
|
|
Private Sub DgvInformes_DoubleClick(sender As Object, e As System.EventArgs) Handles DgvInformes.DoubleClick
|
|
|
|
End Sub
|
|
|
|
|
|
Private Sub ChkHistoria_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles ChkHistoria.CheckedChanged
|
|
If ChkHistoria.Checked Then
|
|
BtnEnviado.Enabled = True
|
|
CargaGridA("C")
|
|
DgvInformes.Columns("ENVIADO").Visible = True
|
|
Else
|
|
BtnEnviado.Enabled = False
|
|
CargaGridA("A")
|
|
DgvInformes.Columns("ENVIADO").Visible = False
|
|
End If
|
|
Limpiar()
|
|
If DgvInformes.Rows.Count > 0 Then
|
|
BtnEliminar.Enabled = True
|
|
Else
|
|
BtnEliminar.Enabled = False
|
|
End If
|
|
If DgvInformes.Rows.Count > 0 Then
|
|
'BtnEliminar.Enabled = True
|
|
'BtnGenerar.Enabled = True
|
|
'BtnEnviado.Enabled = True
|
|
'BtnGuardar.Enabled = True
|
|
BtnEliminar.Enabled = False
|
|
BtnGenerar.Enabled = False
|
|
BtnEnviado.Enabled = False
|
|
BtnGuardar.Enabled = False
|
|
Else
|
|
BtnEliminar.Enabled = False
|
|
BtnGenerar.Enabled = False
|
|
BtnEnviado.Enabled = False
|
|
BtnGuardar.Enabled = False
|
|
End If
|
|
DgvInformes_Click(Nothing, Nothing)
|
|
End Sub
|
|
|
|
Private Sub CmbVigencia_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles CmbVigencia.SelectedIndexChanged
|
|
|
|
End Sub
|
|
|
|
Private Sub CmbVigencia_SelectionChangeCommitted(sender As Object, e As System.EventArgs) Handles CmbVigencia.SelectionChangeCommitted
|
|
If CmbVigencia.SelectedValue = "02" Then
|
|
GbFechas.Visible = True
|
|
Else
|
|
GbFechas.Visible = False
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub BtnNuevo_Click(sender As System.Object, e As System.EventArgs) Handles BtnNuevo.Click
|
|
CargaGridAN("A")
|
|
If DgvInformes.Rows.Count > 0 Then
|
|
DgvInformes.CurrentRow.Selected = False
|
|
End If
|
|
ChkHistoria.Checked = False
|
|
BtnGuardar.Enabled = True
|
|
Limpiar()
|
|
DgvInformes.ClearSelection()
|
|
TxtObjeto.Focus()
|
|
End Sub
|
|
|
|
Private Sub CmdAgregar_Click(sender As System.Object, e As System.EventArgs) Handles CmdAgregar.Click
|
|
Dim UltRen As Integer
|
|
Dim DT As New DataGridViewRow
|
|
Try
|
|
If TxtCargo.Text.Trim.Length = 0 Then
|
|
MsgBox("Debe Capturar un Cargo", MsgBoxStyle.OkOnly, "Mensaje")
|
|
Exit Sub
|
|
End If
|
|
UltRen = DgvCargos.Rows.Count
|
|
DT.CreateCells(DgvCargos)
|
|
DT.Cells(0).Value = TxtCargo.Text
|
|
DgvCargos.Rows.Insert(UltRen, DT)
|
|
TxtCargo.Text = ""
|
|
Catch Err As Exception
|
|
MsgBox(Err.Message)
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub CmdAgregarE_Click(sender As System.Object, e As System.EventArgs) Handles CmdAgregarE.Click
|
|
Dim UltRen As Integer
|
|
Dim DT As New DataGridViewRow
|
|
Try
|
|
If TxtCargoE.Text.Trim.Length = 0 Then
|
|
MsgBox("Debe Capturar un Cargo", MsgBoxStyle.OkOnly, "Mensaje")
|
|
Exit Sub
|
|
End If
|
|
UltRen = dgvCargosE.Rows.Count
|
|
DT.CreateCells(dgvCargosE)
|
|
DT.Cells(0).Value = TxtCargoE.Text
|
|
dgvCargosE.Rows.Insert(UltRen, DT)
|
|
TxtCargoE.Text = ""
|
|
Catch Err As Exception
|
|
MsgBox(Err.Message)
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub CmdQuitar_Click(sender As System.Object, e As System.EventArgs) Handles CmdQuitar.Click
|
|
If DgvCargos.Rows.Count > 0 Then
|
|
DgvCargos.Rows.Remove(DgvCargos.CurrentRow)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub CmdQuitarE_Click(sender As System.Object, e As System.EventArgs) Handles CmdQuitarE.Click
|
|
If DgvCargosE.Rows.Count > 0 Then
|
|
DgvCargosE.Rows.Remove(DgvCargosE.CurrentRow)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub BtnGenerar_Click(sender As System.Object, e As System.EventArgs) Handles BtnGenerar.Click
|
|
Dim fileSave As New SaveFileDialog
|
|
Dim File As String = Nothing
|
|
Dim Dia As String
|
|
Dim Mes As String
|
|
Dim Anio As String
|
|
|
|
If IsNothing(DgvInformes.CurrentRow) Then
|
|
MsgBox("Es necesario seleccionar un aviso de la lista para poderlo generar", MsgBoxStyle.Exclamation)
|
|
Exit Sub
|
|
End If
|
|
|
|
Dia = Now.Day
|
|
Mes = Now.Month
|
|
Anio = Now.Year
|
|
|
|
Dia = Dia.PadLeft(2, "0")
|
|
Mes = Mes.PadLeft(2, "0")
|
|
|
|
If VALIDACIONES() Then
|
|
'fileSave.CheckFileExists = True
|
|
fileSave.Filter = "Archivos XML | *.XML"
|
|
fileSave.FileName = Dia & Mes & Anio & "_ICII.xml"
|
|
fileSave.Title = "Guardar Archivo"
|
|
File = fileSave.ShowDialog()
|
|
If File = 1 Then
|
|
AddData(fileSave.FileName)
|
|
ActualizaTipo()
|
|
MsgBox("Archivo de Informe Generado", MsgBoxStyle.OkOnly, "Mensaje")
|
|
If ChkHistoria.Checked = True Then
|
|
BtnEnviado.Enabled = True
|
|
CargaGridA("C")
|
|
Else
|
|
BtnEnviado.Enabled = False
|
|
CargaGridA("A")
|
|
End If
|
|
End If
|
|
End If
|
|
End Sub
|
|
Private Function VALIDACIONES() As Boolean
|
|
Dim retval As Boolean = False
|
|
Dim dsData As New DataSet
|
|
Dim dsPersonas As New DataSet
|
|
Dim dsPersonasE As New DataSet
|
|
Dim Mensajes As String = Nothing
|
|
dsData = GetData()
|
|
dsPersonas = GetCargos()
|
|
dsPersonasE = GetCargosE()
|
|
'If dsData.Tables(0).Rows(0).Item("TIPO_VIGENCIA") = "2" Then
|
|
'If dsData.Tables(0).Rows(0).Item("INICIO_VIGENCIA").ToString.Length = 0 Then
|
|
'End If
|
|
'End If
|
|
|
|
If dsData.Tables(0).Rows(0).Item("OBJETO_CONVENIO").ToString.Length = 0 Then
|
|
Mensajes = Mensajes & "FALTA CAPTURAR OBJETO DEL CONVENIO CELEBRADO" & Chr(13)
|
|
End If
|
|
If dsData.Tables(0).Rows(0).Item("NOM_ENT_FIN_EXT").ToString.Length = 0 Then
|
|
Mensajes = Mensajes & "FALTA CAPTURAR NOMBRE DE LA ENTIDAD FINANCIERA EXTRANJERA" & Chr(13)
|
|
End If
|
|
If dsData.Tables(0).Rows(0).Item("UNIFICADO").ToString.Length = 0 Then
|
|
Mensajes = Mensajes & "FALTA CAPTURAR TIPO DE DOMICILIO" & Chr(13)
|
|
Else
|
|
If dsData.Tables(0).Rows(0).Item("UNIFICADO") = 1 Then
|
|
If dsData.Tables(0).Rows(0).Item("DOMICILIO_UNIFICADO").ToString.Length = 0 Then
|
|
Mensajes = Mensajes & "FALTA CAPTURAR DOMICILIO UNIFICADO" & Chr(13)
|
|
End If
|
|
If dsData.Tables(0).Rows(0).Item("CIUDAD_POBLACIONU").ToString.Length = 0 Then
|
|
Mensajes = Mensajes & "FALTA CAPTURAR CIUDAD O POBLACION DOM. UNIFICADO" & Chr(13)
|
|
End If
|
|
If dsData.Tables(0).Rows(0).Item("CODIGO_POSTALU").ToString.Length = 0 Then
|
|
Mensajes = Mensajes & "FALTA CAPTURAR CODIGO POSTAL DOM. UNIFICADO" & Chr(13)
|
|
End If
|
|
If dsData.Tables(0).Rows(0).Item("COLONIAU").ToString.Length = 0 Then
|
|
Mensajes = Mensajes & "FALTA CAPTURAR COLONIA DOM. UNIFICADO" & Chr(13)
|
|
End If
|
|
Else
|
|
If dsData.Tables(0).Rows(0).Item("ESTADO_PROVINCIAS").ToString.Length = 0 Then
|
|
Mensajes = Mensajes & "FALTA CAPTURAR ESTADO DOM. SEPARADO" & Chr(13)
|
|
End If
|
|
If dsData.Tables(0).Rows(0).Item("CODIGO_POSTALS").ToString.Length = 0 Then
|
|
Mensajes = Mensajes & "FALTA CAPTURAR CODIGO POSTAL DOM. SEPARADO" & Chr(13)
|
|
End If
|
|
If dsData.Tables(0).Rows(0).Item("CIUDAD_POBLACIONS").ToString.Length = 0 Then
|
|
Mensajes = Mensajes & "FALTA CAPTURAR CIUDAD O POBLACION DOM. SEPARADO" & Chr(13)
|
|
End If
|
|
If dsData.Tables(0).Rows(0).Item("CALLES").ToString.Length = 0 Then
|
|
Mensajes = Mensajes & "FALTA CAPTURAR CALLE DOM. SEPARADO" & Chr(13)
|
|
End If
|
|
If dsData.Tables(0).Rows(0).Item("NUM_EXTS").ToString.Length = 0 Then
|
|
Mensajes = Mensajes & "FALTA CAPTURAR NUMERO EXTERIOR DOM. SEPARADO" & Chr(13)
|
|
End If
|
|
If dsData.Tables(0).Rows(0).Item("NUM_INTS").ToString.Length = 0 Then
|
|
Mensajes = Mensajes & "FALTA CAPTURAR NUMERO INTERIOR DOM. SEPARADO" & Chr(13)
|
|
End If
|
|
If dsData.Tables(0).Rows(0).Item("COLONIAS").ToString.Length = 0 Then
|
|
Mensajes = Mensajes & "FALTA CAPTURAR COLONIA DOM. SEPARADO" & Chr(13)
|
|
End If
|
|
End If
|
|
End If
|
|
For Each row As DataRow In dsPersonas.Tables(0).Rows
|
|
If row("CARGO").ToString.Length = 0 Then
|
|
Mensajes = Mensajes & "FALTA CAPTURAR CARGO PERSONA AUTORIZADA" & Chr(13)
|
|
End If
|
|
Next
|
|
If dsPersonas.Tables(0).Rows.Count = 0 Then
|
|
Mensajes = Mensajes & "FALTA CAPTURAR CARGO PERSONA AUTORIZADA" & Chr(13)
|
|
End If
|
|
For Each row As DataRow In dsPersonasE.Tables(0).Rows
|
|
If row("CARGO").ToString.Length = 0 Then
|
|
Mensajes = Mensajes & "FALTA CAPTURAR CARGO PERSONA AUTORIZADA EXTRANJERA" & Chr(13)
|
|
End If
|
|
Next
|
|
If dsPersonasE.Tables(0).Rows.Count = 0 Then
|
|
Mensajes = Mensajes & "FALTA CAPTURAR CARGO PERSONA AUTORIZADA EXTRANJERA" & Chr(13)
|
|
End If
|
|
If Mensajes IsNot Nothing Then
|
|
MsgBox(Mensajes, MsgBoxStyle.Exclamation, "Mensaje")
|
|
Else
|
|
retval = True
|
|
End If
|
|
|
|
Return retval
|
|
End Function
|
|
Private Sub AddData(NombreArchivo As String)
|
|
Dim dsData As New DataSet
|
|
Dim dsPersonas As New DataSet
|
|
Dim dsPersonasE As New DataSet
|
|
Dim NomArchivoXml As String
|
|
NomArchivoXml = NombreArchivo
|
|
Dim myXmlTextWriter As New XmlTextWriter(NomArchivoXml, System.Text.Encoding.UTF8)
|
|
myXmlTextWriter.Formatting = System.Xml.Formatting.Indented
|
|
myXmlTextWriter.WriteStartDocument()
|
|
|
|
dsData = GetData()
|
|
'Elemento Principal -------------------------------------------------------------------------
|
|
myXmlTextWriter.WriteStartElement("informe")
|
|
myXmlTextWriter.WriteAttributeString("xmlns", "xsi", Nothing, "http://www.w3.org/2001/XMLSchema-instance")
|
|
myXmlTextWriter.WriteAttributeString("xmlns", "http://www.cnbv.gob.mx/recepcion/icii")
|
|
myXmlTextWriter.WriteAttributeString("xsi", "schemaLocation", Nothing, "http://www.cnbv.gob.mx/recepcion/icii icii.xsd")
|
|
|
|
'Entidad Emisora
|
|
myXmlTextWriter.WriteStartElement("clave_organismo_regulador")
|
|
myXmlTextWriter.WriteString(dsData.Tables(0).Rows(0).Item("ID_ORG_REGULADOR"))
|
|
myXmlTextWriter.WriteEndElement()
|
|
|
|
myXmlTextWriter.WriteStartElement("clave_institucion")
|
|
myXmlTextWriter.WriteString(dsData.Tables(0).Rows(0).Item("CLAVE_INSTITUCION"))
|
|
myXmlTextWriter.WriteEndElement()
|
|
|
|
myXmlTextWriter.WriteStartElement("fecha_firma")
|
|
myXmlTextWriter.WriteString(CDate(dsData.Tables(0).Rows(0).Item("FECHA_FIRMA")).ToString("yyyyMMdd"))
|
|
myXmlTextWriter.WriteEndElement()
|
|
|
|
myXmlTextWriter.WriteStartElement("tipo_vigencia")
|
|
|
|
If dsData.Tables(0).Rows(0).Item("TIPO_VIGENCIA") = "2" Then
|
|
myXmlTextWriter.WriteStartElement("vigencia_definida")
|
|
myXmlTextWriter.WriteElementString("clave_vigencia", "02")
|
|
myXmlTextWriter.WriteElementString("inicio_vigencia", CDate(dsData.Tables(0).Rows(0).Item("INICIO_VIGENCIA")).ToString("yyyymmdd"))
|
|
myXmlTextWriter.WriteElementString("fin_vigencia", CDate(dsData.Tables(0).Rows(0).Item("FIN_VIGENCIA")).ToString("yyyymmdd"))
|
|
myXmlTextWriter.WriteEndElement() 'vigencia_definida
|
|
Else
|
|
myXmlTextWriter.WriteStartElement("vigencia_indefinida")
|
|
myXmlTextWriter.WriteElementString("clave_vigencia", "01")
|
|
myXmlTextWriter.WriteEndElement() 'vigencia_indefinida
|
|
End If
|
|
myXmlTextWriter.WriteEndElement()
|
|
|
|
myXmlTextWriter.WriteStartElement("objeto_convenio")
|
|
myXmlTextWriter.WriteString(IIf(IsDBNull(dsData.Tables(0).Rows(0).Item("OBJETO_CONVENIO")), "", dsData.Tables(0).Rows(0).Item("OBJETO_CONVENIO")))
|
|
myXmlTextWriter.WriteEndElement()
|
|
|
|
dsPersonas = GetCargos()
|
|
|
|
myXmlTextWriter.WriteStartElement("datos_institucion_credito")
|
|
For Each row As DataRow In dsPersonas.Tables(0).Rows
|
|
myXmlTextWriter.WriteStartElement("cargo_funcionario_autorizado_institucion_credito")
|
|
myXmlTextWriter.WriteElementString("nombre_cargo_funcionario_autorizado_institucion_credito", row("CARGO"))
|
|
myXmlTextWriter.WriteEndElement() 'cargo_funcionario_autorizado_institucion_credito
|
|
Next
|
|
myXmlTextWriter.WriteEndElement() 'datos_institucion_credito
|
|
|
|
myXmlTextWriter.WriteStartElement("datos_entidad_financiera_extranjera")
|
|
|
|
dsPersonasE = GetCargosE()
|
|
myXmlTextWriter.WriteElementString("nombre_entidad_financiera_extranjera", IIf(IsDBNull(dsData.Tables(0).Rows(0).Item("NOM_ENT_FIN_EXT")), "", dsData.Tables(0).Rows(0).Item("NOM_ENT_FIN_EXT")))
|
|
|
|
For Each row As DataRow In dsPersonasE.Tables(0).Rows
|
|
myXmlTextWriter.WriteStartElement("persona_autorizada_entidad_financiera_extranjera")
|
|
|
|
myXmlTextWriter.WriteElementString("nombre_cargo_funcionario_autorizado_entidad_financiera_extranjera", row("CARGO"))
|
|
myXmlTextWriter.WriteEndElement() 'persona_autorizada_entidad_financiera_extranjera
|
|
Next
|
|
|
|
myXmlTextWriter.WriteStartElement("domicilio_matriz")
|
|
myXmlTextWriter.WriteElementString("clave_pais", dsData.Tables(0).Rows(0).Item("CLAVE_PAIS"))
|
|
|
|
myXmlTextWriter.WriteStartElement("tipo_domicilio")
|
|
If dsData.Tables(0).Rows(0).Item("UNIFICADO") = 1 Then
|
|
myXmlTextWriter.WriteStartElement("unificado")
|
|
myXmlTextWriter.WriteElementString("domicilio_unificado", IIf(IsDBNull(dsData.Tables(0).Rows(0).Item("DOMICILIO_UNIFICADO")), "", dsData.Tables(0).Rows(0).Item("DOMICILIO_UNIFICADO")))
|
|
myXmlTextWriter.WriteElementString("ciudad_poblacion", IIf(IsDBNull(dsData.Tables(0).Rows(0).Item("CIUDAD_POBLACIONU")), "", dsData.Tables(0).Rows(0).Item("CIUDAD_POBLACIONU")))
|
|
'If dsData.Tables(0).Rows(0).Item("COLONIAU").ToString.Trim.Length > 0 Then
|
|
myXmlTextWriter.WriteElementString("colonia", IIf(IsDBNull(dsData.Tables(0).Rows(0).Item("COLONIAU")), "", dsData.Tables(0).Rows(0).Item("COLONIAU")))
|
|
'End If
|
|
myXmlTextWriter.WriteElementString("codigo_postal", IIf(IsDBNull(dsData.Tables(0).Rows(0).Item("CODIGO_POSTALU")), "", dsData.Tables(0).Rows(0).Item("CODIGO_POSTALU")))
|
|
|
|
myXmlTextWriter.WriteEndElement() 'unificado
|
|
Else
|
|
myXmlTextWriter.WriteStartElement("separado")
|
|
myXmlTextWriter.WriteElementString("estado_provincia", IIf(IsDBNull(dsData.Tables(0).Rows(0).Item("ESTADO_PROVINCIAS")), "", dsData.Tables(0).Rows(0).Item("ESTADO_PROVINCIAS")))
|
|
myXmlTextWriter.WriteElementString("codigo_postal", IIf(IsDBNull(dsData.Tables(0).Rows(0).Item("CODIGO_POSTALS")), "", dsData.Tables(0).Rows(0).Item("CODIGO_POSTALS")))
|
|
myXmlTextWriter.WriteElementString("ciudad_poblacion", IIf(IsDBNull(dsData.Tables(0).Rows(0).Item("CIUDAD_POBLACIONS")), "", dsData.Tables(0).Rows(0).Item("CIUDAD_POBLACIONS")))
|
|
'If dsData.Tables(0).Rows(0).Item("COLONIAS").ToString.Trim.Length > 0 Then
|
|
myXmlTextWriter.WriteElementString("colonia", IIf(IsDBNull(dsData.Tables(0).Rows(0).Item("COLONIAS")), "", dsData.Tables(0).Rows(0).Item("COLONIAS")))
|
|
'End If
|
|
myXmlTextWriter.WriteElementString("calle", IIf(IsDBNull(dsData.Tables(0).Rows(0).Item("CALLES")), "", dsData.Tables(0).Rows(0).Item("CALLES")))
|
|
myXmlTextWriter.WriteElementString("numero_exterior", IIf(IsDBNull(dsData.Tables(0).Rows(0).Item("NUM_EXTS")), "", dsData.Tables(0).Rows(0).Item("NUM_EXTS")))
|
|
'If dsData.Tables(0).Rows(0).Item("NUM_INTS").ToString.Trim.Length > 0 Then
|
|
myXmlTextWriter.WriteElementString("numero_interior", IIf(IsDBNull(dsData.Tables(0).Rows(0).Item("NUM_INTS")), "", dsData.Tables(0).Rows(0).Item("NUM_INTS")))
|
|
'End If
|
|
|
|
myXmlTextWriter.WriteEndElement() 'separado
|
|
End If
|
|
myXmlTextWriter.WriteEndElement() 'tipo_domicilio
|
|
myXmlTextWriter.WriteEndElement() 'domicilio_matriz
|
|
myXmlTextWriter.WriteEndElement() 'datos_entidad_financiera_extranjera
|
|
|
|
|
|
'Cierra elemento Principal -------------------------------------------------------------------------
|
|
myXmlTextWriter.WriteEndElement() 'informe
|
|
myXmlTextWriter.Flush()
|
|
myXmlTextWriter.Close()
|
|
|
|
End Sub
|
|
|
|
Private Function GetData() As DataSet
|
|
Dim Classcom As New clsComplejo
|
|
Dim ClassCatalogos As New ClassCatalogos
|
|
Dim SQL As String
|
|
Dim FILA As DataRow
|
|
Dim Parametros As New ArrayList
|
|
Dim DsDatos As New DataSet
|
|
Try
|
|
'LLENA GRID
|
|
'SQL = "SELECT DTDIAINHABIL, ID, DIA, MES, ANO FROM CAT_DIASINHABILES WHERE ANO = '" & Anio & "'"
|
|
SQL = "SELECT IDINFORME,ID_ORG_REGULADOR,CLAVE_INSTITUCION,FECHA_FIRMA,TIPO_VIGENCIA,INICIO_VIGENCIA,FIN_VIGENCIA,OBJETO_CONVENIO,CLAVE_PAIS,UNIFICADO,DOMICILIO_UNIFICADO,CIUDAD_POBLACIONU,COLONIAU,CODIGO_POSTALU,ESTADO_PROVINCIAS,CODIGO_POSTALS,CIUDAD_POBLACIONS,COLONIAS,CALLES,NUM_EXTS,NUM_INTS,NOM_ENT_FIN_EXT,ESTATUS FROM IEF_INFORMES WHERE IDINFORME = '" & DgvInformes.CurrentRow.Cells("IDINFORME").Value & "'"
|
|
DsDatos = Classcom.fdtDataSet(SQL)
|
|
|
|
Return DsDatos
|
|
Catch ex As Exception
|
|
MessageBox.Show("Error de conexión" & ex.Message, "Minds", MessageBoxButtons.OK, MessageBoxIcon.Warning)
|
|
End Try
|
|
End Function
|
|
|
|
|
|
Private Function GetCargos() As DataSet
|
|
Dim Classcom As New clsComplejo
|
|
Dim ClassCatalogos As New ClassCatalogos
|
|
Dim SQL As String
|
|
Dim FILA As DataRow
|
|
Dim Parametros As New ArrayList
|
|
Dim DsDatos As New DataSet
|
|
Try
|
|
'LLENA GRID
|
|
'SQL = "SELECT DTDIAINHABIL, ID, DIA, MES, ANO FROM CAT_DIASINHABILES WHERE ANO = '" & Anio & "'"
|
|
SQL = "SELECT IDINFORME,CARGO,TIPO FROM IEF_CARGOSAUT WHERE IDINFORME = '" & DgvInformes.CurrentRow.Cells("IDINFORME").Value & "' AND TIPO = '1'"
|
|
DsDatos = Classcom.fdtDataSet(SQL)
|
|
|
|
Return DsDatos
|
|
Catch ex As Exception
|
|
MessageBox.Show("Error de conexión" & ex.Message, "Minds", MessageBoxButtons.OK, MessageBoxIcon.Warning)
|
|
End Try
|
|
End Function
|
|
|
|
|
|
Private Function GetCargosE() As DataSet
|
|
Dim Classcom As New clsComplejo
|
|
Dim ClassCatalogos As New ClassCatalogos
|
|
Dim SQL As String
|
|
Dim FILA As DataRow
|
|
Dim Parametros As New ArrayList
|
|
Dim DsDatos As New DataSet
|
|
Try
|
|
'LLENA GRID
|
|
'SQL = "SELECT DTDIAINHABIL, ID, DIA, MES, ANO FROM CAT_DIASINHABILES WHERE ANO = '" & Anio & "'"
|
|
SQL = "SELECT IDINFORME,CARGO,TIPO FROM IEF_CARGOSAUT WHERE IDINFORME = '" & DgvInformes.CurrentRow.Cells("IDINFORME").Value & "' AND TIPO = '2'"
|
|
DsDatos = Classcom.fdtDataSet(SQL)
|
|
|
|
Return DsDatos
|
|
Catch ex As Exception
|
|
MessageBox.Show("Error de conexión" & ex.Message, "Minds", MessageBoxButtons.OK, MessageBoxIcon.Warning)
|
|
End Try
|
|
End Function
|
|
|
|
Private Sub BtnEliminar_Click(sender As System.Object, e As System.EventArgs) Handles BtnEliminar.Click
|
|
Dim Classcom As New clsComplejo
|
|
Dim ClassCatalogos As New ClassCatalogos
|
|
Dim SQL As String
|
|
Dim FILA As DataRow
|
|
Dim Parametros As New ArrayList
|
|
Dim DsDatos As New DataSet
|
|
If DgvInformes.RowCount > 0 Then
|
|
If MsgBox("Esta Seguro de Eliminar el Informe Seleccionado", MsgBoxStyle.OkCancel, "Mensaje") = MsgBoxResult.Ok Then
|
|
SQL = "DELETE FROM IEF_INFORMES WHERE IDINFORME = '" & DgvInformes.CurrentRow.Cells("IDINFORME").Value & "' "
|
|
DsDatos = Classcom.fdtDataSet(SQL)
|
|
Limpiar()
|
|
If ChkHistoria.Checked = True Then
|
|
CargaGridA("C")
|
|
Else
|
|
CargaGridA("A")
|
|
End If
|
|
End If
|
|
Else
|
|
MessageBox.Show("No hay información para eliminar")
|
|
End If
|
|
End Sub
|
|
Private Sub ActualizaTipo()
|
|
Dim Classcom As New clsComplejo
|
|
Dim ClassCatalogos As New ClassCatalogos
|
|
Dim SQL As String
|
|
Dim FILA As DataRow
|
|
Dim Parametros As New ArrayList
|
|
Dim DsDatos As New DataSet
|
|
SQL = "UPDATE IEF_INFORMES SET ESTATUS = 'C' WHERE IDINFORME = '" & DgvInformes.CurrentRow.Cells("IDINFORME").Value & "' "
|
|
DsDatos = Classcom.fdtDataSet(SQL)
|
|
End Sub
|
|
Private Sub ActualizaEnviado()
|
|
Dim Classcom As New clsComplejo
|
|
Dim ClassCatalogos As New ClassCatalogos
|
|
Dim SQL As String
|
|
Dim FILA As DataRow
|
|
Dim Parametros As New ArrayList
|
|
Dim DsDatos As New DataSet
|
|
SQL = "UPDATE IEF_INFORMES SET ESTATUS = 'E' WHERE IDINFORME = '" & DgvInformes.CurrentRow.Cells("IDINFORME").Value & "' "
|
|
Classcom.sbModifica2(SQL)
|
|
End Sub
|
|
Private Sub Limpiar()
|
|
VIDInf = 0
|
|
CmbOrg.SelectedIndex = 0
|
|
CmbInst.SelectedIndex = 0
|
|
DtpFechaConvenio.Value = Now.Date
|
|
CmbVigencia.SelectedValue = "01"
|
|
DtpFechaIni.Value = Now.Date
|
|
DtpFechaFin.Value = Now.Date
|
|
TxtObjeto.Text = ""
|
|
TxtNombreEFE.Text = ""
|
|
RDBUnificado.Checked = True
|
|
RDBSeparado.Checked = False
|
|
TxtDomicilioU.Text = ""
|
|
TxtCPU.Text = ""
|
|
CmbPaisU.SelectedIndex = 0
|
|
TxtCiudadU.Text = ""
|
|
TxtColoniaU.Text = ""
|
|
TxtCalleS.Text = ""
|
|
TxtNumExtS.Text = ""
|
|
TxtNumIntS.Text = ""
|
|
TxtCPS.Text = ""
|
|
CmbPaisS.SelectedIndex = 0
|
|
TxtEstadoS.Text = ""
|
|
TxtCiudadS.Text = ""
|
|
TxtColoniaS.Text = ""
|
|
|
|
TxtCargo.Text = ""
|
|
|
|
TxtCargoE.Text = ""
|
|
|
|
DgvCargos.Rows.Clear()
|
|
|
|
dgvCargosE.Rows.Clear()
|
|
End Sub
|
|
|
|
Private Sub DtpFechaConvenio_ValueChanged(sender As System.Object, e As System.EventArgs) Handles DtpFechaConvenio.ValueChanged
|
|
Dim FechaHoy As Date
|
|
Dim FechaRecepcion As Date
|
|
FechaHoy = Now
|
|
FechaRecepcion = DtpFechaConvenio.Value
|
|
If FechaRecepcion > FechaHoy Then
|
|
MsgBox("La fecha de convenio no puede ser mayor a la fecha de hoy", MsgBoxStyle.Critical)
|
|
Exit Sub
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub DtpFechaIni_ValueChanged(sender As System.Object, e As System.EventArgs) Handles DtpFechaIni.ValueChanged
|
|
Dim FechaHoy As Date
|
|
Dim FechaRecepcion As Date
|
|
FechaHoy = Now
|
|
FechaRecepcion = DtpFechaIni.Value
|
|
'If FechaRecepcion > FechaHoy Then
|
|
' MsgBox("La fecha de inicio no puede ser mayor a la fecha de hoy", MsgBoxStyle.Critical)
|
|
' DtpFechaIni.Value = FechaHoy
|
|
' Exit Sub
|
|
'End If
|
|
If DtpFechaIni.Value > DtpFechaFin.Value Then
|
|
MsgBox("La fecha de inicio no puede ser mayor a la fecha final", MsgBoxStyle.Critical)
|
|
DtpFechaIni.Value = DtpFechaFin.Value
|
|
Exit Sub
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub DtpFechaFin_ValueChanged(sender As System.Object, e As System.EventArgs) Handles DtpFechaFin.ValueChanged
|
|
Dim FechaHoy As Date
|
|
Dim FechaRecepcion As Date
|
|
FechaHoy = Now
|
|
FechaRecepcion = DtpFechaIni.Value
|
|
'If FechaRecepcion > FechaHoy Then
|
|
' MsgBox("La fecha final no puede ser mayor a la fecha de hoy", MsgBoxStyle.Critical)
|
|
' DtpFechaFin.Value = FechaHoy
|
|
' Exit Sub
|
|
'End If
|
|
If DtpFechaFin.Value < DtpFechaIni.Value Then
|
|
MsgBox("La fecha final no puede ser menor a la fecha inicio", MsgBoxStyle.Critical)
|
|
DtpFechaFin.Value = DtpFechaIni.Value
|
|
Exit Sub
|
|
End If
|
|
End Sub
|
|
Private Function CaracteresNoValidos(ByVal Cadena As String, ByVal TipoCarctPermitidos As Integer) As Boolean
|
|
Dim caracteresPermitidos As String
|
|
Dim Resultado As Boolean = False
|
|
Dim C As String = ""
|
|
Dim i As Integer
|
|
|
|
Select Case TipoCarctPermitidos
|
|
Case 1
|
|
caracteresPermitidos = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ '.0123456789#-.,:/" & Convert.ToChar(8)
|
|
Case 2
|
|
caracteresPermitidos = "0123456789ABCDEFGHIJKLMNÑOPQRSTUVWXYZ_" & Convert.ToChar(8)
|
|
Case 3
|
|
caracteresPermitidos = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ '." & Convert.ToChar(8)
|
|
Case 4
|
|
caracteresPermitidos = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ0123456789 ,.:/" & Convert.ToChar(8)
|
|
End Select
|
|
|
|
For i = 1 To Cadena.Length
|
|
C = Mid(Cadena, i, 1)
|
|
If (Not (caracteresPermitidos.Contains(C))) Then
|
|
Resultado = True
|
|
Exit For
|
|
End If
|
|
Next
|
|
|
|
Return Resultado
|
|
End Function
|
|
Private Sub TxtObjeto_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TxtObjeto.KeyPress
|
|
' Lista con los caracteres que deseo permitir.
|
|
Dim caracteresPermitidos As String = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ '." & Convert.ToChar(8)
|
|
' Carácter presionado.
|
|
Dim c As Char = UCase(e.KeyChar)
|
|
' Si la tecla presionada no se encuentra en la matriz de caracteres permitidos, anulamos la tecla pulsada.
|
|
If (Not (caracteresPermitidos.Contains(c))) Then
|
|
MessageBox.Show("Carácter Invalido, Solo esta permitido los siguientes caracteres: ABCDEFGHIJKLMNÑOPQRSTUVWXYZ '.", "ERROR de escritura", _
|
|
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
|
|
' Deshechamos el carácter
|
|
e.Handled = True
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtObjeto_TextChanged(sender As System.Object, e As System.EventArgs) Handles TxtObjeto.TextChanged
|
|
If CaracteresNoValidos(TxtObjeto.Text, 3) = True Then
|
|
MsgBox("Existen caracteres invalidos, verifique por favor", MsgBoxStyle.Exclamation)
|
|
TxtObjeto.Text = ""
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtCargo_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TxtCargo.KeyPress
|
|
' Lista con los caracteres que deseo permitir.
|
|
Dim caracteresPermitidos As String = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ '." & Convert.ToChar(8)
|
|
' Carácter presionado.
|
|
Dim c As Char = UCase(e.KeyChar)
|
|
' Si la tecla presionada no se encuentra en la matriz de caracteres permitidos, anulamos la tecla pulsada.
|
|
If (Not (caracteresPermitidos.Contains(c))) Then
|
|
MessageBox.Show("Carácter Invalido, Solo esta permitido los siguientes caracteres: ABCDEFGHIJKLMNÑOPQRSTUVWXYZ '.", "ERROR de escritura", _
|
|
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
|
|
' Deshechamos el carácter
|
|
e.Handled = True
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtCargoE_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TxtCargoE.KeyPress
|
|
' Lista con los caracteres que deseo permitir.
|
|
Dim caracteresPermitidos As String = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ '." & Convert.ToChar(8)
|
|
' Carácter presionado.
|
|
Dim c As Char = UCase(e.KeyChar)
|
|
' Si la tecla presionada no se encuentra en la matriz de caracteres permitidos, anulamos la tecla pulsada.
|
|
If (Not (caracteresPermitidos.Contains(c))) Then
|
|
MessageBox.Show("Carácter Invalido, Solo esta permitido los siguientes caracteres: ABCDEFGHIJKLMNÑOPQRSTUVWXYZ '.", "ERROR de escritura", _
|
|
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
|
|
' Deshechamos el carácter
|
|
e.Handled = True
|
|
End If
|
|
End Sub
|
|
Private Sub TxtCargo_TextChanged(sender As System.Object, e As System.EventArgs) Handles TxtCargo.TextChanged
|
|
If CaracteresNoValidos(TxtCargo.Text, 3) = True Then
|
|
MsgBox("Existen caracteres invalidos, verifique por favor", MsgBoxStyle.Exclamation)
|
|
TxtCargo.Text = ""
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtDomicilioU_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TxtDomicilioU.KeyPress
|
|
' Lista con los caracteres que deseo permitir.
|
|
Dim caracteresPermitidos As String = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ '.0123456789#-.,:/" & Convert.ToChar(8)
|
|
' Carácter presionado.
|
|
Dim c As Char = UCase(e.KeyChar)
|
|
' Si la tecla presionada no se encuentra en la matriz de caracteres permitidos, anulamos la tecla pulsada.
|
|
If (Not (caracteresPermitidos.Contains(c))) Then
|
|
MessageBox.Show("Carácter Invalido, Solo esta permitido los siguientes caracteres: ABCDEFGHIJKLMNÑOPQRSTUVWXYZ0123456789 '.#-.,:/", "ERROR de escritura", _
|
|
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
|
|
' Deshechamos el carácter
|
|
e.Handled = True
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtDomicilioU_TextChanged(sender As System.Object, e As System.EventArgs) Handles TxtDomicilioU.TextChanged
|
|
If CaracteresNoValidos(TxtDomicilioU.Text, 1) = True Then
|
|
MsgBox("Existen caracteres invalidos, verifique por favor", MsgBoxStyle.Exclamation)
|
|
TxtDomicilioU.Text = ""
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtCPU_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TxtCPU.KeyPress
|
|
' Lista con los caracteres que deseo permitir.
|
|
Dim caracteresPermitidos As String = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ .0123456789,:/" & Convert.ToChar(8)
|
|
' Carácter presionado.
|
|
Dim c As Char = UCase(e.KeyChar)
|
|
' Si la tecla presionada no se encuentra en la matriz de caracteres permitidos, anulamos la tecla pulsada.
|
|
If (Not (caracteresPermitidos.Contains(c))) Then
|
|
MessageBox.Show("Carácter Invalido, Solo esta permitido los siguientes caracteres: ABCDEFGHIJKLMNÑOPQRSTUVWXYZ0123456789 '.,:/", "ERROR de escritura", _
|
|
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
|
|
' Deshechamos el carácter
|
|
e.Handled = True
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtCPU_TextChanged(sender As System.Object, e As System.EventArgs) Handles TxtCPU.TextChanged
|
|
If CaracteresNoValidos(TxtCPU.Text, 4) = True Then
|
|
MsgBox("Existen caracteres invalidos, verifique por favor", MsgBoxStyle.Exclamation)
|
|
TxtCPU.Text = ""
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtCiudadU_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TxtCiudadU.KeyPress
|
|
' Lista con los caracteres que deseo permitir.
|
|
Dim caracteresPermitidos As String = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ .0123456789#-,:/" & Convert.ToChar(8)
|
|
' Carácter presionado.
|
|
Dim c As Char = UCase(e.KeyChar)
|
|
' Si la tecla presionada no se encuentra en la matriz de caracteres permitidos, anulamos la tecla pulsada.
|
|
If (Not (caracteresPermitidos.Contains(c))) Then
|
|
MessageBox.Show("Carácter Invalido, Solo esta permitido los siguientes caracteres: ABCDEFGHIJKLMNÑOPQRSTUVWXYZ0123456789 '.#-,:/", "ERROR de escritura", _
|
|
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
|
|
' Deshechamos el carácter
|
|
e.Handled = True
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtCiudadU_TextChanged(sender As System.Object, e As System.EventArgs) Handles TxtCiudadU.TextChanged
|
|
If CaracteresNoValidos(TxtCiudadU.Text, 1) = True Then
|
|
MsgBox("Existen caracteres invalidos, verifique por favor", MsgBoxStyle.Exclamation)
|
|
TxtCiudadU.Text = ""
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtColoniaU_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TxtColoniaU.KeyPress
|
|
' Lista con los caracteres que deseo permitir.
|
|
Dim caracteresPermitidos As String = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ '.0123456789#-,:/" & Convert.ToChar(8)
|
|
' Carácter presionado.
|
|
Dim c As Char = UCase(e.KeyChar)
|
|
' Si la tecla presionada no se encuentra en la matriz de caracteres permitidos, anulamos la tecla pulsada.
|
|
If (Not (caracteresPermitidos.Contains(c))) Then
|
|
MessageBox.Show("Carácter Invalido, Solo esta permitido los siguientes caracteres: ABCDEFGHIJKLMNÑOPQRSTUVWXYZ0123456789 '.#-,:/", "ERROR de escritura", _
|
|
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
|
|
' Deshechamos el carácter
|
|
e.Handled = True
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtColoniaU_TextChanged(sender As System.Object, e As System.EventArgs) Handles TxtColoniaU.TextChanged
|
|
If CaracteresNoValidos(TxtColoniaU.Text, 1) = True Then
|
|
MsgBox("Existen caracteres invalidos, verifique por favor", MsgBoxStyle.Exclamation)
|
|
TxtColoniaU.Text = ""
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtCalleS_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TxtCalleS.KeyPress
|
|
' Lista con los caracteres que deseo permitir.
|
|
Dim caracteresPermitidos As String = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ0123456789 ,.:/" & Convert.ToChar(8)
|
|
' Carácter presionado.
|
|
Dim c As Char = UCase(e.KeyChar)
|
|
' Si la tecla presionada no se encuentra en la matriz de caracteres permitidos, anulamos la tecla pulsada.
|
|
If (Not (caracteresPermitidos.Contains(c))) Then
|
|
MessageBox.Show("Carácter Invalido, Solo esta permitido los siguientes caracteres: ABCDEFGHIJKLMNÑOPQRSTUVWXYZ0123456789 '.:/", "ERROR de escritura", _
|
|
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
|
|
' Deshechamos el carácter
|
|
e.Handled = True
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtCalleS_TextChanged(sender As System.Object, e As System.EventArgs) Handles TxtCalleS.TextChanged
|
|
If CaracteresNoValidos(TxtCalleS.Text, 4) = True Then
|
|
MsgBox("Existen caracteres invalidos, verifique por favor", MsgBoxStyle.Exclamation)
|
|
TxtCalleS.Text = ""
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtNumExtS_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TxtNumExtS.KeyPress
|
|
' Lista con los caracteres que deseo permitir.
|
|
Dim caracteresPermitidos As String = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ .0123456789,:/" & Convert.ToChar(8)
|
|
' Carácter presionado.
|
|
Dim c As Char = UCase(e.KeyChar)
|
|
' Si la tecla presionada no se encuentra en la matriz de caracteres permitidos, anulamos la tecla pulsada.
|
|
If (Not (caracteresPermitidos.Contains(c))) Then
|
|
MessageBox.Show("Carácter Invalido, Solo esta permitido los siguientes caracteres: ABCDEFGHIJKLMNÑOPQRSTUVWXYZ0123456789 '.,:/", "ERROR de escritura", _
|
|
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
|
|
' Deshechamos el carácter
|
|
e.Handled = True
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtNumExtS_TextChanged(sender As System.Object, e As System.EventArgs) Handles TxtNumExtS.TextChanged
|
|
If CaracteresNoValidos(TxtNumExtS.Text, 4) = True Then
|
|
MsgBox("Existen caracteres invalidos, verifique por favor", MsgBoxStyle.Exclamation)
|
|
TxtNumExtS.Text = ""
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtNumIntS_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TxtNumIntS.KeyPress
|
|
' Lista con los caracteres que deseo permitir.
|
|
Dim caracteresPermitidos As String = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ .0123456789,:/" & Convert.ToChar(8)
|
|
' Carácter presionado.
|
|
Dim c As Char = UCase(e.KeyChar)
|
|
' Si la tecla presionada no se encuentra en la matriz de caracteres permitidos, anulamos la tecla pulsada.
|
|
If (Not (caracteresPermitidos.Contains(c))) Then
|
|
MessageBox.Show("Carácter Invalido, Solo esta permitido los siguientes caracteres: ABCDEFGHIJKLMNÑOPQRSTUVWXYZ0123456789 '.,:/", "ERROR de escritura", _
|
|
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
|
|
' Deshechamos el carácter
|
|
e.Handled = True
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtNumIntS_TextChanged(sender As System.Object, e As System.EventArgs) Handles TxtNumIntS.TextChanged
|
|
|
|
End Sub
|
|
|
|
Private Sub TxtCPS_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TxtCPS.KeyPress
|
|
' Lista con los caracteres que deseo permitir.
|
|
Dim caracteresPermitidos As String = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ .0123456789,:/" & Convert.ToChar(8)
|
|
' Carácter presionado.
|
|
Dim c As Char = UCase(e.KeyChar)
|
|
' Si la tecla presionada no se encuentra en la matriz de caracteres permitidos, anulamos la tecla pulsada.
|
|
If (Not (caracteresPermitidos.Contains(c))) Then
|
|
MessageBox.Show("Carácter Invalido, Solo esta permitido los siguientes caracteres: ABCDEFGHIJKLMNÑOPQRSTUVWXYZ .0123456789,:/", "ERROR de escritura", _
|
|
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
|
|
' Deshechamos el carácter
|
|
e.Handled = True
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtCPS_MouseClick(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles TxtCPS.MouseClick
|
|
|
|
End Sub
|
|
|
|
Private Sub TxtCPS_TextChanged(sender As System.Object, e As System.EventArgs) Handles TxtCPS.TextChanged
|
|
If CaracteresNoValidos(TxtCPS.Text, 4) = True Then
|
|
MsgBox("Existen caracteres invalidos, verifique por favor", MsgBoxStyle.Exclamation)
|
|
TxtCPS.Text = ""
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtEstadoS_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TxtEstadoS.KeyPress
|
|
' Lista con los caracteres que deseo permitir.
|
|
Dim caracteresPermitidos As String = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ .0123456789,:/" & Convert.ToChar(8)
|
|
' Carácter presionado.
|
|
Dim c As Char = UCase(e.KeyChar)
|
|
' Si la tecla presionada no se encuentra en la matriz de caracteres permitidos, anulamos la tecla pulsada.
|
|
If (Not (caracteresPermitidos.Contains(c))) Then
|
|
MessageBox.Show("Carácter Invalido, Solo esta permitido los siguientes caracteres: ABCDEFGHIJKLMNÑOPQRSTUVWXYZ .0123456789,:/", "ERROR de escritura", _
|
|
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
|
|
' Deshechamos el carácter
|
|
e.Handled = True
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtEstadoS_TextChanged(sender As System.Object, e As System.EventArgs) Handles TxtEstadoS.TextChanged
|
|
If CaracteresNoValidos(TxtEstadoS.Text, 4) = True Then
|
|
MsgBox("Existen caracteres invalidos, verifique por favor", MsgBoxStyle.Exclamation)
|
|
TxtEstadoS.Text = ""
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtCiudadS_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TxtCiudadS.KeyPress
|
|
' Lista con los caracteres que deseo permitir.
|
|
Dim caracteresPermitidos As String = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ .0123456789#-,:/" & Convert.ToChar(8)
|
|
' Carácter presionado.
|
|
Dim c As Char = UCase(e.KeyChar)
|
|
' Si la tecla presionada no se encuentra en la matriz de caracteres permitidos, anulamos la tecla pulsada.
|
|
If (Not (caracteresPermitidos.Contains(c))) Then
|
|
MessageBox.Show("Carácter Invalido, Solo esta permitido los siguientes caracteres: ABCDEFGHIJKLMNÑOPQRSTUVWXYZ0123456789 '.-,:/", "ERROR de escritura", _
|
|
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
|
|
' Deshechamos el carácter
|
|
e.Handled = True
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtCiudadS_TextChanged(sender As System.Object, e As System.EventArgs) Handles TxtCiudadS.TextChanged
|
|
If CaracteresNoValidos(TxtCiudadS.Text, 1) = True Then
|
|
MsgBox("Existen caracteres invalidos, verifique por favor", MsgBoxStyle.Exclamation)
|
|
TxtCiudadS.Text = ""
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtColoniaS_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TxtColoniaS.KeyPress
|
|
' Lista con los caracteres que deseo permitir.
|
|
Dim caracteresPermitidos As String = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ '.0123456789#-,:/" & Convert.ToChar(8)
|
|
' Carácter presionado.
|
|
Dim c As Char = UCase(e.KeyChar)
|
|
' Si la tecla presionada no se encuentra en la matriz de caracteres permitidos, anulamos la tecla pulsada.
|
|
If (Not (caracteresPermitidos.Contains(c))) Then
|
|
MessageBox.Show("Carácter Invalido, Solo esta permitido los siguientes caracteres: ABCDEFGHIJKLMNÑOPQRSTUVWXYZ0123456789 '.#-,:/", "ERROR de escritura", _
|
|
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
|
|
' Deshechamos el carácter
|
|
e.Handled = True
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtColoniaS_TextChanged(sender As System.Object, e As System.EventArgs) Handles TxtColoniaS.TextChanged
|
|
If CaracteresNoValidos(TxtColoniaS.Text, 1) = True Then
|
|
MsgBox("Existen caracteres invalidos, verifique por favor", MsgBoxStyle.Exclamation)
|
|
TxtColoniaS.Text = ""
|
|
End If
|
|
End Sub
|
|
|
|
|
|
Private Sub DgvPersonas_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles DgvCargos.DoubleClick
|
|
Dim Respuesta As String
|
|
If DgvCargos.Rows.Count > 0 Then
|
|
Respuesta = MsgBox("¿ Desea eliminar el registro seleccionado ?", MsgBoxStyle.YesNo + MsgBoxStyle.Question)
|
|
If Respuesta = vbNo Then Exit Sub
|
|
DgvCargos.Rows.Remove(DgvCargos.CurrentRow)
|
|
End If
|
|
End Sub
|
|
|
|
|
|
Private Sub dgvPersonasE_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles dgvCargosE.DoubleClick
|
|
Dim Respuesta As String
|
|
If dgvCargosE.Rows.Count > 0 Then
|
|
Respuesta = MsgBox("¿ Desea eliminar el registro seleccionado ?", MsgBoxStyle.YesNo + MsgBoxStyle.Question)
|
|
If Respuesta = vbNo Then Exit Sub
|
|
dgvCargosE.Rows.Remove(dgvCargosE.CurrentRow)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtNombreEFE_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TxtNombreEFE.KeyPress
|
|
' Lista con los caracteres que deseo permitir.
|
|
Dim caracteresPermitidos As String = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ '." & Convert.ToChar(8)
|
|
' Carácter presionado.
|
|
Dim c As Char = UCase(e.KeyChar)
|
|
' Si la tecla presionada no se encuentra en la matriz de caracteres permitidos, anulamos la tecla pulsada.
|
|
If (Not (caracteresPermitidos.Contains(c))) Then
|
|
MessageBox.Show("Carácter Invalido, Solo esta permitido los siguientes caracteres: ABCDEFGHIJKLMNÑOPQRSTUVWXYZ '.", "ERROR de escritura", _
|
|
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
|
|
' Deshechamos el carácter
|
|
e.Handled = True
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtNombreEFE_TextChanged(sender As System.Object, e As System.EventArgs) Handles TxtNombreEFE.TextChanged
|
|
If CaracteresNoValidos(TxtNombreEFE.Text, 3) = True Then
|
|
MsgBox("Existen caracteres invalidos, verifique por favor", MsgBoxStyle.Exclamation)
|
|
TxtNombreEFE.Text = ""
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TxtCargoE_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TxtCargoE.TextChanged
|
|
If CaracteresNoValidos(TxtCargoE.Text, 3) = True Then
|
|
MsgBox("Existen caracteres invalidos, verifique por favor", MsgBoxStyle.Exclamation)
|
|
TxtCargoE.Text = ""
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub DgvCargos_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DgvCargos.CellContentClick
|
|
|
|
End Sub
|
|
|
|
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
|
|
Me.Close()
|
|
End Sub
|
|
Private Sub CargaGridAN(ByVal Estatus As String)
|
|
Dim Classcom As New clsComplejo
|
|
Dim ClassCatalogos As New ClassCatalogos
|
|
Dim SQL As String
|
|
Dim FILA As DataRow
|
|
Dim Parametros As New ArrayList
|
|
Dim DsDatos As New DataSet
|
|
Try
|
|
'LLENA GRID
|
|
'SQL = "SELECT DTDIAINHABIL, ID, DIA, MES, ANO FROM CAT_DIASINHABILES WHERE ANO = '" & Anio & "'"
|
|
SQL = "SELECT IDINFORME,ID_ORG_REGULADOR AS ORGANISMO,CLAVE_INSTITUCION AS INSTITUCION,FECHA_FIRMA AS ""FECHA FIRMA"",TIPO_VIGENCIA,INICIO_VIGENCIA,FIN_VIGENCIA,OBJETO_CONVENIO AS ""OBJETO DEL CONVENIO"",CLAVE_PAIS,UNIFICADO,DOMICILIO_UNIFICADO,CIUDAD_POBLACIONU,COLONIAU,CODIGO_POSTALU,ESTADO_PROVINCIAS,CODIGO_POSTALS,CIUDAD_POBLACIONS,COLONIAS,CALLES,NUM_EXTS,NUM_INTS,NOM_ENT_FIN_EXT AS ""ENTIDAD FINANCIERA EXTRANJERA"",ESTATUS FROM IEF_INFORMES WHERE ESTATUS = '" & Estatus & "'"
|
|
If ChkHistoria.Checked = True Then
|
|
SQL = SQL & " OR ESTATUS = 'E'"
|
|
End If
|
|
DsDatos = Classcom.fdtDataSet(SQL)
|
|
If DsDatos.Tables(0).Rows.Count > 0 Then
|
|
DgvInformes.CurrentRow.Selected = True
|
|
'DgvInformes.Columns(0).Visible = False
|
|
'DgvInformes.Columns(4).Visible = False
|
|
'DgvInformes.Columns(5).Visible = False
|
|
'DgvInformes.Columns(6).Visible = False
|
|
'DgvInformes.Columns(8).Visible = False
|
|
'DgvInformes.Columns(9).Visible = False
|
|
'DgvInformes.Columns(10).Visible = False
|
|
'DgvInformes.Columns(11).Visible = False
|
|
'DgvInformes.Columns(12).Visible = False
|
|
'DgvInformes.Columns(13).Visible = False
|
|
'DgvInformes.Columns(14).Visible = False
|
|
'DgvInformes.Columns(15).Visible = False
|
|
'DgvInformes.Columns(16).Visible = False
|
|
'DgvInformes.Columns(17).Visible = False
|
|
'DgvInformes.Columns(18).Visible = False
|
|
'DgvInformes.Columns(19).Visible = False
|
|
'DgvInformes.Columns(20).Visible = False
|
|
'DgvInformes.Columns(22).Visible = False
|
|
|
|
End If
|
|
Catch ex As Exception
|
|
MessageBox.Show("Error al cargar llenar Grid" & ex.Message, "Minds", MessageBoxButtons.OK, MessageBoxIcon.Warning)
|
|
End Try
|
|
End Sub
|
|
Private Sub BtnEnviado_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnEnviado.Click
|
|
|
|
Dim Classcom As New clsComplejo
|
|
Dim ClassCatalogos As New ClassCatalogos
|
|
Dim SQL As String
|
|
Dim FILA As DataRow
|
|
Dim Parametros As New ArrayList
|
|
Dim DsDatos As New DataSet
|
|
If MsgBox("¿ Desea marcar el registro como enviado ?", MsgBoxStyle.OkCancel, "Mensaje") = MsgBoxResult.Ok Then
|
|
ActualizaEnviado()
|
|
If ChkHistoria.Checked = True Then
|
|
CargaGridA("C")
|
|
End If
|
|
End If
|
|
|
|
End Sub
|
|
End Class |