Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -293,6 +293,24 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property CargaBitacora As Boolean
|
||||
Get
|
||||
|
||||
If ViewState("CargaBitacora") Is Nothing Then
|
||||
ViewState("CargaBitacora") = False
|
||||
End If
|
||||
|
||||
Return Boolean.Parse(ViewState("CargaBitacora").ToString)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("CargaBitacora") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
@@ -932,7 +950,11 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
'SugerirFecha()
|
||||
If DdlAlmacen.SelectedValue.ToEntero > 0 And CveVentaSurtir > 0 Then
|
||||
CargaVentaPorSurtir(CveVentaSurtir, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero)
|
||||
' SugiereLoteCaducidad(DdlAlmacen.SelectedValue.ToEntero)
|
||||
|
||||
If CargaBitacora Then
|
||||
CargaBitacoraSerie()
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
GvDatos.DataSource = DtDatos
|
||||
@@ -1283,26 +1305,26 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
|
||||
'Valida Existencia
|
||||
If TipoMovimiento = 1 Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
||||
If Existencia < 1 Then
|
||||
Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error2")
|
||||
ObjInventarios.Dispose()
|
||||
Exit Sub
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
Else
|
||||
If DtExistencias IsNot Nothing Then
|
||||
Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {CvePSSerie} AND CveUM = {CveUMSerie} AND Serie = '{Serie}'")
|
||||
If Existencia < 1 Then
|
||||
Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error3")
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
'If TipoMovimiento = 1 Then
|
||||
' Dim ObjInventarios As New ClsInventarios
|
||||
' Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
||||
' If Existencia < 1 Then
|
||||
' Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
|
||||
' RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error2")
|
||||
' ObjInventarios.Dispose()
|
||||
' Exit Sub
|
||||
' End If
|
||||
' ObjInventarios.Dispose()
|
||||
'Else
|
||||
' If DtExistencias IsNot Nothing Then
|
||||
' Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {CvePSSerie} AND CveUM = {CveUMSerie} AND Serie = '{Serie}'")
|
||||
' If Existencia < 1 Then
|
||||
' Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
|
||||
' RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error3")
|
||||
' Exit Sub
|
||||
' End If
|
||||
' End If
|
||||
'End If
|
||||
|
||||
|
||||
Dim Row = DtDatosDetalle.NewRow
|
||||
@@ -1317,7 +1339,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
DtDatosDetalle.Rows.Add(Row)
|
||||
ActualizaBitacora()
|
||||
If Not CargaMasivo Then RegistraScript("playsonidito('beep-07.wav')", "Sonidito")
|
||||
RegistraScript("playsonidito('beep-07.wav')", "Sonidito")
|
||||
|
||||
If Tipo = 1 Then
|
||||
TxtSerie.Text = ""
|
||||
@@ -1364,23 +1386,35 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
Protected Sub HplCargaBitacora_Click(sender As Object, e As EventArgs)
|
||||
|
||||
CargaBitacora = False
|
||||
If IO.File.Exists(ArchivoBitacora) Then
|
||||
'DtInv.Clear()
|
||||
'DtDatosDetalle.Clear()
|
||||
|
||||
CargaBitacoraSerie()
|
||||
CargaGvDatos()
|
||||
CargaBitacora = True
|
||||
Else
|
||||
Alert("No hay bitácora para recuperar.", TipoMensaje.ToastInformacion)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaBitacoraSerie()
|
||||
|
||||
If IO.File.Exists(ArchivoBitacora) Then
|
||||
|
||||
DtDatos.ReadXml(ArchivoBitacora)
|
||||
If IO.File.Exists(ArchivoBitacoraDetalle) Then
|
||||
Dim dtt As New DataTable
|
||||
dtt.ReadXml(ArchivoBitacoraDetalle)
|
||||
DtDatosDetalle = dtt
|
||||
Alert("Registro(s) Recuperados", TipoMensaje.ToastInformacion)
|
||||
End If
|
||||
CargaGvDatos()
|
||||
|
||||
End If
|
||||
Else
|
||||
Alert("No hay bitácora para recuperar.", TipoMensaje.ToastInformacion)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
#Region " AGREGA CON LOTE BATCH "
|
||||
|
||||
@@ -3020,6 +3054,10 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Limpia()
|
||||
CargaPendientes()
|
||||
LimpiaCampos()
|
||||
|
||||
CargaBitacora = False
|
||||
|
||||
|
||||
Else
|
||||
ObjInventario.RollBack()
|
||||
Alert(TextoError.ToString(), TipoMensaje.MsgError)
|
||||
@@ -3452,6 +3490,9 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Limpia()
|
||||
LimpiaCampos()
|
||||
CargaPendientes()
|
||||
|
||||
CargaBitacora = False
|
||||
|
||||
Else
|
||||
Alert(TextoError, TipoMensaje.MsgError)
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
|
||||
@@ -87,6 +87,8 @@ Partial Class Inventarios_Remanufactura
|
||||
|
||||
Public Sub InicializaValores()
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
|
||||
TxtFecha.Text = Now.ToShortDateString
|
||||
|
||||
'Carga Clientes
|
||||
@@ -106,15 +108,7 @@ Partial Class Inventarios_Remanufactura
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlAlmacen.DataBind()
|
||||
|
||||
'Cargo Proyectos
|
||||
DdlProyecto.DataSource = GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlProyecto.DataBind()
|
||||
|
||||
CargaFolio()
|
||||
|
||||
CargaTipoCentroCosto()
|
||||
|
||||
CreaDTVentas()
|
||||
|
||||
End Sub
|
||||
@@ -133,37 +127,6 @@ Partial Class Inventarios_Remanufactura
|
||||
UpDatosRemanufactura.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaTipoCentroCosto()
|
||||
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
|
||||
DdlSubProyecto.Items.Clear()
|
||||
DivProyecto.Visible = False
|
||||
LblProyecto.Visible = False
|
||||
LblSubProyecto.Text = "Sucursal:"
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlSubProyecto.DataBind()
|
||||
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then
|
||||
DdlSubProyecto.Items.Clear()
|
||||
DivProyecto.Visible = False
|
||||
LblProyecto.Visible = False
|
||||
LblSubProyecto.Text = "Proyecto:"
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlSubProyecto.DataBind()
|
||||
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 3 Then
|
||||
DdlSubProyecto.Items.Clear()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlSubProyecto.DataBind()
|
||||
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then
|
||||
LblProyecto.Text = "Sucursal:"
|
||||
LblSubProyecto.Text = "Proyecto:"
|
||||
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then
|
||||
LblProyecto.Text = "Proyecto:"
|
||||
LblSubProyecto.Text = "Sucursal:"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "GUARDAR"
|
||||
@@ -976,12 +939,7 @@ Partial Class Inventarios_Remanufactura
|
||||
|
||||
#Region "SELECTED INDEX CHANGE"
|
||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DdlSubProyecto.Items.Clear()
|
||||
If DdlProyecto.SelectedValue.ToEntero > 0 Then
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, DdlProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1, 1)
|
||||
End If
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlSubProyecto.DataBind()
|
||||
CargarSubProyecto(DdlSubProyecto, DdlProyecto.SelectedValue)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -19,21 +19,12 @@ Partial Class Inventarios_RepAlmacen
|
||||
Set(value As DataTable)
|
||||
ViewState("TmpDT") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtColor As DataTable
|
||||
Get
|
||||
Return DirectCast(ViewState("DtColor"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtColor") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CargaTipoAlmacen()
|
||||
CargaDatos()
|
||||
CreaDataTableColor()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -132,78 +123,6 @@ Partial Class Inventarios_RepAlmacen
|
||||
RegistraScript("$('#DivModalGrafica').modal('show')")
|
||||
CambioGrafica()
|
||||
End Sub
|
||||
Private Sub CreaDataTableColor()
|
||||
DtColor = New DataTable
|
||||
DtColor.Columns.Add("Color")
|
||||
Dim RowColor As DataRow = Nothing
|
||||
RowColor = DtColor.NewRow()
|
||||
RowColor("Color") = "#FF0F00"
|
||||
DtColor.Rows.Add(RowColor)
|
||||
RowColor = Nothing
|
||||
RowColor = DtColor.NewRow()
|
||||
RowColor("Color") = "#FF6600"
|
||||
DtColor.Rows.Add(RowColor)
|
||||
RowColor = Nothing
|
||||
RowColor = DtColor.NewRow()
|
||||
RowColor("Color") = "#FF9E01"
|
||||
DtColor.Rows.Add(RowColor)
|
||||
RowColor = Nothing
|
||||
RowColor = DtColor.NewRow()
|
||||
RowColor("Color") = "#FCD202"
|
||||
DtColor.Rows.Add(RowColor)
|
||||
RowColor = Nothing
|
||||
RowColor = DtColor.NewRow()
|
||||
RowColor("Color") = "#F8FF01"
|
||||
DtColor.Rows.Add(RowColor)
|
||||
RowColor = Nothing
|
||||
RowColor = DtColor.NewRow()
|
||||
RowColor("Color") = "#B0DE09"
|
||||
DtColor.Rows.Add(RowColor)
|
||||
RowColor = Nothing
|
||||
RowColor = DtColor.NewRow()
|
||||
RowColor("Color") = "#04D215"
|
||||
DtColor.Rows.Add(RowColor)
|
||||
RowColor = Nothing
|
||||
RowColor = DtColor.NewRow()
|
||||
RowColor("Color") = "#0D8ECF"
|
||||
DtColor.Rows.Add(RowColor)
|
||||
RowColor = Nothing
|
||||
RowColor = DtColor.NewRow()
|
||||
RowColor("Color") = "#0D52D1"
|
||||
DtColor.Rows.Add(RowColor)
|
||||
RowColor = Nothing
|
||||
RowColor = DtColor.NewRow()
|
||||
RowColor("Color") = "#2A0CD0"
|
||||
DtColor.Rows.Add(RowColor)
|
||||
RowColor = Nothing
|
||||
RowColor = DtColor.NewRow()
|
||||
RowColor("Color") = "#8A0CCF"
|
||||
DtColor.Rows.Add(RowColor)
|
||||
RowColor = Nothing
|
||||
RowColor = DtColor.NewRow()
|
||||
RowColor("Color") = "#CD0D74"
|
||||
DtColor.Rows.Add(RowColor)
|
||||
RowColor = Nothing
|
||||
RowColor = DtColor.NewRow()
|
||||
RowColor("Color") = "#754DEB"
|
||||
DtColor.Rows.Add(RowColor)
|
||||
RowColor = Nothing
|
||||
RowColor = DtColor.NewRow()
|
||||
RowColor("Color") = "#DDDDDD"
|
||||
DtColor.Rows.Add(RowColor)
|
||||
RowColor = Nothing
|
||||
RowColor = DtColor.NewRow()
|
||||
RowColor("Color") = "#999999"
|
||||
DtColor.Rows.Add(RowColor)
|
||||
RowColor = Nothing
|
||||
RowColor = DtColor.NewRow()
|
||||
RowColor("Color") = "#333333"
|
||||
DtColor.Rows.Add(RowColor)
|
||||
RowColor = Nothing
|
||||
RowColor = DtColor.NewRow()
|
||||
RowColor("Color") = "#000000"
|
||||
DtColor.Rows.Add(RowColor)
|
||||
End Sub
|
||||
|
||||
Private Sub CambioGrafica()
|
||||
Dim Dt As New DataTable()
|
||||
@@ -222,12 +141,10 @@ Partial Class Inventarios_RepAlmacen
|
||||
Case 2
|
||||
Row("Valor") = Dr("Total").ToString.FormatoNumero
|
||||
End Select
|
||||
Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString
|
||||
Row("Color") = Colors(RowColorIndex)
|
||||
Dt.Rows.Add(Row)
|
||||
RowColorIndex += 1
|
||||
If RowColorIndex = 17 Then
|
||||
RowColorIndex = 0
|
||||
End If
|
||||
If RowColorIndex >= Colors.Length Then RowColorIndex = 0
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
@@ -63,12 +63,10 @@
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<label runat="server" id="LblSubProyecto" class="col-md-1 truncate">SubProyecto:</label>
|
||||
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
|
||||
<div runat="server" id="DivSubProyecto" class="col-md-2">
|
||||
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me"></asp:DropDownList>
|
||||
</div>
|
||||
<label runat="server" id="LblGripo" class="col-md-1 truncate">Grupo:</label>
|
||||
<div runat="server" id="Div1" class="col-md-1">
|
||||
|
||||
@@ -78,12 +78,12 @@
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlAlmacen" runat="server" Class="table-group-action-input form-control input-inline input-small input-sm select2me" DataTextField="Almacen" DataValueField="CveAlmacen" AppendDataBoundItems="true"></asp:DropDownList>
|
||||
</div>
|
||||
<label runat="server" id="LblProyecto" class="col-md-1 truncate">Proyecto:</label>
|
||||
<asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label>
|
||||
<div runat="server" id="DivProyecto" class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label runat="server" id="LblSubProyecto" class="col-md-1 truncate">SubProyecto:</label>
|
||||
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
|
||||
<div runat="server" id="DivSubProyecto" class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
|
||||
@@ -19,6 +19,9 @@ Partial Class Inventarios_RepReciclaje
|
||||
End Sub
|
||||
|
||||
Public Sub InicializaValores()
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
|
||||
txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
|
||||
@@ -39,53 +42,11 @@ Partial Class Inventarios_RepReciclaje
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlAlmacen.DataBind()
|
||||
|
||||
'Cargo Proyectos
|
||||
DdlProyecto.DataSource = GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlProyecto.DataBind()
|
||||
|
||||
CargaTipoCentroCosto()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTipoCentroCosto()
|
||||
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()
|
||||
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()
|
||||
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 3 Then
|
||||
DdlSubProyecto.Items.Clear()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlSubProyecto.DataBind()
|
||||
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then
|
||||
LblProyecto.InnerText = "Sucursal:"
|
||||
LblSubProyecto.InnerText = "Proyecto:"
|
||||
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then
|
||||
LblProyecto.InnerText = "Proyecto:"
|
||||
LblSubProyecto.InnerText = "Sucursal:"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "SELECTED INDEX CHANGE"
|
||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DdlSubProyecto.Items.Clear()
|
||||
If DdlProyecto.SelectedValue.ToEntero > 0 Then
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, DdlProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1, 1)
|
||||
End If
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlSubProyecto.DataBind()
|
||||
CargarSubProyecto(DdlSubProyecto, DdlProyecto.SelectedValue)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Reference in New Issue
Block a user