Cambios en centro de costos en RepBalanzaComprobacion y RepEstadoResultadosHorizontal

This commit is contained in:
RPimienta
2023-02-20 23:43:33 -06:00
parent 81e9d80095
commit baa6978e42
5 changed files with 817 additions and 753 deletions

View File

@@ -1,6 +1,7 @@
Option Explicit On
Option Strict On
Imports System
Imports System.Data
Imports Extensiones
Imports Microsoft.Reporting.WebForms
@@ -53,6 +54,23 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
End Set
End Property
Private Property CveProyecto As Integer
Get
CveProyecto = ViewState("CveProyecto").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveProyecto") = value
End Set
End Property
Private Property CveSubProyecto As Integer
Get
CveSubProyecto = ViewState("CveSubProyecto").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveSubProyecto") = value
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
@@ -85,23 +103,27 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
If Not ErrorParametros Then
CargaDatos()
End If
Else
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
DdlSubproyecto.DataBind()
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto)
End If
End Sub
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged
CargarSubProyecto(DdlSubproyecto, DdlProyecto.SelectedValue, "Todos")
End Sub
#Region "CARGA DATOS Y GRID"
Private Sub CargaDatos()
' Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
Dim ObjConta As New ClsContabilidad
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
CveSubProyecto = DdlSubproyecto.SelectedValue.ToEntero.ToEntero
CveProyecto = DdlProyecto.SelectedValue.ToEntero.ToEntero
Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
If ObjConta.GetBalanzaComprobacion(FechaInicio, FechaFin, DdlTipoCuentas.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa, 0, DdlNivel.SelectedValue.ToEntero) Then
If ObjConta.GetBalanzaComprobacion(FechaInicio, FechaFin, DdlTipoCuentas.SelectedValue.ToEntero, TipoReporte, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, 0, DdlNivel.SelectedValue.ToEntero) Then
DtDatos = ObjConta.DtResultados
@@ -170,7 +192,7 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
e.Row.FCLabel("LbSaldoActual").Visible = True
e.Row.FCLabel("LbSaldoActual").Text = String.Format("{0} <br/>{1}", e.Row.DBCampo("SaldoAD").FormatoNumero, e.Row.DBCampo("SaldoAA").FormatoNumero)
Else
If ModoImpresion Then e.Row.Cells(5).Text = e.Row.FCHyperLink("HLSaldoActual").Text Else e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}", e.Row.DBCampo("ID"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString)
If ModoImpresion Then e.Row.Cells(5).Text = e.Row.FCHyperLink("HLSaldoActual").Text Else e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("ID"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString, CveProyecto, CveSubProyecto)
End If
End If
End Sub