-
This commit is contained in:
@@ -42,23 +42,23 @@ Partial Class General_ColectivasDetalle
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
Private Sub CargaCuentasContables()
|
'Private Sub CargaCuentasContables()
|
||||||
Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa)
|
' Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
If ObjContabilidad.GetCuentas(-1, "-1", -1) Then
|
' If ObjContabilidad.GetCuentas(-1, "-1", -1) Then
|
||||||
DtCuentasContables = ObjContabilidad.DtResultados
|
' DtCuentasContables = ObjContabilidad.DtResultados
|
||||||
DdlCtaContColectivas.DataSource = ObjContabilidad.DtResultados
|
' DdlCtaContColectivas.DataSource = ObjContabilidad.DtResultados
|
||||||
DdlCtaContColectivas.DataBind()
|
' DdlCtaContColectivas.DataBind()
|
||||||
Else
|
' Else
|
||||||
DtCuentasContables = Nothing
|
' DtCuentasContables = Nothing
|
||||||
End If
|
' End If
|
||||||
ObjContabilidad.Dispose()
|
' ObjContabilidad.Dispose()
|
||||||
|
|
||||||
End Sub
|
'End Sub
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
|
|
||||||
If UsuarioActual.Empresa.UsaContabilidad Then CargaCuentasContables()
|
'If UsuarioActual.Empresa.UsaContabilidad Then CargaCuentasContables()
|
||||||
|
|
||||||
If Request("CveColectiva") IsNot Nothing AndAlso IsNumeric(Request("CveColectiva")) AndAlso Request("CveColectiva").ToEntero > 0 Then
|
If Request("CveColectiva") IsNot Nothing AndAlso IsNumeric(Request("CveColectiva")) AndAlso Request("CveColectiva").ToEntero > 0 Then
|
||||||
ViewState("CveColectiva") = Request("CveColectiva")
|
ViewState("CveColectiva") = Request("CveColectiva")
|
||||||
@@ -81,7 +81,7 @@ Partial Class General_ColectivasDetalle
|
|||||||
Private Sub CargarDatos()
|
Private Sub CargarDatos()
|
||||||
Dim ObjColectivasDetalle As New ClsGenerales
|
Dim ObjColectivasDetalle As New ClsGenerales
|
||||||
|
|
||||||
If ObjColectivasDetalle.GetColectivas(CveColectiva, "-1", "-1", "-1", UsuarioActual.CveEmpresa) Then
|
If ObjColectivasDetalle.GetColectivas(UsuarioActual.CveEmpresa, CveColectiva) Then
|
||||||
If ObjColectivasDetalle.DtResultados.Rows.Count > 0 Then
|
If ObjColectivasDetalle.DtResultados.Rows.Count > 0 Then
|
||||||
TxtColectiva.Text = ObjColectivasDetalle.Colectiva
|
TxtColectiva.Text = ObjColectivasDetalle.Colectiva
|
||||||
TxtCodigo.Text = ObjColectivasDetalle.Codigo
|
TxtCodigo.Text = ObjColectivasDetalle.Codigo
|
||||||
@@ -90,7 +90,6 @@ Partial Class General_ColectivasDetalle
|
|||||||
TxtTelefono.Text = ObjColectivasDetalle.Telefono
|
TxtTelefono.Text = ObjColectivasDetalle.Telefono
|
||||||
TxtCorreo.Text = ObjColectivasDetalle.Correo
|
TxtCorreo.Text = ObjColectivasDetalle.Correo
|
||||||
DdlTipo.SelectedValue = ObjColectivasDetalle.Tipo.ToString
|
DdlTipo.SelectedValue = ObjColectivasDetalle.Tipo.ToString
|
||||||
DdlCtaContColectivas.SelectedValue = ObjColectivasDetalle.IdCtaContable.ToString
|
|
||||||
ChkEstado.Checked = ObjColectivasDetalle.Estatus
|
ChkEstado.Checked = ObjColectivasDetalle.Estatus
|
||||||
LblFechaCaptura.Text = ObjColectivasDetalle.FechaIng.ToString
|
LblFechaCaptura.Text = ObjColectivasDetalle.FechaIng.ToString
|
||||||
LblUsuarioCapturo.Text = ObjColectivasDetalle.Usuario
|
LblUsuarioCapturo.Text = ObjColectivasDetalle.Usuario
|
||||||
@@ -102,11 +101,11 @@ Partial Class General_ColectivasDetalle
|
|||||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||||
Dim ObjColectivasDetalle As New ClsGenerales
|
Dim ObjColectivasDetalle As New ClsGenerales
|
||||||
Dim ObjCuentasDeposito As New ClsGenerales(ObjColectivasDetalle.IniciaTransacSQL())
|
Dim ObjCuentasDeposito As New ClsGenerales(ObjColectivasDetalle.IniciaTransacSQL())
|
||||||
Dim ErrorBancos = False
|
Dim ErrorBancos As Boolean = False
|
||||||
|
|
||||||
If CveColectiva = -1 Then
|
If CveColectiva = -1 Then
|
||||||
If ObjColectivasDetalle.AddColectivas(TxtColectiva.Text.Trim, TxtCodigo.Text.Trim, TxtRFC.Text.Trim, TxtDireccion.Text.Trim, TxtTelefono.Text.Trim, TxtCorreo.Text.Trim, DdlCtaContColectivas.SelectedValue.ToEntero, DdlCtaContColectivas.SelectedItem.ToString, DdlTipo.SelectedValue.ToEntero.ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
If ObjColectivasDetalle.AddColectivas(TxtColectiva.Text.Trim, TxtCodigo.Text.Trim, TxtRFC.Text.Trim, TxtDireccion.Text.Trim, TxtTelefono.Text.Trim, TxtCorreo.Text.Trim, DdlCtaContColectivas.SelectedValue.ToEntero, DdlCtaContColectivas.SelectedItem.ToString, DdlTipo.SelectedValue.ToEntero.ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
Dim NuevoCveColectiva = ObjColectivasDetalle.CveColectiva
|
Dim NuevoCveColectiva As Integer = ObjColectivasDetalle.CveColectiva
|
||||||
|
|
||||||
''Agregar Cuentas Bancarias
|
''Agregar Cuentas Bancarias
|
||||||
If TempDTCuentasBancos.Rows.Count > 0 Then
|
If TempDTCuentasBancos.Rows.Count > 0 Then
|
||||||
@@ -118,7 +117,7 @@ Partial Class General_ColectivasDetalle
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
End If
|
End If
|
||||||
If ObjColectivasDetalle.GetColectivas(CveColectiva, "-1", "-1", "-1", -1) Then
|
If ObjColectivasDetalle.GetColectivas(UsuarioActual.CveEmpresa, CveColectiva) Then
|
||||||
GlobalDTGralColectivas(-1) = ObjColectivasDetalle.DtResultados
|
GlobalDTGralColectivas(-1) = ObjColectivasDetalle.DtResultados
|
||||||
Else
|
Else
|
||||||
ErrorBancos = True
|
ErrorBancos = True
|
||||||
@@ -265,7 +264,7 @@ Partial Class General_ColectivasDetalle
|
|||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
If CveColectiva < 0 Then
|
If CveColectiva < 0 Then
|
||||||
For index = 1 To TempDTCuentasBancos.Rows.Count
|
For index As Integer = 1 To TempDTCuentasBancos.Rows.Count
|
||||||
TempDTCuentasBancos.Rows(index - 1)("CveCuentaDeposito") = index
|
TempDTCuentasBancos.Rows(index - 1)("CveCuentaDeposito") = index
|
||||||
Next
|
Next
|
||||||
TempDTCuentasBancos.AcceptChanges()
|
TempDTCuentasBancos.AcceptChanges()
|
||||||
@@ -283,14 +282,14 @@ Partial Class General_ColectivasDetalle
|
|||||||
Protected Sub GvBancosCuentas_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvBancosCuentas.RowUpdating
|
Protected Sub GvBancosCuentas_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvBancosCuentas.RowUpdating
|
||||||
|
|
||||||
|
|
||||||
Dim NombreBanco = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNombreBanco").Text.Trim
|
Dim NombreBanco As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNombreBanco").Text.Trim
|
||||||
Dim NumeroSucursal = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroSucursal").Text.Trim
|
Dim NumeroSucursal As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroSucursal").Text.Trim
|
||||||
Dim CLABE = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtCLABE").Text.Trim
|
Dim CLABE As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtCLABE").Text.Trim
|
||||||
Dim SWIFT = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtSWIFT").Text.Trim
|
Dim SWIFT As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtSWIFT").Text.Trim
|
||||||
Dim Plaza = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtPlaza").Text.Trim
|
Dim Plaza As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtPlaza").Text.Trim
|
||||||
Dim NumeroCuenta = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroCuenta").Text.Trim
|
Dim NumeroCuenta As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroCuenta").Text.Trim
|
||||||
Dim ConvenioCIE = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtConvenioCIE").Text.Trim
|
Dim ConvenioCIE As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtConvenioCIE").Text.Trim
|
||||||
Dim Referencia = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtReferencia").Text.Trim
|
Dim Referencia As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtReferencia").Text.Trim
|
||||||
Dim ObjCuentasBancos As New ClsGenerales
|
Dim ObjCuentasBancos As New ClsGenerales
|
||||||
|
|
||||||
If CveColectiva > 0 Then
|
If CveColectiva > 0 Then
|
||||||
@@ -301,7 +300,7 @@ Partial Class General_ColectivasDetalle
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString.ToEntero - 1
|
Dim index As Integer = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString.ToEntero - 1
|
||||||
Dim Row As DataRow = TempDTCuentasBancos.Rows(index)
|
Dim Row As DataRow = TempDTCuentasBancos.Rows(index)
|
||||||
Row("BancoNombre") = NombreBanco
|
Row("BancoNombre") = NombreBanco
|
||||||
Row("Sucursal") = NumeroSucursal
|
Row("Sucursal") = NumeroSucursal
|
||||||
@@ -329,7 +328,7 @@ Partial Class General_ColectivasDetalle
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString.ToEntero - 1
|
Dim index As Integer = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString.ToEntero - 1
|
||||||
TempDTCuentasBancos.Rows.RemoveAt(index)
|
TempDTCuentasBancos.Rows.RemoveAt(index)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user