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