From a287c967413f85959be6324494abe73e98502711 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Sun, 1 Aug 2021 00:37:11 -0700 Subject: [PATCH] Parametro de Concatenar Directorio en metodo FilesMove de la clase Archivo de DropZone --- AF/AF.aspx.vb | 10 +-- AF/ResguardoAF.aspx.vb | 6 +- App_Code/modExtensiones.vb | 16 +++-- Bancos/CreditosPagoMultiple.aspx.vb | 2 +- Bancos/IE.aspx.vb | 4 +- Bancos/PagoAcreedor.aspx.cs | 4 +- Bancos/PagoDeudor.aspx.cs | 4 +- Bancos/PolizaCheque.aspx.vb | 2 +- Bancos/PrestamoPersonal.aspx.cs | 92 ++++++++++++++-------------- Bancos/ProveedoresAbonar.aspx.vb | 2 +- Bancos/Transferencias.aspx.vb | 2 +- CRM/Acercamiento.aspx.cs | 2 +- CRM/EmpresaCRM.aspx.cs | 2 +- Compras/Compras.aspx.vb | 4 +- Compras/Proveedores.aspx.vb | 2 +- Compras/eFacturas.aspx.vb | 5 +- Contratos/Contrato.aspx.vb | 2 +- Contratos/Contrato.vb | 2 +- Contratos/ContratoAvance.aspx.vb | 8 +-- Contratos/ContratoObra.aspx.vb | 2 +- Inventarios/EntradasSalidas.aspx.vb | 4 +- Inventarios/RecepcionAlmacen.aspx.vb | 2 +- Inventarios/RecepcionUsados.aspx.vb | 4 +- OC/RepCotizacionesDetalle.aspx.vb | 4 +- OI/Normatividad.aspx.vb | 4 +- OS/OrdenesServicios.aspx.vb | 4 +- Prospectos/Prospectos.aspx.vb | 2 +- RH/Personal.aspx.vb | 4 +- RH/Prospectos.aspx.vb | 2 +- Ventas/Clientes.aspx.vb | 2 +- Ventas/ClientesAbonar.aspx.vb | 2 +- Ventas/Ventas.aspx.vb | 2 +- 32 files changed, 108 insertions(+), 101 deletions(-) diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb index 5c2f76690..a9d79c531 100644 --- a/AF/AF.aspx.vb +++ b/AF/AF.aspx.vb @@ -766,7 +766,7 @@ Partial Class AF_AF End If If Filename <> "" Then - Filename.FilesMove(String.Format("{0}", Archivo.Name), String.Format("Empresas\{0}\AF\Placas", UsuarioActual.CveEmpresa)) + Filename.FilesMove(String.Format("{0}", Archivo.Name), String.Format("{0}AF\Placas", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If If HdnModalidad.Value = "A" Then @@ -883,7 +883,7 @@ Partial Class AF_AF End If If Filename <> "" Then - Filename.FilesMove(String.Format("{0}", Archivo.Name), String.Format("Empresas\{0}\AF\Licencias", UsuarioActual.CveEmpresa)) + Filename.FilesMove(String.Format("{0}", Archivo.Name), String.Format("{0}AF\Licencias", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If If HdnModalidadLicencia.Value = "A" Then @@ -1036,7 +1036,7 @@ Partial Class AF_AF End If If Filename <> "" Then - Filename.FilesMove(String.Format("{0}", Archivo.Name), String.Format("{0}AF\Polizas", UsuarioActual.Empresa.Ruta)) + Filename.FilesMove(String.Format("{0}", Archivo.Name), String.Format("{0}AF\Polizas", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If If HdnModalidadPoliza.Value = "A" Then @@ -1929,7 +1929,7 @@ Partial Class AF_AF If EsURL2 Then If objAF.UpdateActivosFijosResguardosURL("-1", $"AFT{CveResguardoPadre}.{FileExtension}", CveResguardoPadre) Then If filemove <> "" Then - filemove.FilesMove(String.Format("AFT{0}", CveResguardoPadre), String.Format("Empresas\{0}\AF\Resguardos", UsuarioActual.CveEmpresa)) + filemove.FilesMove(String.Format("AFT{0}", CveResguardoPadre), String.Format("{0}AF\Resguardos", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If Else HuboError = True @@ -1937,7 +1937,7 @@ Partial Class AF_AF Else If objAF.UpdateActivosFijosResguardosURL($"AFR{CveResguardoPadre}.{FileExtension}", "-1", CveResguardoPadre) Then If filemove <> "" Then - filemove.FilesMove(String.Format("AFR{0}", CveResguardoPadre), String.Format("Empresas\{0}\AF\Resguardos", UsuarioActual.CveEmpresa)) + filemove.FilesMove(String.Format("AFR{0}", CveResguardoPadre), String.Format("{0}AF\Resguardos", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If Else HuboError = True diff --git a/AF/ResguardoAF.aspx.vb b/AF/ResguardoAF.aspx.vb index 86984d0f8..03ab0ce02 100644 --- a/AF/ResguardoAF.aspx.vb +++ b/AF/ResguardoAF.aspx.vb @@ -545,7 +545,7 @@ Partial Class AF_ResguardoAF If File.Exists(String.Format("{0}\AF\Resguardos\AFR{1}.{2}", UsuarioActual.Empresa.Ruta, CveResguardoPadre, FileExtension)) Then File.Delete(String.Format("{0}AF\Resguardos\AFR{1}.{2}", UsuarioActual.Empresa.Ruta, CveResguardoPadre, FileExtension)) End If - If filemove.FilesMove(String.Format("AFR{0}", CveResguardoPadre), String.Format("{0}AF\Resguardos", UsuarioActual.Empresa.Ruta)) Then + If filemove.FilesMove(String.Format("AFR{0}", CveResguardoPadre), String.Format("{0}AF\Resguardos", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) Then HuboError = False Else HuboError = True @@ -561,7 +561,7 @@ Partial Class AF_ResguardoAF If File.Exists(String.Format("{0}AF\Resguardos\AFR{1}.{2}", UsuarioActual.Empresa.Ruta, CveResguardoPadre, FileExtension)) Then File.Delete(String.Format("{0}AF\Resguardos\AFR{1}.{2}", UsuarioActual.Empresa.Ruta, CveResguardoPadre, FileExtension)) End If - If filemove.FilesMove(String.Format("AFT{0}", CveResguardoPadre), String.Format("{0}AF\Resguardos", UsuarioActual.Empresa.Ruta)) Then + If filemove.FilesMove(String.Format("AFT{0}", CveResguardoPadre), String.Format("{0}AF\Resguardos", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) Then HuboError = False Else HuboError = True @@ -578,7 +578,7 @@ Partial Class AF_ResguardoAF If File.Exists(String.Format("{0}AF\Resguardos\AFR{1}.{2}", UsuarioActual.Empresa.Ruta, CveResguardoPadre, FileExtension)) Then File.Delete(String.Format("{0}AF\Resguardos\AFR{1}.{2}", UsuarioActual.Empresa.Ruta, CveResguardoPadre, FileExtension)) End If - If filemove.FilesMove(String.Format("AFR{0}", CveResguardoPadre), String.Format("{0}AF\Resguardos", UsuarioActual.Empresa.Ruta)) Then + If filemove.FilesMove(String.Format("AFR{0}", CveResguardoPadre), String.Format("{0}AF\Resguardos", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) Then HuboError = False Else HuboError = True diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index 95863dc34..3743692cd 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -519,7 +519,7 @@ Namespace Extensiones Return retorno End Function - Public Function FilesMove(oldName As String, newName As String, newDirectorio As String, Optional Sobreescribir As Boolean = False) As Boolean + Public Function FilesMove(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 @@ -531,11 +531,17 @@ Namespace Extensiones End If 'SI VA A LA CARPETA DE EMPRESAS TIENE QUE TOMAR LA RUTA DE EMPRESAS - If newDirectorio.Contains("Empresas") Then - directorioNew.AppendFormat("{0}{1}\", ModExtensiones.DirectorioBaseEmpresas, newDirectorio) + 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 - directorioNew.AppendFormat("{0}{1}\", AppDomain.CurrentDomain.BaseDirectory, newDirectorio) - End If + '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) diff --git a/Bancos/CreditosPagoMultiple.aspx.vb b/Bancos/CreditosPagoMultiple.aspx.vb index 3389cd8d3..55cf1b55f 100644 --- a/Bancos/CreditosPagoMultiple.aspx.vb +++ b/Bancos/CreditosPagoMultiple.aspx.vb @@ -302,7 +302,7 @@ Partial Class Bancos_CreditosPagoMultiple Alert("El Documento se guardó correctamente.", TipoMensaje.MsgInformacion, "document.location.href=""/Bancos/CreditosPagoMultiple.aspx"";") If filemove <> "" Then - filemove.FilesMove(CveIE.ToString, String.Format("Empresas\{0}\IE", UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta)) + filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If ObjIE.Commit() GeneraChequePDF(CveIE, UsuarioActual.Empresa) diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index b2f5d6555..7bde7a0bc 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -2737,7 +2737,7 @@ Partial Class Bancos_IE 'GUARDA COMPROBANTE If filemove <> "" Then - filemove.FilesMove(CveIE.ToString, String.Format("Empresas\{0}\IE", UsuarioActual.CveEmpresa)) + filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If 'GUARDA PREPOLIZAS DETALLE [PRIMERO SON LOS CASOS ESPECIALES, AL FINAL (ELSE) LOS CASOS NORMALES] --REEMPLAZA IFs @@ -4880,7 +4880,7 @@ Partial Class Bancos_IE If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format("{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIE) Then If filemove <> "" Then - filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa)) + filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If GvEB.DataSource = ObjEventoBitacora.DtResultados diff --git a/Bancos/PagoAcreedor.aspx.cs b/Bancos/PagoAcreedor.aspx.cs index 0220112e6..56fa5710f 100644 --- a/Bancos/PagoAcreedor.aspx.cs +++ b/Bancos/PagoAcreedor.aspx.cs @@ -321,7 +321,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas //GUARDA COMPROBANTE if (!filemove.Equals("")) { - filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta)); + filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:false); } decimal Importe; decimal ImporteMN; @@ -744,7 +744,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas //GUARDA COMPROBANTE if (!filemove.Equals("")) { - filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta)); + filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false); } if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, Ref, CveConceptoContableBanco, Conc, DateTime.Now, IDCtaContableBancos, -1, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: ImporteMN, TipoCambio: TC, TipoCambioPago: TC, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) diff --git a/Bancos/PagoDeudor.aspx.cs b/Bancos/PagoDeudor.aspx.cs index 9176dded2..abd9ee76f 100644 --- a/Bancos/PagoDeudor.aspx.cs +++ b/Bancos/PagoDeudor.aspx.cs @@ -355,7 +355,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas //GUARDA COMPROBANTE if (!filemove.Equals("")) { - filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta)); + filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false); } // SI ES DOLARES @@ -699,7 +699,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas //GUARDA COMPROBANTE if (!filemove.Equals("")) { - filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta)); + filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false); } //GUARDA PREPOLIZAS DETALLE diff --git a/Bancos/PolizaCheque.aspx.vb b/Bancos/PolizaCheque.aspx.vb index ff500fbfe..4c7177d1f 100644 --- a/Bancos/PolizaCheque.aspx.vb +++ b/Bancos/PolizaCheque.aspx.vb @@ -1021,7 +1021,7 @@ Partial Class Bancos_PolizaCheque 'If Conta IsNot Nothing Then Conta.Commit() If filemove <> "" Then - filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta)) + filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If GeneraChequePDF(CveIE, UsuarioActual.Empresa, IDPoliza) diff --git a/Bancos/PrestamoPersonal.aspx.cs b/Bancos/PrestamoPersonal.aspx.cs index 083e605c0..61470b145 100644 --- a/Bancos/PrestamoPersonal.aspx.cs +++ b/Bancos/PrestamoPersonal.aspx.cs @@ -10,8 +10,8 @@ using System.Web.UI.WebControls; using Extensiones; using static Extensiones.ModExtensiones; public partial class Bancos_PrestamoPersonal : ClsPaginas -{ - #region "PROPIEDADES" +{ + #region "PROPIEDADES" private int IDCtaContablePrestamo { get @@ -106,7 +106,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas txtFechaF.Text = DateTime.Now.ToShortDateString(); TxtImporte.Attributes.Add("disabled", "disabled"); - if(UsuarioActual.Empresa.Funcionalidad(281).ToEntero() == 1) + if (UsuarioActual.Empresa.Funcionalidad(281).ToEntero() == 1) { TxtFechaPrestamo.Enabled = false; ImgCalendarioPrestamo.Visible = false; @@ -187,8 +187,8 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas { divTCPago.Visible = false; TxtTCPago.Text = "1"; - } - + } + long Folio; ClsBancos bancos = new ClsBancos(); Folio = bancos.GetNextFolio(DdlCuenta.SelectedValue.ToEntero(), DdlTipoTransaccion.SelectedValue.ToEntero()); @@ -268,17 +268,17 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas if (CvePrePoliza > 0) { decimal ImporteBanco = TxtImporte.Text.ToDecimal(); - decimal ImporteMNBanco= ImporteBanco; + decimal ImporteMNBanco = ImporteBanco; decimal ImporteComplementaria = 0; decimal TC = TxtTCPago.Text.ToDecimal(); string Conc = TxtObservaciones.Text == "" ? TxtFolio.Text : TxtObservaciones.Text; string Ref = TxtObservaciones.Text == "" ? TxtFolio.Text : TxtObservaciones.Text; CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero(), DdlTipoTransaccion.SelectedValue.ToEntero(), TxtFechaDocumento.Text.Trim().ToDate(), TxtFolio.Text.Trim(), DdlFuncionarioEmpleadoPago.SelectedItem.Text, ImporteBanco.ToString().ToDouble(), CveMoneda, - TC.ToString().ToDouble() , TxtObservaciones.Text.Trim(), "", ChkAbonoCuenta.Checked, false, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); + TC.ToString().ToDouble(), TxtObservaciones.Text.Trim(), "", ChkAbonoCuenta.Checked, false, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); if (CveMoneda != 1) - { + { if (UsaComplementaria) { ImporteMNBanco = ImporteBanco; @@ -296,7 +296,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas //GUARDA COMPROBANTE if (!filemove.Equals("")) { - filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta)); + filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false); } decimal Importe; decimal ImporteMN; @@ -323,9 +323,9 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas ImporteMN = Importe * TC; ImporteComplementaria = 0; } - } - - + } + + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, Ref, CveConceptoContablePago, Conc, DateTime.Now, IDCtaContablePrestamo, -1, CveIE, CvePersonal: DdlFuncionarioEmpleadoPago.SelectedValue.ToEntero(), ImporteMX: ImporteMN, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TC, TipoCambioPago: TC)) { MsgError = "No se pudo insertar concepto de pago acreedor"; @@ -352,7 +352,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, ImporteBanco, Ref, CveConceptoContableBancoComplementario, Conc, DateTime.Now, IDCtaContableBancosPrestamo, -1, CveIE, CvePersonal: DdlFuncionarioEmpleadoPago.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, ImporteME: ImporteBanco, TipoCambio: TC, TipoCambioPago: TC)) { MsgError = "No se pudo insertar concepto de bancos complementaria"; - } + } } } @@ -377,7 +377,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas } //CONTABILIZA - if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("") ) + if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("")) { if (IDCtaContablePrestamo > 0 && IDCtaContableBancos > 0) { @@ -471,11 +471,11 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas int tCveMoneda = 0; if (dr != null) { - tCveMoneda = dr["CveMoneda"].ToString().ToEntero(); - - IDCtaContableBancosPrestamo = dr["IdCtaContable"].ToString().ToEntero(); - IDCtaContableBancosPrestamoComplementario = dr["IdCtaContableComplementaria"].ToString().ToEntero(); - + tCveMoneda = dr["CveMoneda"].ToString().ToEntero(); + + IDCtaContableBancosPrestamo = dr["IdCtaContable"].ToString().ToEntero(); + IDCtaContableBancosPrestamoComplementario = dr["IdCtaContableComplementaria"].ToString().ToEntero(); + } if (tCveMoneda != 1) @@ -487,9 +487,9 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas { divTCPrestamo.Visible = false; TxtTCPrestamo.Text = "1"; - } - - + } + + long Folio; ClsBancos bancos = new ClsBancos(); Folio = bancos.GetNextFolio(DdlCuentaPrestamo.SelectedValue.ToEntero(), DdlTipoTransanccionPrestamo.SelectedValue.ToEntero()); @@ -500,7 +500,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas } - private void AsignaCuentaPersonal( int CvePersonal, int tCveMoneda) + private void AsignaCuentaPersonal(int CvePersonal, int tCveMoneda) { IDCtaContablePrestamo = 0; @@ -508,10 +508,10 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas if (CvePersonal > 0) { - if (ObjRH.GetPersonal(CvePersonal,UsuarioActual.CveEmpresa)) + if (ObjRH.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa)) { - IDCtaContablePrestamo = ObjRH.IdCtaContPrestamos; - + IDCtaContablePrestamo = ObjRH.IdCtaContPrestamos; + } } ObjRH.Dispose(); @@ -550,7 +550,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas AsignaCuentaPersonal(DdlFuncionarioEmpleadoPrestamo.SelectedValue.ToEntero(), CveMoneda); // DATOS PREPOLIZA - if (DdlTipoTransanccionPrestamo.SelectedValue == "1" && UsuarioActual.CveEmpresa != 119 ) FolioFijo = TxtFolioPrestamo.Text.ToEntero(); + if (DdlTipoTransanccionPrestamo.SelectedValue == "1" && UsuarioActual.CveEmpresa != 119) FolioFijo = TxtFolioPrestamo.Text.ToEntero(); CvePrePoliza = ObjMov.AddPrePolizas("Bancos/PRESTAMO PERSONAL", CvePlantillaPoliza, TxtImportePrestamo.Text.Trim().ToDouble(), TxtImportePrestamo.Text.Trim().ToDouble(), CveMoneda, TxtFechaPrestamo.Text.ToDate(), DdlFuncionarioEmpleadoPrestamo.SelectedItem.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, null, UsuarioActual.CveEmpresa)); @@ -564,11 +564,11 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas string Ref = TxtObservacionesPrestamo.Text == "" ? TxtFolioPrestamo.Text : TxtObservacionesPrestamo.Text; CveIE = ObjIE.AddBancos_IE(DdlCuentaPrestamo.SelectedValue.ToEntero(), DdlTipoTransanccionPrestamo.SelectedValue.ToEntero(), TxtFechaPrestamo.Text.Trim().ToDate(), TxtFolioPrestamo.Text.Trim(), DdlFuncionarioEmpleadoPrestamo.SelectedItem.Text, Importe.ToString().ToDouble(), CveMoneda, - TC.ToString().ToDouble(), TxtObservacionesPrestamo.Text.Trim(), "", false, false, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); - + TC.ToString().ToDouble(), TxtObservacionesPrestamo.Text.Trim(), "", false, false, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); + if (CveMoneda != 1) { - if (UsuarioActual.CveEmpresa.Contiene (1, 119)) { UsaComplementaria = true; } + if (UsuarioActual.CveEmpresa.Contiene(1, 119)) { UsaComplementaria = true; } if (UsaComplementaria) { @@ -579,21 +579,21 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas { ImporteMN = Importe * TC; ImporteComplementaria = 0; - } - - } - - - + } + + } + + + if (CveIE > 0) { //GUARDA COMPROBANTE if (!filemove.Equals("")) { - filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta)); + filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:false); } - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, Ref, CveConceptoContableBanco, Conc, DateTime.Now, IDCtaContableBancosPrestamo, -1, CveIE, CvePersonal: DdlFuncionarioEmpleadoPrestamo.SelectedValue.ToEntero(), ImporteMX: ImporteMN, TipoCambio: TC, TipoCambioPago:TC)) + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, Ref, CveConceptoContableBanco, Conc, DateTime.Now, IDCtaContableBancosPrestamo, -1, CveIE, CvePersonal: DdlFuncionarioEmpleadoPrestamo.SelectedValue.ToEntero(), ImporteMX: ImporteMN, TipoCambio: TC, TipoCambioPago: TC)) { MsgError = "No se pudo insertar concepto de bancos"; } @@ -603,7 +603,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas } if (CveMoneda != 1 && UsaComplementaria) - { + { if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, Ref, CveConceptoContableBancoComplementario, Conc, DateTime.Now, IDCtaContableBancosPrestamo, -1, CveIE, CvePersonal: DdlFuncionarioEmpleadoPrestamo.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TC)) { MsgError = "No se pudo insertar concepto de bancos complementaria"; @@ -612,9 +612,9 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas { MsgError = "No se pudo insertar concepto de acreedor complementaria"; } - } - - + } + + } else { @@ -637,7 +637,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas } //CONTABILIZA - if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("") ) + if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("")) { if (IDCtaContablePrestamo > 0 && IDCtaContableBancosPrestamo > 0) { @@ -732,10 +732,10 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas if (DdlFuncionarioEmpleado.SelectedValue.ToEntero() > 0) CvePersonal = DdlFuncionarioEmpleado.SelectedValue.ToEntero(); ClsBancos bancos = new ClsBancos(); - if(bancos.GetPersonalPrestamoAuxiliar(CvePersonal, FechaI, FechaF, UsuarioActual.CveEmpresa)) + if (bancos.GetPersonalPrestamoAuxiliar(CvePersonal, FechaI, FechaF, UsuarioActual.CveEmpresa)) { - GvAuxiliar.DataSource = bancos.DtResultados; - + GvAuxiliar.DataSource = bancos.DtResultados; + } bancos.Dispose(); GvAuxiliar.DataBind(); diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 55b03dca0..0d3286ab6 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -888,7 +888,7 @@ Partial Class Bancos_ProveedoresAbonar 'guardo el archivo If filemove <> "" Then - filemove.FilesMove(CveIE.ToString, String.Format("{0}\IE", UsuarioActual.Empresa.Ruta)) + filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If Anexo.Text = "" diff --git a/Bancos/Transferencias.aspx.vb b/Bancos/Transferencias.aspx.vb index 097a21b4f..1cdd89b8e 100644 --- a/Bancos/Transferencias.aspx.vb +++ b/Bancos/Transferencias.aspx.vb @@ -296,7 +296,7 @@ Partial Class Bancos_Transferencias If (CveIE > 0 AndAlso CveIEDestino > 0) Then If filemove <> "" Then - filemove.FilesMove(CveIE.ToString, String.Format("Empresas\{0}\IE", UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta)) + filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If 'inserto los movimientos de la conta para abonar al saldo diff --git a/CRM/Acercamiento.aspx.cs b/CRM/Acercamiento.aspx.cs index 03abe16fb..bd33d2fb3 100644 --- a/CRM/Acercamiento.aspx.cs +++ b/CRM/Acercamiento.aspx.cs @@ -1059,7 +1059,7 @@ public partial class CRM_Acercamiento : ClsPaginas if (ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim(), string.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoProcesoCRM: CveTipoProceso, CveAcercamientoCRM: CveAcercamiento, CveEtapaProcesoCRM: CveEtapa)) { if (filemove != "") - filemove.FilesMove(string.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString()), string.Format(@"Empresas\{0}\OI", UsuarioActual.CveEmpresa)); + filemove.FilesMove(string.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString()), string.Format(@"{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:false); TxtEventoDescripcion.Text = ""; diff --git a/CRM/EmpresaCRM.aspx.cs b/CRM/EmpresaCRM.aspx.cs index b0dc49fe5..14b65061a 100644 --- a/CRM/EmpresaCRM.aspx.cs +++ b/CRM/EmpresaCRM.aspx.cs @@ -1068,7 +1068,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas if (ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim(), string.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM)) { if (filemove != "") - filemove.FilesMove(string.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString()), string.Format(@"Empresas\{0}\OI", UsuarioActual.CveEmpresa)); + filemove.FilesMove(string.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString()), string.Format(@"{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:false); TxtEventoDescripcion.Text = ""; diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 9cf041aca..26d8de58e 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1630,7 +1630,7 @@ Partial Class Compras_Compras Dim dr As DataRow = ObjeFacturas.DtResultados.Rows(0) ' no toma la cero, porque es el totalizador Dim XMLDoc As New XmlDocument - Dim Archivo As String = String.Format("{0}Compras\{2}\{3}", UsuarioActual.Empresa.Ruta, dr("RFCDe"), dr("XML")) + Dim Archivo As String = String.Format("{0}Compras\{1}\{2}", UsuarioActual.Empresa.Ruta, dr("RFCDe"), dr("XML")) If IO.File.Exists(Archivo) Then Dim Validada As Boolean = True @@ -13585,7 +13585,7 @@ Partial Class Compras_Compras If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=CveCompra) Then If Filename <> "" Then - Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa)) + Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If GvEB.DataSource = ObjEventoBitacora.DtResultados diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index 3d6f80da9..0d721b704 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -2699,7 +2699,7 @@ Partial Class Compras_Proveedores If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor) Then If filemove <> "" Then - filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa)) + filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If GvEB.DataSource = ObjEventoBitacora.DtResultados diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index aa2e004dd..9b4d611c9 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -1428,7 +1428,8 @@ Partial Class Compras_eFacturas If filemove <> "" Then 'filemove.FilesMove("", String.Format("{0}\Temp\Facturas", UsuarioActual.Empresa.Ruta)) - filemove.FilesMove("", String.Format("{0}Temp\Facturas", UsuarioActual.Empresa.Ruta)) + 'filemove.FilesMove("", String.Format("Empresas\{0}\Temp\Facturas", UsuarioActual.CveEmpresa)) + filemove.FilesMove("", String.Format("{0}Temp\Facturas", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) 'AGREGA XML A LA LISTA If FileExtension.ToUpper = "XML" Or FileExtension.ToUpper = "PDF" Then ListXML.Add(String.Format("{0}Temp\Facturas\{1}", UsuarioActual.Empresa.Ruta, filemove)) @@ -1454,7 +1455,7 @@ Partial Class Compras_eFacturas ListaComprimidos.Add(filePath) 'CREO DIRECTORIO ALEATORIO Dim Aleatorio As New Random - Dim TempDirectorio As String = String.Format("{0}\{1}\{2}{3}", UsuarioActual.Empresa.Ruta, "Temp\Facturas", Date.Now.Ticks, Aleatorio.Next(100, 999)) + Dim TempDirectorio As String = String.Format("{0}{1}\{2}{3}", UsuarioActual.Empresa.Ruta, "Temp\Facturas", Date.Now.Ticks, Aleatorio.Next(100, 999)) Directory.CreateDirectory(TempDirectorio) ListaDirectoriosTemporales.Add(TempDirectorio) 'AGREGA DIRECTORIO A LA LISTA diff --git a/Contratos/Contrato.aspx.vb b/Contratos/Contrato.aspx.vb index 35ab2b146..02127071e 100644 --- a/Contratos/Contrato.aspx.vb +++ b/Contratos/Contrato.aspx.vb @@ -3248,7 +3248,7 @@ Partial Class Contratos_Default If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveContrato:=CveContrato) Then If Filename <> "" Then - Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa)) + Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If cargarBitacora() diff --git a/Contratos/Contrato.vb b/Contratos/Contrato.vb index 7318bac15..385377c09 100644 --- a/Contratos/Contrato.vb +++ b/Contratos/Contrato.vb @@ -1462,7 +1462,7 @@ Partial Class Contratos_Default If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveContrato:=CveContrato) Then If Filename <> "" Then - Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa)) + Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If cargarBitacora() diff --git a/Contratos/ContratoAvance.aspx.vb b/Contratos/ContratoAvance.aspx.vb index c462ab589..d26ba7cc4 100644 --- a/Contratos/ContratoAvance.aspx.vb +++ b/Contratos/ContratoAvance.aspx.vb @@ -361,10 +361,10 @@ Partial Class Contratos_ContratoAvance Alert("No se logro guardar el Presupuesto favor de intentarlo mas tarde o comuniquese con soporte", TipoMensaje.MsgAdvertencia) Else - Dim urlsave As String = String.Format("Empresas\{0}\Contrato\{1}\Anexos", UsuarioActual.CveEmpresa, CveContrato) + Dim urlsave As String = String.Format("{0}Contrato\{1}\Anexos", UsuarioActual.Empresa.Ruta, CveContrato) For Each fileItem As Archivo In guardarArchivos - fileItem.filename.FilesMove(fileItem.filename.Replace($".{fileItem.Extension}", ""), urlsave) + fileItem.filename.FilesMove(fileItem.filename.Replace($".{fileItem.Extension}", ""), urlsave, ConcatenarDirectorioBase:=False) Next @@ -426,9 +426,9 @@ Partial Class Contratos_ContratoAvance Alert("No se logro guardar el Presupuesto favor de intentarlo mas tarde o comuniquese con soporte", TipoMensaje.MsgAdvertencia) Else - Dim urlsave As String = String.Format("Empresas\{0}\Contrato\{1}\Anexos", UsuarioActual.CveEmpresa, CveContrato) + Dim urlsave As String = String.Format("{0}Contrato\{1}\Anexos", UsuarioActual.Empresa.Ruta, CveContrato) For Each fileItem As Archivo In guardarArchivos - fileItem.filename.FilesMove(fileItem.filename.Replace($".{fileItem.Extension}", ""), urlsave) + fileItem.filename.FilesMove(fileItem.filename.Replace($".{fileItem.Extension}", ""), urlsave, ConcatenarDirectorioBase:=False) Next ObjContratos.Commit() diff --git a/Contratos/ContratoObra.aspx.vb b/Contratos/ContratoObra.aspx.vb index 49ad90808..c8a3abb3b 100644 --- a/Contratos/ContratoObra.aspx.vb +++ b/Contratos/ContratoObra.aspx.vb @@ -3203,7 +3203,7 @@ Partial Class Contratos_ContratoObra If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveContrato:=CveContrato) Then If Filename <> "" Then - Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa)) + Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If cargarBitacora() diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 8b5dd2eca..9a71020a2 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -3000,7 +3000,7 @@ Partial Class Inventarios_EntradasSalidas End If If Filename <> "" Then - Filename.FilesMove(String.Format("OI{0}{1}", UsuarioActual.CveUsuario, Now.ToString("HH-mm")), String.Format("Empresas\{0}\OI\Temp", UsuarioActual.CveEmpresa)) + Filename.FilesMove(String.Format("OI{0}{1}", UsuarioActual.CveUsuario, Now.ToString("HH-mm")), String.Format("{0}OI\Temp", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If @@ -3083,7 +3083,7 @@ Partial Class Inventarios_EntradasSalidas If ObjEventoBitacora.AddEventoBitacora(descripcion, String.Format("{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveMovimientoAlmacen:=CveMovimiento) Then If Filename <> "" Then - Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa)) + Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If GvBitacora.DataSource = ObjEventoBitacora.DtResultados diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index a2750203c..3c2820087 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -4284,7 +4284,7 @@ Partial Class Inventarios_RecepcionAlmacen End If If Filename <> "" Then - Filename.FilesMove(String.Format("OI{0}{1}", UsuarioActual.CveUsuario, Now.ToString("HH-mm")), String.Format("Empresas\{0}\OI\Temp", UsuarioActual.CveEmpresa)) + Filename.FilesMove(String.Format("OI{0}{1}", UsuarioActual.CveUsuario, Now.ToString("HH-mm")), String.Format("{0}OI\Temp", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index ba9e4319b..7d4de7d44 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -1707,7 +1707,7 @@ Partial Class Inventarios_RecepcionUsados End If If Filename <> "" Then - Filename.FilesMove(String.Format("OI{0}{1}", UsuarioActual.CveUsuario, Now.ToString("HH-mm")), String.Format("Empresas\{0}\OI\Temp", UsuarioActual.CveEmpresa)) + Filename.FilesMove(String.Format("OI{0}{1}", UsuarioActual.CveUsuario, Now.ToString("HH-mm")), String.Format("{0}OI\Temp", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If @@ -1790,7 +1790,7 @@ Partial Class Inventarios_RecepcionUsados If ObjEventoBitacora.AddEventoBitacora(descripcion, String.Format("{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveMovimientoAlmacen:=CveMovimiento) Then If Filename <> "" Then - Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa)) + Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If GvBitacora.DataSource = ObjEventoBitacora.DtResultados diff --git a/OC/RepCotizacionesDetalle.aspx.vb b/OC/RepCotizacionesDetalle.aspx.vb index 31fdadb22..787112c96 100644 --- a/OC/RepCotizacionesDetalle.aspx.vb +++ b/OC/RepCotizacionesDetalle.aspx.vb @@ -204,7 +204,7 @@ Partial Class PopOCCotizacionesDetalle End If If Filename <> "" Then - Filename.FilesMove(objCotizacion.CveCotizacion.ToString(), String.Format("{0}Cotizaciones", UsuarioActual.Empresa.Ruta)) + Filename.FilesMove(objCotizacion.CveCotizacion.ToString(), String.Format("{0}Cotizaciones", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If For Each dr As GridViewRow In GvDC.Rows @@ -225,7 +225,7 @@ Partial Class PopOCCotizacionesDetalle End If If Filename <> "" Then - Filename.FilesMove(CveCotizacion.ToString(), String.Format("{0}Cotizaciones", UsuarioActual.Empresa.Ruta)) + Filename.FilesMove(CveCotizacion.ToString(), String.Format("{0}Cotizaciones", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If For Each dr As GridViewRow In GvDC.Rows diff --git a/OI/Normatividad.aspx.vb b/OI/Normatividad.aspx.vb index d3499d810..812dfa77f 100644 --- a/OI/Normatividad.aspx.vb +++ b/OI/Normatividad.aspx.vb @@ -152,7 +152,7 @@ Partial Class OI_Normatividad If File.Exists(ruta) Then File.Delete(ruta) End If - filemove.FilesMove(String.Format("OI{0}", IDSelected.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa)) + filemove.FilesMove(String.Format("OI{0}", IDSelected.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If Dim customerRow As Data.DataRow @@ -205,7 +205,7 @@ Partial Class OI_Normatividad Idnew = row("CveEvento").ToString().ToEntero If filemove <> "" Then - filemove.FilesMove(String.Format("OI{0}", Idnew.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa)) + filemove.FilesMove(String.Format("OI{0}", Idnew.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If ArbolCuentas.DataSource = DtDatos diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb index 647fd13a9..4f8681043 100644 --- a/OS/OrdenesServicios.aspx.vb +++ b/OS/OrdenesServicios.aspx.vb @@ -1329,7 +1329,7 @@ Partial Class OS_OrdenesServicios End If If Filename <> "" Then - Filename.FilesMove(String.Format("OS{0}-{1}", UsuarioActual.CveUsuario, Consecutivo), String.Format("Empresas\{0}\OS\Temp", UsuarioActual.CveEmpresa)) + Filename.FilesMove(String.Format("OS{0}-{1}", UsuarioActual.CveUsuario, Consecutivo), String.Format("{0}OS\Temp", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If AddPS(Consecutivo, -1, DdlPSDetalle.SelectedValue.ToEntero, DdlPSDetalle.SelectedItem.Text, TxtCantidad.Text.ToEntero, TxtObservacionesServicioDetalle.Text, HdnEspecificaciones.Value.ToString, LtlPSEspecificaciones.Text, "", @@ -1476,7 +1476,7 @@ Partial Class OS_OrdenesServicios If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveOS, -1, -1, -1, -1) Then If filemove <> "" Then - filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa)) + filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If GvEB.DataSource = ObjEventoBitacora.DtResultados diff --git a/Prospectos/Prospectos.aspx.vb b/Prospectos/Prospectos.aspx.vb index 4934ab8ef..49ace671c 100644 --- a/Prospectos/Prospectos.aspx.vb +++ b/Prospectos/Prospectos.aspx.vb @@ -289,7 +289,7 @@ Partial Class Prospectos_Prospectos If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), -1, -1, CveProspecto, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then If filemove <> "" Then - filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa)) + filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index 84a2daf1d..bc495a4c1 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -2817,7 +2817,7 @@ Partial Class RH_Personal If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal) Then If filemove <> "" Then - filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString()), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa)) + filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString()), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If GvEB.DataSource = ObjEventoBitacora.DtResultados @@ -5361,7 +5361,7 @@ Partial Class RH_Personal End If If filemove <> "" Then - filemove.FilesMove(CvePersonal.ToString(), String.Format("Empresas\{0}\RH\Personal\", UsuarioActual.CveEmpresa)) + filemove.FilesMove(CvePersonal.ToString(), String.Format("{0}RH\Personal\", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If ViewState("Archivo") = String.Format("{0}.{1}", CvePersonal.ToString(), FileExtension) Next diff --git a/RH/Prospectos.aspx.vb b/RH/Prospectos.aspx.vb index 4934ab8ef..49ace671c 100644 --- a/RH/Prospectos.aspx.vb +++ b/RH/Prospectos.aspx.vb @@ -289,7 +289,7 @@ Partial Class Prospectos_Prospectos If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), -1, -1, CveProspecto, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then If filemove <> "" Then - filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa)) + filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index a45fdff33..83de68f2e 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -3678,7 +3678,7 @@ Partial Class Clientes If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1) Then If filemove <> "" Then - filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString()), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa)) + filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString()), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If GvEB.DataSource = ObjEventoBitacora.DtResultados diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index c6374fedd..95fe80359 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -776,7 +776,7 @@ Partial Class Ventas_ClientesAbonar 'Guardar archivo If filemove <> "" Then - filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta)) + filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 3680a6f79..e34a4dfbe 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -19771,7 +19771,7 @@ Partial Class Ventas Dim ObjEventos As New ClsOIEventos() If ObjEventos.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVenta) Then If Filename <> "" Then - Filename.FilesMove(String.Format("OI{0}", ObjEventos.CveEvento.ToString()), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa)) + Filename.FilesMove(String.Format("OI{0}", ObjEventos.CveEvento.ToString()), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If End If ObjEventos.Dispose()