From 17428b548d53778ae03945338d0d290d421e799c Mon Sep 17 00:00:00 2001 From: rakcsle Date: Sat, 27 Apr 2024 00:41:55 -0700 Subject: [PATCH] SMS 2024-04-25 --- App_Code/ClsOS.vb | 3 +- App_Code/ClsVentas.vb | 3 +- App_Code/modExtensiones.vb | 43 +++++++++++++++ OS/OrdenesServicios.aspx | 95 +++++++++++++++++--------------- OS/OrdenesServicios.aspx.vb | 64 +++++++++++++++++---- OS/RepOSMedicas.aspx.vb | 5 +- Ventas/CatMedicos.aspx.vb | 14 ++++- Ventas/CatProcedimientos.aspx.vb | 2 +- Ventas/Ventas.aspx.vb | 4 +- 9 files changed, 169 insertions(+), 64 deletions(-) diff --git a/App_Code/ClsOS.vb b/App_Code/ClsOS.vb index 1263b38d9..b2f8c1d29 100644 --- a/App_Code/ClsOS.vb +++ b/App_Code/ClsOS.vb @@ -497,7 +497,7 @@ Public Class ClsOS Public Function GetRepOrdenesServicioMedicasRep(FechaI As Date, FechaF As Date, CveCliente As Integer, CveVendedor As Integer, CveEstatusOrdenServicio As Integer, CveUsuarioAtendio As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, - Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveEspecialidad As Integer = -1, Optional CveClienteSucursal As Integer = -1) As Boolean + Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveEspecialidad As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional CveUsuario As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OS_OrdenesServiciosMedicasRepGet") @@ -516,6 +516,7 @@ Public Class ClsOS .Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento .Add("@CveEspecialidad", SqlDbType.Int).Value = CveEspecialidad .Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario End With diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 79e1de33e..21f150695 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -6931,7 +6931,7 @@ Public Class ClsVentas #End Region - Public Function GetVentasMedicasIndicadoresRep(Grupo As Integer, FechaI As Date, FechaF As Date, CveCliente As Integer, CveMedico As Integer, CveProcedimiento As Integer, CveEmpresa As Integer) As Boolean + Public Function GetVentasMedicasIndicadoresRep(Grupo As Integer, FechaI As Date, FechaF As Date, CveCliente As Integer, CveMedico As Integer, CveProcedimiento As Integer, CveEmpresa As Integer, CveVendedor As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasMedicasIndicadoresRepGet") @@ -6943,6 +6943,7 @@ Public Class ClsVentas .Add("@CveMedico", SqlDbType.Int).Value = CveMedico .Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index 854ab6997..5bb948f6b 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -681,6 +681,49 @@ Namespace Extensiones directorioNew.Clear() Return retorno End Function + + + Public Function FilesCopy(oldName As String, newName As String, newDirectorio As String, Optional Sobreescribir As Boolean = False, Optional ConcatenarDirectorioBase As Boolean = True) As Boolean + Dim retorno As Boolean = True + Dim directorioOld As New StringBuilder + Dim directorioNew As New StringBuilder + directorioOld.AppendFormat("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, oldName) + If newName = "" Then + newName = oldName + Else + newName = String.Format("{0}{1}", newName, System.IO.Path.GetExtension(directorioOld.ToString())) + End If + + 'SI VA A LA CARPETA DE EMPRESAS TIENE QUE TOMAR LA RUTA DE EMPRESAS + If ConcatenarDirectorioBase Then + If newDirectorio.Contains("Empresas") Then + directorioNew.AppendFormat("{0}{1}\", ModExtensiones.DirectorioBaseEmpresas, newDirectorio) + Else + directorioNew.AppendFormat("{0}{1}\", AppDomain.CurrentDomain.BaseDirectory, newDirectorio) + End If + Else + 'SI YA TIENE EL DIRECTORIO COMPLETO NO CONCANTENA EL DIRECTORIO + directorioNew.AppendFormat("{0}\", newDirectorio) + End If + + + If Not Directory.Exists(directorioNew.ToString) Then + Directory.CreateDirectory(directorioNew.ToString) + End If + + directorioNew.Append(newName) + Try + My.Computer.FileSystem.CopyFile(directorioOld.ToString, directorioNew.ToString, Sobreescribir) + + Catch ex As Exception + Alert("", String.Format("{0} code[FilesMove]", ex.Message), TipoMensaje.MsgAdvertencia) + retorno = False + End Try + directorioOld.Clear() + directorioNew.Clear() + Return retorno + End Function + Public Function DirectoryExistsCreate(ByRef NombreDirectorio As String) As Boolean diff --git a/OS/OrdenesServicios.aspx b/OS/OrdenesServicios.aspx index 3d3defc25..c00c2b15b 100644 --- a/OS/OrdenesServicios.aspx +++ b/OS/OrdenesServicios.aspx @@ -1314,46 +1314,55 @@ -