verifica si usa contabilidad
This commit is contained in:
@@ -136,47 +136,51 @@ Partial Class CatSubProyectos
|
||||
|
||||
Private Sub CargaSegmentosNegocio()
|
||||
DdlSegmentoNegocio.Items.Clear()
|
||||
Dim Cuenta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If Cuenta.GetSegmentosNegocio(-1, "-1") Then
|
||||
|
||||
DtSegmentosNegocio = Cuenta.DtResultados.FiltraParametros("Id > 0")
|
||||
DtSegmentosNegocio.Rows.Add(New Object() {0, 0, " - ", "", ""})
|
||||
|
||||
Dim dataView As New DataView(DtSegmentosNegocio)
|
||||
dataView.Sort = "Id ASC"
|
||||
|
||||
DtSegmentosNegocio = dataView.ToTable
|
||||
|
||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
|
||||
Dim Cuenta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If Cuenta.GetSegmentosNegocio(-1, "-1") Then
|
||||
|
||||
DtSegmentosNegocio = Cuenta.DtResultados.FiltraParametros("Id > 0")
|
||||
DtSegmentosNegocio.Rows.Add(New Object() {0, 0, " - ", "", ""})
|
||||
|
||||
Dim dataView As New DataView(DtSegmentosNegocio)
|
||||
dataView.Sort = "Id ASC"
|
||||
|
||||
DtSegmentosNegocio = dataView.ToTable
|
||||
|
||||
End If
|
||||
Cuenta.Dispose()
|
||||
DdlSegmentoNegocio.DataSource = DtSegmentosNegocio : DdlSegmentoNegocio.DataBind()
|
||||
DdlSegmentoNegocio.Items.Insert(0, New ListItem("-", "-1"))
|
||||
|
||||
End If
|
||||
Cuenta.Dispose()
|
||||
DdlSegmentoNegocio.DataSource = DtSegmentosNegocio : DdlSegmentoNegocio.DataBind()
|
||||
DdlSegmentoNegocio.Items.Insert(0, New ListItem("-", "-1"))
|
||||
|
||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||
'If Gvr.DataKey("IdSegNeg").ToEntero > 0 Then
|
||||
'For Each Gvr As GridViewRow In GvDatos.Rows
|
||||
' 'If Gvr.DataKey("IdSegNeg").ToEntero > 0 Then
|
||||
|
||||
' 'COMENTADO PORQUE TRUENA | IPP - 17 AGOSTO 2017
|
||||
' 'Dim Cuenta2 As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
' 'If Cuenta2.GetSegmentosNegocio(Gvr.DataKey("IdSegNeg").ToEntero, "-1") Then
|
||||
' ' Dim DRES2 As DataRow
|
||||
' ' DRES2 = Cuenta2.DtResultados(0)
|
||||
' ' Gvr.Cells(1).Text = DRES2("Nombre").ToString
|
||||
' 'Else
|
||||
' ' Gvr.Cells(1).Text = "-"
|
||||
' 'End If
|
||||
' 'Cuenta2.Dispose()
|
||||
' ' 'COMENTADO PORQUE TRUENA | IPP - 17 AGOSTO 2017
|
||||
' ' 'Dim Cuenta2 As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
' ' 'If Cuenta2.GetSegmentosNegocio(Gvr.DataKey("IdSegNeg").ToEntero, "-1") Then
|
||||
' ' ' Dim DRES2 As DataRow
|
||||
' ' ' DRES2 = Cuenta2.DtResultados(0)
|
||||
' ' ' Gvr.Cells(1).Text = DRES2("Nombre").ToString
|
||||
' ' 'Else
|
||||
' ' ' Gvr.Cells(1).Text = "-"
|
||||
' ' 'End If
|
||||
' ' 'Cuenta2.Dispose()
|
||||
|
||||
' 'If DtSegmentosNegocio IsNot Nothing AndAlso DtSegmentosNegocio.Rows.Count > 0 Then
|
||||
' ' Dim dr As DataRow
|
||||
' ' dr = DtSegmentosNegocio.FiltroPrimero(String.Format("Id ={0}", Gvr.DataKey("IdSegNeg")))
|
||||
' ' Gvr.Cells(1).Text = dr("Nombre").ToString
|
||||
' 'End If
|
||||
' ' 'If DtSegmentosNegocio IsNot Nothing AndAlso DtSegmentosNegocio.Rows.Count > 0 Then
|
||||
' ' ' Dim dr As DataRow
|
||||
' ' ' dr = DtSegmentosNegocio.FiltroPrimero(String.Format("Id ={0}", Gvr.DataKey("IdSegNeg")))
|
||||
' ' ' Gvr.Cells(1).Text = dr("Nombre").ToString
|
||||
' ' 'End If
|
||||
|
||||
'Else
|
||||
' Gvr.Cells(1).Text = "0"
|
||||
'End If
|
||||
Next
|
||||
' 'Else
|
||||
' ' Gvr.Cells(1).Text = "0"
|
||||
' 'End If
|
||||
'Next
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Reference in New Issue
Block a user