114 lines
2.8 KiB
VB.net
114 lines
2.8 KiB
VB.net
Option Explicit On
|
|
Option Strict On
|
|
|
|
Imports System.Data
|
|
Imports System.Linq
|
|
Imports Extensiones
|
|
|
|
Partial Class Contabilidad_RepPolizasCuadre
|
|
Inherits ClsPaginas
|
|
|
|
Private Sub Contabilidad_RepPolizasCuadre_Load(sender As Object, e As EventArgs) Handles Me.Load
|
|
If Not IsPostBack Then
|
|
|
|
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
|
CargaEjercicios()
|
|
MuestraControlesContabilidadSIG()
|
|
CargaDatosContabilidaSIG()
|
|
Else
|
|
CargaGrid()
|
|
End If
|
|
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub CargaGrid()
|
|
Dim ObjPolizas As New ClsContPAQi(UsuarioActual.Empresa)
|
|
|
|
If ObjPolizas.GetPolizasCuadre() Then
|
|
GvDatos.DataSource = ObjPolizas.DtResultados()
|
|
End If
|
|
|
|
ObjPolizas.Dispose()
|
|
GvDatos.DataBind()
|
|
UpDatos.Update()
|
|
End Sub
|
|
|
|
|
|
Private Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
|
Dim Liga1 As String = String.Format("/Contabilidad/RegPoliza.aspx?IdPoliza={0}", e.Row.DBCampo("IdPoliza"))
|
|
e.Row.FCLiteral("LtNumPoliza").Text = String.Format("<a class='Texto' href='{0}' target='_blank'>{1}</a>", Liga1, e.Row.DBCampo("NumPol"))
|
|
|
|
End If
|
|
End Sub
|
|
|
|
|
|
#Region " C O N T A B L I D A D S I G"
|
|
Private Sub MuestraControlesContabilidadSIG()
|
|
|
|
GvDatos.Visible = False
|
|
|
|
GvDatosSIG.Visible = True
|
|
|
|
BtnConsultar.Visible = True
|
|
DvRowFiltrosContanSig1.Visible = True
|
|
|
|
End Sub
|
|
|
|
Private Sub CargaDatosContabilidaSIG()
|
|
|
|
|
|
Dim ObjP As New ClsContabilidad
|
|
|
|
If ObjP.GetPolizasDescuadre(DdlEjercicio.SelectedValue.ToEntero, DdlPeriodo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
|
|
|
If ObjP.DtResultados.Rows.Count > 0 Then
|
|
GvDatosSIG.DataSource = ObjP.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
|
Else
|
|
GvDatosSIG.DataSource = Nothing
|
|
End If
|
|
Else
|
|
GvDatosSIG.DataSource = Nothing
|
|
End If
|
|
|
|
ObjP.Dispose()
|
|
|
|
GvDatosSIG.DataBind()
|
|
UpDatos.Update()
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
Private Sub CargaEjercicios()
|
|
|
|
Dim Clsconta As New ClsContabilidad
|
|
If Clsconta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
|
DdlEjercicio.DataSource = Clsconta.DtResultados
|
|
Else
|
|
DdlEjercicio.DataSource = Nothing
|
|
End If
|
|
Clsconta.Dispose()
|
|
|
|
DdlEjercicio.DataBind()
|
|
DdlEjercicio.SelectedValue = NowADS().Year.ToString
|
|
|
|
DdlPeriodo.SelectedValue = NowADS().Month.ToString
|
|
|
|
End Sub
|
|
|
|
|
|
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
|
CargaDatosContabilidaSIG()
|
|
End Sub
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
End Class
|