Subproyecto correcto en dropdownlost

This commit is contained in:
2020-03-28 15:08:14 -07:00
parent 55a0fb7eca
commit d7ab4ed269

View File

@@ -499,6 +499,11 @@ Partial Class Ventas
Return ViewState("CveVenta").ToString.ToEntero
End Get
End Property
Private ReadOnly Property CveSubProyectoVenta As Integer
Get
Return If(IsNothing(ViewState("CveSubProyectoVenta")), -1, ViewState("CveSubProyectoVenta").ToString.ToEntero)
End Get
End Property
Private Property CveVentaPadre As Integer
Get
Return If(IsNothing(ViewState("CveVentaPadre")), -1, ViewState("CveVentaPadre").ToString.ToEntero)
@@ -3561,6 +3566,7 @@ Partial Class Ventas
ObjUsados.Dispose()
End If
ViewState("CveSubProyectoVenta") = DbRowVenta("CveSubProyecto").ToString.ToEntero
Me.CveEstatusFacturaPadre = DbRowVenta("CveEstatusFacturaPadre").ToString.ToEntero
'CargaEncabezado
@@ -4432,6 +4438,8 @@ Partial Class Ventas
DdlTipoRetencion.SelectedValueExist(DbRowVenta("CveTipoRetencion").ToString)
CargaPS(-1, DdlPS)
UpPS.Update()
UpContado.Update()
UpEstatus.Update()
@@ -5570,10 +5578,15 @@ Partial Class Ventas
Objeto.ddl.Items.Insert(0, New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
Objeto.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
Else
If Me.CveVenta > 0 Then
DdlSubProyectoDatos.SelectedValueExist(CveSubProyectoVenta)
End If
Dim cvesubproyecto As String = DdlSubProyectoDatos.SelectedValue
If UsuarioActual.CveEmpresa = 141 Then
cvesubproyecto = "-1"
End If
Objeto.Attributes.Add("data-cvesubproyecto", cvesubproyecto)
Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString)
Objeto.ddlWS.Attributes.Add("data-pagina", "ventas/ventas")