configuracion Centro de costos RepProductos servicios Detalle
This commit is contained in:
@@ -310,6 +310,19 @@ Partial Class Compras_RepProductosServiciosDetalle
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaTipoCentroCosto()
|
Private Sub CargaTipoCentroCosto()
|
||||||
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
|
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
|
||||||
|
DdlSubProyecto.Items.Clear()
|
||||||
|
DivProyecto.Visible = False
|
||||||
|
LblProyecto.Visible = False
|
||||||
|
LblSubProyecto.InnerText = "Centro de costo"
|
||||||
|
|
||||||
|
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||||
|
'DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
DdlSubProyecto.DataBind()
|
||||||
|
|
||||||
|
DdlGrupo.Items.Insert(0, New ListItem("Centro de costo", "2"))
|
||||||
|
DdlGrupo.DataBind()
|
||||||
|
|
||||||
|
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then
|
||||||
DdlSubProyecto.Items.Clear()
|
DdlSubProyecto.Items.Clear()
|
||||||
DivProyecto.Visible = False
|
DivProyecto.Visible = False
|
||||||
LblProyecto.Visible = False
|
LblProyecto.Visible = False
|
||||||
@@ -322,30 +335,18 @@ Partial Class Compras_RepProductosServiciosDetalle
|
|||||||
DdlGrupo.Items.Insert(0, New ListItem("Sucursal", "2"))
|
DdlGrupo.Items.Insert(0, New ListItem("Sucursal", "2"))
|
||||||
DdlGrupo.DataBind()
|
DdlGrupo.DataBind()
|
||||||
|
|
||||||
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then
|
|
||||||
DdlSubProyecto.Items.Clear()
|
|
||||||
DivProyecto.Visible = False
|
|
||||||
LblProyecto.Visible = False
|
|
||||||
LblSubProyecto.InnerText = "Proyecto:"
|
|
||||||
|
|
||||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
|
||||||
'DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
|
||||||
DdlSubProyecto.DataBind()
|
|
||||||
|
|
||||||
DdlGrupo.Items.Insert(0, New ListItem("Proyecto", "2"))
|
|
||||||
DdlGrupo.DataBind()
|
|
||||||
|
|
||||||
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 3 Then
|
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 3 Then
|
||||||
DdlGrupo.Items.Insert(0, New ListItem("Proyecto", "1"))
|
DdlGrupo.Items.Insert(0, New ListItem("Proyecto", "1"))
|
||||||
DdlGrupo.Items.Insert(1, New ListItem("SubProyecto", "2"))
|
DdlGrupo.Items.Insert(1, New ListItem("SubProyecto", "2"))
|
||||||
DdlGrupo.DataBind()
|
DdlGrupo.DataBind()
|
||||||
|
LblSubProyecto.InnerText = "Proyecto"
|
||||||
|
|
||||||
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then
|
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then
|
||||||
LblProyecto.InnerText = "Sucursal:"
|
LblProyecto.InnerText = "Proyecto<br/>:"
|
||||||
LblSubProyecto.InnerText = "Proyecto:"
|
LblSubProyecto.InnerText = "Subproyecto:"
|
||||||
|
|
||||||
DdlGrupo.Items.Insert(0, New ListItem("Sucursal", "1"))
|
DdlGrupo.Items.Insert(0, New ListItem("Proyecto", "1"))
|
||||||
DdlGrupo.Items.Insert(1, New ListItem("Proyecto", "2"))
|
DdlGrupo.Items.Insert(1, New ListItem("Subproyecto", "2"))
|
||||||
DdlGrupo.DataBind()
|
DdlGrupo.DataBind()
|
||||||
|
|
||||||
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then
|
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then
|
||||||
@@ -356,6 +357,53 @@ Partial Class Compras_RepProductosServiciosDetalle
|
|||||||
DdlGrupo.Items.Insert(1, New ListItem("Sucursal", "2"))
|
DdlGrupo.Items.Insert(1, New ListItem("Sucursal", "2"))
|
||||||
DdlGrupo.DataBind()
|
DdlGrupo.DataBind()
|
||||||
End If
|
End If
|
||||||
|
'If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
|
||||||
|
' DdlSubProyecto.Items.Clear()
|
||||||
|
' DivProyecto.Visible = False
|
||||||
|
' LblProyecto.Visible = False
|
||||||
|
' LblSubProyecto.InnerText = "Sucursal:"
|
||||||
|
|
||||||
|
' DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||||
|
' 'DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
' DdlSubProyecto.DataBind()
|
||||||
|
|
||||||
|
' DdlGrupo.Items.Insert(0, New ListItem("Sucursal", "2"))
|
||||||
|
' DdlGrupo.DataBind()
|
||||||
|
|
||||||
|
'ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then
|
||||||
|
' DdlSubProyecto.Items.Clear()
|
||||||
|
' DivProyecto.Visible = False
|
||||||
|
' LblProyecto.Visible = False
|
||||||
|
' LblSubProyecto.InnerText = "Proyecto:"
|
||||||
|
|
||||||
|
' DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||||
|
' 'DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
' DdlSubProyecto.DataBind()
|
||||||
|
|
||||||
|
' DdlGrupo.Items.Insert(0, New ListItem("Proyecto", "2"))
|
||||||
|
' DdlGrupo.DataBind()
|
||||||
|
|
||||||
|
'ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 3 Then
|
||||||
|
' DdlGrupo.Items.Insert(0, New ListItem("Proyecto", "1"))
|
||||||
|
' DdlGrupo.Items.Insert(1, New ListItem("SubProyecto", "2"))
|
||||||
|
' DdlGrupo.DataBind()
|
||||||
|
|
||||||
|
'ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then
|
||||||
|
' LblProyecto.InnerText = "Sucursal:"
|
||||||
|
' LblSubProyecto.InnerText = "Proyecto:"
|
||||||
|
|
||||||
|
' DdlGrupo.Items.Insert(0, New ListItem("Sucursal", "1"))
|
||||||
|
' DdlGrupo.Items.Insert(1, New ListItem("Proyecto", "2"))
|
||||||
|
' DdlGrupo.DataBind()
|
||||||
|
|
||||||
|
'ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then
|
||||||
|
' LblProyecto.InnerText = "Proyecto:"
|
||||||
|
' LblSubProyecto.InnerText = "Sucursal:"
|
||||||
|
|
||||||
|
' DdlGrupo.Items.Insert(0, New ListItem("Proyecto", "1"))
|
||||||
|
' DdlGrupo.Items.Insert(1, New ListItem("Sucursal", "2"))
|
||||||
|
' DdlGrupo.DataBind()
|
||||||
|
'End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||||
|
|||||||
Reference in New Issue
Block a user