From 2e377cbb26a6421c1eecef3ab7c76098da63b8a9 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 25 Jan 2024 18:28:16 -0700 Subject: [PATCH] SMS - 2024.01.23 correcion actualziar episodio y paciente --- App_Code/ClsOS.vb | 4 +++- OS/OrdenesServicios.aspx.vb | 13 ++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/App_Code/ClsOS.vb b/App_Code/ClsOS.vb index 950871f6f..1bd14b0b8 100644 --- a/App_Code/ClsOS.vb +++ b/App_Code/ClsOS.vb @@ -1305,7 +1305,7 @@ Public Class ClsOS Return Retorno End Function - Public Function UpdateVentaOS(CveVenta As Integer, CveOS As Integer) As Boolean + Public Function UpdateVentaOS(CveVenta As Integer, CveOS As Integer, Optional Paciente As String = "-1", Optional Episodio As String = "-1") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OS_UpdateVentaOS") @@ -1313,6 +1313,8 @@ Public Class ClsOS With SqlAdapter.SelectCommand.Parameters .Add("@CveVenta", SqlDbType.Int).Value = CveVenta .Add("@CveOS", SqlDbType.Int).Value = CveOS + .Add("@Paciente", SqlDbType.VarChar).Value = Paciente + .Add("@Episodio", SqlDbType.VarChar).Value = Episodio End With Try diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb index 62bbef2f1..ffb9530fe 100644 --- a/OS/OrdenesServicios.aspx.vb +++ b/OS/OrdenesServicios.aspx.vb @@ -3271,14 +3271,21 @@ Partial Class OS_OrdenesServicios End If If ProcesoOK Then - - If Not ObjOS.UpdateVentaOS(Respuesta.CveVenta, CveOS) Then + If Not ObjOS.UpdateVentaOS(Respuesta.CveVenta, CveOS, TxtPacienteModal.Text.Trim, TxtEpisodioModal.Text.Trim) Then ProcesoOK = False End If - End If + + + End If + End If + + + If ProcesoOK Then + If Not ObjOS.UpdateVentaOS(-1, CveOS, TxtPacienteModal.Text.Trim, TxtEpisodioModal.Text.Trim) Then + ProcesoOK = False End If End If