From 1c0ed51f534519151e3ef9bebadb6eacaafd2e8f Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Wed, 10 Jan 2024 00:07:37 -0700 Subject: [PATCH] ventas manifiesto --- App_Code/ClsVentas.vb | 19 +++++++++++++++++++ Ventas/Ventas.aspx.vb | 9 +++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 08e1b50ed..793ee709c 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -217,6 +217,25 @@ Public Class ClsVentas End Try Return retorno End Function + Public Function CGame_ManifiestoUpvta(cveVenta As Int32, cveUsuario As Int32, cveEmpresa As Int32, CveManifiesto As Int32) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_CGame_ManifiestoUpvta", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveVenta", SqlDbType.Int).Value = cveVenta + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@CveManifiesto", SqlDbType.Int).Value = CveManifiesto + .Add("@CveUsuario", SqlDbType.Int).Value = cveUsuario + End With + + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar venta manifiesto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return retorno + End Function + Public Function GetVentaTerminal(CveVentaTerminal As Integer, Fecha As DateTime, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_VentasGetTerminal") diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 5a7f08614..06355686c 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2678,8 +2678,7 @@ Partial Class Ventas Using ObjVentas As New ClsCGame() If ObjVentas.ManifiestoGet(Request("CveManifiesto").ToEntero(), -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, "-1", "-1") Then - 'DdlSubProyectoDatos.SelectedValueExist(ObjVentas.DtResultados.Rows(0)("CveSubProyecto").ToString()) - DdlSubProyectoDatos.SelectedValueExist("12629") + DdlSubProyectoDatos.SelectedValueExist(ObjVentas.DtResultados.Rows(0)("CveSubProyecto").ToString()) End If If ObjVentas.ManifiestoForVtaGet(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Request("CveManifiesto").ToEntero()) Then @@ -10106,6 +10105,12 @@ Partial Class Ventas If ObjVentas.Embarque_ManifiestoUpvta(ObjFactura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request("CveEmbarqueManifiesto").ToEntero()) Then + End If + End If + If Request("CveManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveManifiesto")) AndAlso Request("CveManifiesto").ToEntero() > 0 Then + + If ObjVentas.CGame_ManifiestoUpvta(ObjFactura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request("CveManifiesto").ToEntero()) Then + End If End If Catch ex As Exception