Pago Electronico Grupos

This commit is contained in:
Rakcsle Supertramp
2020-06-16 11:47:41 -07:00
parent 5312d055ba
commit ac1235240d
2 changed files with 92 additions and 44 deletions

View File

@@ -216,6 +216,62 @@ Partial Class Bancos_PagoElectronicoGrupos
End Property
Property CveIEPagoActual As Integer
Get
If ViewState("CveIEPagoActual") Is Nothing Then
Return -1
Else
Return ViewState("CveIEPagoActual").ToString.ToEntero
End If
End Get
Set(value As Integer)
ViewState("CveIEPagoActual") = value
End Set
End Property
Property CveLayoutEnvioDetalleActual As Integer
Get
If ViewState("CveLayoutEnvioDetalleActual") Is Nothing Then
Return -1
Else
Return ViewState("CveLayoutEnvioDetalleActual").ToString.ToEntero
End If
End Get
Set(value As Integer)
ViewState("CveLayoutEnvioDetalleActual") = value
End Set
End Property
Property GvIndexActual As Integer
Get
If ViewState("GvIndexActual") Is Nothing Then
Return -1
Else
Return ViewState("GvIndexActual").ToString.ToEntero
End If
End Get
Set(value As Integer)
ViewState("GvIndexActual") = value
End Set
End Property
Property DTFoliosPrefijos As DataTable
Get
If ViewState("DTFoliosPrefijos") Is Nothing Then
Return Crate_DTFoliosPrefijos()
Else
Return DirectCast(ViewState("DTFoliosPrefijos"), DataTable)
End If
End Get
Set(value As DataTable)
ViewState("DTFoliosPrefijos") = value
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
@@ -244,6 +300,18 @@ Partial Class Bancos_PagoElectronicoGrupos
End Sub
Private Function Crate_DTFoliosPrefijos() As DataTable
Dim DTFolios As New DataTable
DTFolios.Columns.Add("CveIE", GetType(Integer))
DTFolios.Columns.Add("Folio", GetType(String))
DTFolios.AcceptChanges()
Return DTFolios
End Function
#Region " C A R G A - D A T O S "
Private Sub CargaCuentas()
DdlCuenta.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros("UsaLayoutGrupos = 1")
@@ -2626,44 +2694,6 @@ Partial Class Bancos_PagoElectronicoGrupos
End Sub
Property CveIEPagoActual As Integer
Get
If ViewState("CveIEPagoActual") Is Nothing Then
Return -1
Else
Return ViewState("CveIEPagoActual").ToString.ToEntero
End If
End Get
Set(value As Integer)
ViewState("CveIEPagoActual") = value
End Set
End Property
Property CveLayoutEnvioDetalleActual As Integer
Get
If ViewState("CveLayoutEnvioDetalleActual") Is Nothing Then
Return -1
Else
Return ViewState("CveLayoutEnvioDetalleActual").ToString.ToEntero
End If
End Get
Set(value As Integer)
ViewState("CveLayoutEnvioDetalleActual") = value
End Set
End Property
Property GvIndexActual As Integer
Get
If ViewState("GvIndexActual") Is Nothing Then
Return -1
Else
Return ViewState("GvIndexActual").ToString.ToEntero
End If
End Get
Set(value As Integer)
ViewState("GvIndexActual") = value
End Set
End Property
@@ -2770,9 +2800,24 @@ Partial Class Bancos_PagoElectronicoGrupos
If Not ObjBanco.UpdateLayoutEnviosDetalle(CveLayoutEnvioDetalle, CveLayoutEnvio, CveIE, CveProveedor, 2, "", True) Then
ErrorProceso = True
End If
DTFoliosPrefijos.Clear()
For Each RowGV As GridViewRow In GvEnviadas.Rows
Dim nRow As DataRow = DTFoliosPrefijos.NewRow
nRow("CveIE") = RowGV.DataKey("CveIE").ToEntero
nRow("Folio") = RowGV.FCTextBox("TxtFolio").Text.Trim
DTFoliosPrefijos.Rows.Add(nRow)
Next
DTFoliosPrefijos.AcceptChanges()
If NuevoFolio <> "-1" Or Comprobante <> "-1" And Not ErrorProceso Then
If Not ObjBanco.UpdateBancos_IEFolio(CveIE, NuevoFolio, Comprobante) Then
ErrorProceso = True
@@ -2797,11 +2842,9 @@ Partial Class Bancos_PagoElectronicoGrupos
ErrorProceso = True
Alert("Error al guardar comprobante.", TipoMensaje.MsgError)
End Try
End If
If ErrorProceso Then
ObjBanco.RollBack()
Else
@@ -2811,8 +2854,13 @@ Partial Class Bancos_PagoElectronicoGrupos
CargaEnviados()
End If
For Each RowGV As GridViewRow In GvEnviadas.Rows
RowGV.FCTextBox("TxtFolio").Text = DTFoliosPrefijos.FiltroPrimeroValor("Folio", $"CveIE = {RowGV.DataKey("CveIE").ToEntero}")
Next
UpEnviados.Update()
End If
ObjBanco.Dispose()