diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index 4ed4b5dd5..3373f9526 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -166,6 +166,7 @@ Public Class ClsClientes Public Property CargoUsados As Boolean Public Property BonificacionUsado As Boolean + Public Property CveSATEstado As Integer Public ReadOnly Property DtResultados() As DataTable @@ -426,6 +427,7 @@ Public Class ClsClientes _RequiereOC = CBool(Data(0)("RequiereOC")) _CargoUsados = CBool(Data(0)("CargoUsado")) _BonificacionUsado = CBool(Data(0)("BonificacionUsado")) + _CveSATEstado = Data(0)("CveSATEstado").ToString.ToEntero End If Retorno = True @@ -574,7 +576,7 @@ Public Class ClsClientes Optional AplicaComercioExterior As Boolean = False, Optional CveTipoOperacion As Integer = -1, Optional CvePedimento As Integer = -1, Optional CveIncoterm As Integer = -1, Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1", Optional RequiereOC As Boolean = False, Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, - Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1") As Boolean + Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -714,6 +716,9 @@ Public Class ClsClientes .Add("@CorreoEntregaCompras", SqlDbType.VarChar).Value = CorreoEntregaCompras .Add("@CorreoEntregaAlmacen", SqlDbType.VarChar).Value = CorreoEntregaAlmacen + .Add("@CveSATEstado", SqlDbType.Int).Value = CveSATEstado + + End With Try SqlAdapter.Fill(Data) @@ -757,7 +762,8 @@ Public Class ClsClientes Optional AplicaComercioExterior As Boolean = False, Optional CveTipoOperacion As Integer = -1, Optional CvePedimento As Integer = -1, Optional CveIncoterm As Integer = -1, Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "-1", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1", Optional ApellidoPaternoPF As String = "-1", Optional ApellidoMaternoPF As String = "-1", Optional NombresPF As String = "-1", Optional RequiereOC As Boolean = False, - Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1") As Boolean + Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", + Optional CveSATEstado As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -911,6 +917,10 @@ Public Class ClsClientes .Add("@CorreoEntregaCompras", SqlDbType.VarChar).Value = CorreoEntregaCompras .Add("@CorreoEntregaAlmacen", SqlDbType.VarChar).Value = CorreoEntregaAlmacen + .Add("@CveSATEstado", SqlDbType.Int).Value = CveSATEstado + + + End With Try SqlAdapter.Fill(Data) @@ -1011,21 +1021,41 @@ Public Class ClsClientes Return Retorno End Function - 'Public Function GetSucursales(CveCliente As Integer, CveClienteSucursal As Integer) As Boolean - ' Dim Retorno As Boolean = False - ' DataAdapter("PA_Vta_SucursalClientePopUpGet") - ' SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente - ' SqlAdapter.SelectCommand.Parameters.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal - ' Try - ' SqlAdapter.Fill(Data) - ' Retorno = True - ' Catch ex As Exception - ' OnError("Ocurrió un error al obtener el las Sucursales del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - ' End Try + Public Function GetEstados(Optional ClaveSATPais As String = "-1") As Boolean + Dim Retorno As Boolean = False - ' Return Retorno - 'End Function + DataAdapter("PA_ClientesEstadosGet") + + SqlAdapter.SelectCommand.Parameters.Add("@ClaveSATPais", SqlDbType.VarChar).Value = ClaveSATPais + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el los estados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + + + 'Public Function GetSucursales(CveCliente As Integer, CveClienteSucursal As Integer) As Boolean + ' Dim Retorno As Boolean = False + + ' DataAdapter("PA_Vta_SucursalClientePopUpGet") + ' SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente + ' SqlAdapter.SelectCommand.Parameters.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' OnError("Ocurrió un error al obtener el las Sucursales del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + ' End Try + + ' Return Retorno + 'End Function Public Function AddSucursal(CveCliente As Integer, Sucursal As String, CveUsuario As Integer, Ciudad As String, Colonia As String, CP As String, Direccion As String, Estado As String, Localidad As String, Pais As String, NoExt As String, NoInt As String, Telefono As String, Correo As String, CorreoCotizacion As String, Contacto As String, CveVendedor As Integer, NumCtaPago As String, CveMetodoPago As Integer, LimiteCredito As Decimal, CveResponsableSucursal As Integer, CveUsoCFDI As Integer, CveFormaPago33 As Integer, CveMetodoPago33 As Integer, Optional LT As String = "0", Optional LG As String = "0") As Boolean Dim Retorno As Boolean = False diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 54ee9c7b4..f82e8f176 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -1940,6 +1940,33 @@ Public Class ClsNominas Return Retorno End Function + Public Function GetNominaEmpleadoSimulador(CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CvePeriodo As Integer, CveEmpresa As Integer, Agrupador As Integer, SalarioDiario As Decimal) As Boolean + Dim retorno As Boolean = False + Try + DTSet = New DataSet() + DataAdapter("PA_Nom_NominaEmpleadoSimulador", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveTurno", SqlDbType.Int).Value = CveTurno + .Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo + .Add("@Agrupador", SqlDbType.VarChar).Value = Agrupador + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@SalarioDiario", SqlDbType.Decimal).Value = SalarioDiario + End With + + + SqlAdapter.Fill(DTSet) + retorno = True + Catch sqEx As SqlException + retorno = False + OnError("Ocurrió un error al Realizar el calculo de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al Realizar el calculo de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function Public Function GetNominaEmpleado(CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CvePeriodo As Integer, CveEmpresa As Integer, Agrupador As Integer) As Boolean Dim retorno As Boolean = False Try diff --git a/App_Code/ClsOC.vb b/App_Code/ClsOC.vb index 20d2c9d8f..dbda19f3b 100644 --- a/App_Code/ClsOC.vb +++ b/App_Code/ClsOC.vb @@ -2532,12 +2532,12 @@ Public Class ClsOC End Function #End Region - Public Function GetVentasRelacionadas(CveOCDetalle As String) As Boolean + Public Function GetVentasRelacionadas(CveOrdenCompra As Integer) As Boolean Dim Retorno As Boolean = False - DataAdapter("PA_OC_VentaRelacionada") + DataAdapter("PA_OC_VentasRelacionadas") With SqlAdapter.SelectCommand.Parameters - .Add("@CveOCDetalles", SqlDbType.NVarChar).Value = CveOCDetalle + .Add("@CveOrdenCompra", SqlDbType.Int).Value = CveOrdenCompra End With Try diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index 998375e3e..40f8cfaa0 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -1953,16 +1953,86 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try + Return Retorno + End Function + + Public Function UpdateSalarioImss(CvePersonal As Integer, CveEmpresa As Integer, SDI As Double, SalarioDiarioSS As Double) As Boolean + Dim Retorno As Boolean = False + SqlDataAdapter("PA_RH_PersonalUpdateSalarioImss") + With SqlAdapter.SelectCommand.Parameters + .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@SDI", SqlDbType.Money).Value = SDI + .Add("@SalarioDiarioSS", SqlDbType.Money).Value = SalarioDiarioSS + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As SqlException + OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + Public Function UpdateSalarios(CvePersonal As Integer, CveEmpresa As Integer, SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double, SalarioDiarioPago As Double) As Boolean + Dim Retorno As Boolean = False + SqlDataAdapter("PA_RH_PersonalUpdateSalarios") + With SqlAdapter.SelectCommand.Parameters + .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@SalarioDiarioPago", SqlDbType.Money).Value = SalarioDiarioPago + .Add("@SalarioDiario", SqlDbType.Money).Value = SalarioDiario + .Add("@SDI", SqlDbType.Money).Value = SDI + .Add("@SalarioDiarioSS", SqlDbType.Money).Value = SalarioDiarioSS + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As SqlException + OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + + + + Public Function UpdateRFCValidado(RFC As String, CveEmpresa As Integer, RFCValidadoisok As Boolean) As Boolean + Dim Retorno As Boolean = False + SqlDataAdapter("PA_RH_PersonalUpdateRFCValidado") + With SqlAdapter.SelectCommand.Parameters + .Add("@RFC", SqlDbType.VarChar).Value = RFC + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@isOk", SqlDbType.Bit).Value = RFCValidadoisok + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As SqlException + OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + Public Function Updateestemporal(CvePersonal As Integer, CveEmpresa As Integer, estemporal As Boolean) As Boolean + Dim Retorno As Boolean = False + SqlDataAdapter("PA_RH_PersonalUpdateesTemporal") + With SqlAdapter.SelectCommand.Parameters + .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@isOk", SqlDbType.Bit).Value = estemporal + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As SqlException + OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try Return Retorno End Function - Public Function UpdatePersonalMasivo(CveTurno As Integer, CveSubProyecto As Integer, CveSupervisor As Integer, SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double, CvePersonal As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno As Boolean = False - 'Data = New DataTable - + Dim Retorno As Boolean = False + SqlDataAdapter("PA_RH_PersonalUpdateMasivo") With SqlAdapter.SelectCommand.Parameters .Add("@CveTurno", SqlDbType.Int).Value = CveTurno diff --git a/App_Code/DtDatos.xsd b/App_Code/DtDatos.xsd index 7192eab3b..799552e6a 100644 --- a/App_Code/DtDatos.xsd +++ b/App_Code/DtDatos.xsd @@ -1,296 +1,296 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/App_Code/DtDatos.xss b/App_Code/DtDatos.xss index 4c9cb879f..6fa884b50 100644 --- a/App_Code/DtDatos.xss +++ b/App_Code/DtDatos.xss @@ -1,24 +1,24 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Bancos/PagoElectronicoGrupos.aspx.vb b/Bancos/PagoElectronicoGrupos.aspx.vb index 70707b8f5..b784fb90d 100644 --- a/Bancos/PagoElectronicoGrupos.aspx.vb +++ b/Bancos/PagoElectronicoGrupos.aspx.vb @@ -1197,7 +1197,7 @@ Partial Class Bancos_PagoElectronicoGrupos For Each drow As DataRow In DTPendientesTemp.Rows - + EsCIE = False MENSAJEError.Clear() diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index eaf8dacca..3b343b278 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -936,7 +936,9 @@ Partial Class PopUpVerFactura Vta.MonedaAbreviatura = dtVentas(0)("Abreviatura").ToString 'se rellena la sucursal 'Vta.Subproyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SucursalModel) - Vta.SubProyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SubProyectoModel) + Dim CveSubProyecto As Integer = dtVentas(0)("CveSubProyecto").ToString().ToEntero() + Vta.SubProyecto = GlobalDTSubProyectos(-1, CveSubProyecto).Rows(0).DataRowToObject(Of Modelos.SubProyectoModel) + 'Vta.SubProyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SubProyectoModel) Vta.Cliente = New Modelos.ClienteModel Vta.Cliente.Nombre = dtVentas(0)("ClienteNombre").ToString Vta.Cliente.Telefono = dtVentas(0)("Telefono").ToString diff --git a/Empresas/Grales/Formatos/RepIVAAcreditable2.rpt b/Empresas/Grales/Formatos/RepIVAAcreditable2.rpt new file mode 100644 index 000000000..30d7dba84 Binary files /dev/null and b/Empresas/Grales/Formatos/RepIVAAcreditable2.rpt differ diff --git a/General/PopUpPaqueteriasGuias.aspx.cs b/General/PopUpPaqueteriasGuias.aspx.cs index 6cd757d1b..97e830f06 100644 --- a/General/PopUpPaqueteriasGuias.aspx.cs +++ b/General/PopUpPaqueteriasGuias.aspx.cs @@ -730,7 +730,7 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas } } - private byte[] DocumentoEntregaInterna() + private string DocumentoEntregaInterna() { ClsVentas ObjVentas = new ClsVentas(); if (ObjVentas.GetVenta(this.CveVenta, UsuarioActual.CveEmpresa)) @@ -742,24 +742,65 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas string Guia = TxtGuia.Text; string Rastreo = TxtRastreo.Text; string Paqueteria = DdlPaqueterias.SelectedItem.Text; + string TipoDocto = ObjVentas.DtResultados.Rows[0]["TipoDocto"].ToString(); DataTable DtDetalle = new DataTable(); if (ObjVentas.GetVentaDetalle(CveVenta)) { DtDetalle = ObjVentas.DtResultados; } - List RepParams = new List(); - RepParams.Add(new ReportParameter("Cliente", ClienteNombre)); - RepParams.Add(new ReportParameter("FolioVenta", FolioVenta)); - RepParams.Add(new ReportParameter("Pedido", Pedido)); - RepParams.Add(new ReportParameter("OrdenCompra", OrdenCompra)); - RepParams.Add(new ReportParameter("Guia", Guia)); - RepParams.Add(new ReportParameter("Rastreo", Rastreo)); - RepParams.Add(new ReportParameter("Paqueteria", Paqueteria)); - return StreamPDF($"Empresas/{UsuarioActual.CveEmpresa}/Formatos/GuiaExternaAsignada.rdlc", DtDetalle, RepParams, "Notificacion de Envio", "PDF", RDSName: "DsInventarios"); + string DetalleTable = ""; + foreach (DataRow dRow in DtDetalle.Rows) + { + string detalle = string.Format("{0}{1}{2}", dRow["Codigo"], dRow["Cantidad"], dRow["PS"]); + DetalleTable += detalle; + } + + StringBuilder strBody = new StringBuilder(); + strBody.Append(""); + strBody.Append(""); + strBody.Append(""); + strBody.Append(""); + strBody.Append(" "); + strBody.Append("
"); + strBody.Append($""); + strBody.Append("
"); + strBody.Append("

"); + strBody.Append($" Apreciable {ClienteNombre}, su pedido ya se encuentra en camino con el número de guía {Guia} y rastreo {Rastreo} de {Paqueteria}. Le confirmamos los productos que recibirá conforme a la {TipoDocto}:"); + strBody.Append("

"); + strBody.Append($"

{FolioVenta} - Pedido {Pedido} - Orden de Compra {OrdenCompra}

"); + strBody.Append("
"); + strBody.Append(" "); + strBody.Append(DetalleTable); + strBody.Append("
"); + strBody.Append("
"); + strBody.Append("

"); + strBody.Append(" Solicitamos su apoyo en la verificación del pedido que está próximo a recibir y en caso de presentarse alguno de los siguientes inconvenientes favor de rechazar el paquete y comunicarse de inmediato con su Ejecutivo Comercial:"); + strBody.Append("

"); + strBody.Append("

"); + strBody.Append(" • Empaque violado.
"); + strBody.Append("• Daño físico en la caja.
"); + strBody.Append("• Producto incompleto o distinto al solicitado.
"); + strBody.Append("• Alguna otra situación que se considere que compromete la integridad de la mercancía."); + strBody.Append(""); + strBody.Append("

"); + strBody.Append("
"); + strBody.Append("

"); + strBody.Append(" Gracias por realizar pedido
"); + strBody.Append(" Compuproveedores"); + strBody.Append("

"); + strBody.Append("

"); + strBody.Append(" Sigue disfrutando de nuestros productos y servicios
"); + strBody.Append(" www.compuproveedores.com"); + strBody.Append(""); + strBody.Append("

"); + strBody.Append(" "); + strBody.Append(""); + + return strBody.ToString(); } ObjVentas.Dispose(); - return null; + return ""; } private string getCorreoString() @@ -789,19 +830,11 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas { Correos.GuardaLog(); - byte[] ArchivoBinario = DocumentoEntregaInterna(); + string body = DocumentoEntregaInterna(); ClsSisMail MailCls = new ClsSisMail(); - List LSRutasMail = new List(); - ClsSisMail.ArchivoMail itemMail = new ClsSisMail.ArchivoMail(); - - { - var withBlock = itemMail; - itemMail.ArchivoBinario = ArchivoBinario; - itemMail.NombreArchivo = "Notificacion de Envio"; - } - LSRutasMail.Add(itemMail); - MailCls.SendMail(ClsPaginas.EmpresaNotificaciones, Correos, "Se enviara la compra a su dirección", "Pendiente", Correos, LSRutasMail); + + MailCls.SendMail(ClsPaginas.EmpresaNotificaciones, Correos, "Se enviara la compra a su dirección", body, Correos); MailCls = null; } #endregion diff --git a/General/RepPaqueteriasGuias.aspx.cs b/General/RepPaqueteriasGuias.aspx.cs index 08ee47e58..2633ccd25 100644 --- a/General/RepPaqueteriasGuias.aspx.cs +++ b/General/RepPaqueteriasGuias.aspx.cs @@ -925,9 +925,9 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas Cuerpo.AppendLine("

Dudas y aclaraciones con su coordinador empresarial."); + string body = DocumentoEntregaInterna(this.CveVenta); //Adjunta Archivo al Correo ClsSisMail.ArchivoMail ArchivoAdjunto = new ClsSisMail.ArchivoMail(); - ClsSisMail.ArchivoMail ArchivoAdjunto2 = new ClsSisMail.ArchivoMail(); List ListaAdjuntos = new List(); @@ -937,20 +937,16 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas ArchivoAdjunto.Ruta = RutaArchivoAdjunto; ArchivoAdjunto.NombreArchivo = new FileInfo(RutaArchivoAdjunto).Name; - ArchivoAdjunto2.ArchivoBinario = DocumentoEntregaInterna(this.CveVenta); - ArchivoAdjunto2.NombreArchivo = "Entrega Realizada"; - ListaAdjuntos.Add(ArchivoAdjunto); - ListaAdjuntos.Add(ArchivoAdjunto2); } if ((ListaAdjuntos.Count > 0)) { - MensajeEnviado = Correo.SendMail(UsuarioActual.Empresa, Destinatario, Asunto, Cuerpo.ToString(), Archivos: ListaAdjuntos); + MensajeEnviado = Correo.SendMail(UsuarioActual.Empresa, Destinatario, Asunto, body.ToString(), Archivos: ListaAdjuntos); } else { - MensajeEnviado = Correo.SendMail(UsuarioActual.Empresa, Destinatario, Asunto, Cuerpo.ToString()); + MensajeEnviado = Correo.SendMail(UsuarioActual.Empresa, Destinatario, Asunto, body.ToString()); } break; @@ -1080,7 +1076,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas this.RegistraScript("$('#ModalMotivoReasignacion').modal('hide')", "hidemodal3"); } - private byte[] DocumentoEntregaInterna(int CveVenta) + private string DocumentoEntregaInterna(int CveVenta) { ClsVentas ObjVentas = new ClsVentas(); @@ -1091,21 +1087,55 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas string FolioVenta = row["SerieFolio"].ToString(); string Pedido = row["PedidoContrato"].ToString(); string OrdenCompra = row["OrdenCompra"].ToString(); + string tipoDocto = row["TipoDocto"].ToString(); DataTable DtDetalle = new DataTable(); if (ObjVentas.GetVentaDetalle(CveVenta)) { DtDetalle = ObjVentas.DtResultados; } + string DetalleTable = ""; + foreach (DataRow dRow in DtDetalle.Rows) + { + string detalle = string.Format("{0}{1}{2}", dRow["Codigo"], dRow["Cantidad"], dRow["PS"]); + DetalleTable += detalle; + } - List RepParams = new List(); - RepParams.Add(new ReportParameter("Cliente", ClienteNombre)); - RepParams.Add(new ReportParameter("FolioVenta", FolioVenta)); - RepParams.Add(new ReportParameter("Pedido", Pedido)); - RepParams.Add(new ReportParameter("OrdenCompra", OrdenCompra)); - return StreamPDF($"Empresas/{UsuarioActual.CveEmpresa}/Formatos/GuiaEntregaTerminada.rdlc", DtDetalle, RepParams, "Notificacion de Envio", "PDF", RDSName: "DsInventarios"); + StringBuilder strBody = new StringBuilder(); + strBody.Append(""); + strBody.Append(""); + strBody.Append(""); + strBody.Append(""); + strBody.Append(" "); + strBody.Append("
"); + strBody.Append($""); + strBody.Append("
"); + strBody.Append("

"); + strBody.Append($" Apreciable {ClienteNombre}, su pedido correspondiente a la {tipoDocto}:"); + strBody.Append("

"); + strBody.Append($"

{FolioVenta} - Pedido {Pedido} - Orden de Compra {OrdenCompra}

"); + strBody.Append("

Su Pedido:

"); + strBody.Append("
"); + strBody.Append(" "); + strBody.Append(DetalleTable); + strBody.Append("
"); + strBody.Append("
"); + strBody.Append("
"); + strBody.Append("

"); + strBody.Append(" Agradecemos su preferencia.
"); + strBody.Append(" Compuproveedores"); + strBody.Append("

"); + strBody.Append("

"); + strBody.Append(" Sigue disfrutando de nuestros productos y servicios
"); + strBody.Append(" www.compuproveedores.com"); + strBody.Append(""); + strBody.Append("

"); + strBody.Append(" "); + strBody.Append(""); + + return strBody.ToString(); } ObjVentas.Dispose(); - return null; + return ""; } } \ No newline at end of file diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 1726fcfbf..6eb9ba7a5 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -2665,10 +2665,8 @@ Partial Class Inventarios_EntregaAlmacen If CvePaqueteriaGuia > 0 Then If CveVentaSurtir > 0 OrElse CveSubProyecto > 0 Then - If ObjGeneral.AddPaqueteriasGuiasDetalles(CvePaqueteriaGuia, CveVentaSurtir, -1, CveMovimientoSalida, -1) Then + If Not ObjGeneral.AddPaqueteriasGuiasDetalles(CvePaqueteriaGuia, CveVentaSurtir, -1, CveMovimientoSalida, -1) Then ''manda correo - MandaCorreoEntrega(CveVentaSurtir) - Else ErrorMovInv = True End If End If @@ -3184,16 +3182,17 @@ Partial Class Inventarios_EntregaAlmacen End Sub Private Sub EnviarCorreoEntrega(tCveVenta As Integer, UsuarioActual As Usuario) - Dim Correo As New ClsSisMail - Dim SerieFolio As String = "" - Dim Asunto As String = String.Format("{0} Envio de pedido: {1}", UsuarioActual.Empresa.NombreCorto, SerieFolio) - Dim Cuerpo As New StringBuilder() - Dim Destinatario As String = "" - Dim MensajeEnviado = False - Dim tCvecliente As Integer - Dim bytes() As Byte = Nothing + 'Dim Correo As New ClsSisMail + Dim SerieFolio As String = "" + Dim Asunto As String = String.Format("{0} Envio de pedido: {1}", UsuarioActual.Empresa.NombreCorto, SerieFolio) + Dim Cuerpo As New StringBuilder() + Dim Destinatario As String = "" + Dim MensajeEnviado = False + Dim tCvecliente As Integer + Dim bytes() As Byte = Nothing Dim ObjVentas As New ClsVentas() + Dim strBody As New StringBuilder If ObjVentas.GetVenta(tCveVenta, UsuarioActual.CveEmpresa) Then Dim dr As DataRow = ObjVentas.DtResultados.FiltroPrimero("") Destinatario = String.Format("{0};{1}", dr("CorreoNotificacion"), dr("CorreoVendedorVenta")) @@ -3201,39 +3200,82 @@ Partial Class Inventarios_EntregaAlmacen tCvecliente = dr("CveCliente").ToString.ToEntero Dim drC As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=tCvecliente).FiltroPrimero("") - Destinatario += String.Format("{0};{1}", drC("CorreoEntregaCompras"), drC("CorreoEntregaAlmacen")) - - Cuerpo.AppendLine(String.Format("Estimado {0} le informamos que los productos de la factura {1} han sido enviados a entrega.

", dr("ClienteNombre"), dr("SerieFolio"))) - Cuerpo.AppendLine("

Dudas y aclaraciones con su coordinador empresarial.") + Destinatario += String.Format(";{0};{1}", drC("CorreoEntregaCompras"), drC("CorreoEntregaAlmacen")) Dim ClienteNombre As String = dr("ClienteNombre").ToString() Dim FolioVenta As String = dr("SerieFolio").ToString() Dim Pedido As String = dr("PedidoContrato").ToString() Dim OrdenCompra As String = dr("OrdenCompra").ToString() Dim CveVenta As Integer = dr("CveVenta").ToString().ToEntero() + Dim TipoDocto As String = dr("TipoDocto").ToString() Dim dtDetalle As New DataTable If ObjVentas.GetVentaDetalle(CveVenta) Then dtDetalle = ObjVentas.DtResultados End If + Dim DetalleTable As String = "" + For Each dRow As DataRow In dtDetalle.Rows + Dim detalle As String = String.Format("{0}{1}{2}", dRow("Codigo"), dRow("Cantidad"), dRow("PS")) + DetalleTable += detalle + Next - Dim RepParams As New List(Of ReportParameter) - RepParams.Add(New ReportParameter("Cliente", ClienteNombre)) - RepParams.Add(New ReportParameter("FolioVenta", FolioVenta)) - RepParams.Add(New ReportParameter("Pedido", Pedido)) - RepParams.Add(New ReportParameter("OrdenCompra", OrdenCompra)) - bytes = StreamPDF($"Empresas/{UsuarioActual.CveEmpresa}/Formatos/GuiaEntregaMostrador.rdlc", dtDetalle, RepParams, "Notificacion de Envio", "PDF", RDSName:="DsInventarios") + strBody.Append("") + strBody.Append("") + strBody.Append("") + strBody.Append("") + strBody.Append(" ") + strBody.Append("
") + strBody.Append($"") + strBody.Append("
") + strBody.Append("

") + strBody.Append($" Apreciable {ClienteNombre}, le confirmamos los") + strBody.Append(" productos surtidos y entregados en mostrador conforme a la") + strBody.Append($" {TipoDocto}:") + strBody.Append("

") + strBody.Append($"

{FolioVenta} - Pedido {Pedido} - Orden de Compra {OrdenCompra}

") + strBody.Append("
") + strBody.Append(" ") + strBody.Append(DetalleTable) + strBody.Append(" ") + strBody.Append("
") + strBody.Append("
") + strBody.Append("

") + strBody.Append(" Se entregaron los productos conforme a las especificaciones de su pedido y verificamos que no se presentara alguno de los siguientes inconvenientes:") + strBody.Append("

") + strBody.Append("

") + strBody.Append(" • Empaque violado.
") + strBody.Append("• Daño físico en la caja.
") + strBody.Append("• Producto incompleto o distinto al solicitado.
") + strBody.Append("• Alguna otra situación que se considere que compromete la integridad de la mercancía.
") + strBody.Append("") + strBody.Append("

") + strBody.Append("
") + strBody.Append("

") + strBody.Append($" Aceptando a entera satisfacción a las {Today.Hour}:{Today.Minute} hrs del {Today.ToString}") + strBody.Append("

") + strBody.Append("
") + strBody.Append("

") + strBody.Append(" Gracias por su compra
") + strBody.Append(" Compuproveedores") + strBody.Append("

") + strBody.Append("

") + strBody.Append(" Sigue disfrutando de nuestros productos y servicios
") + strBody.Append(" www.compuproveedores.com") + strBody.Append("") + strBody.Append("

") + strBody.Append(" ") + strBody.Append("") End If - ObjVentas.Dispose() - - + ObjVentas.Dispose() + + Dim MailCls As New ClsSisMail + Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail) Dim itemMail As New ClsSisMail.ArchivoMail() + LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = bytes, .NombreArchivo = "Entrega en mostrador"}) - LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = bytes, .NombreArchivo = "Notificacion de Envio"}) - - Correo.SendMail(EmpresaNotificaciones, Destinatario, Asunto, Cuerpo.ToString(), Destinatario) - Correo = Nothing + MailCls.SendMail(ClsPaginas.EmpresaNotificaciones, Destinatario, "Enviado desde Entrega Almacen", strBody.ToString, Destinatario) + MailCls = Nothing End Sub Private Sub Limpia() diff --git a/Inventarios/EntregasPorRealizar.aspx b/Inventarios/EntregasPorRealizar.aspx index 639fe893f..76ec2b76f 100644 --- a/Inventarios/EntregasPorRealizar.aspx +++ b/Inventarios/EntregasPorRealizar.aspx @@ -70,7 +70,7 @@
RepParams = new List(); - string Usuario = DdlUsuario.SelectedValue.ToEntero() > 0 ? DdlUsuario.SelectedItem.Text : "Todos"; - RepParams.Add(new ReportParameter("Fecha", DateTime.Today.ToString())); - RepParams.Add(new ReportParameter("AsignadoA", Usuario)); - RepParams.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); + //protected void LnkImprimir_Click(object sender, EventArgs e) + //{ + // List RepParams = new List(); + // string Usuario = DdlUsuario.SelectedValue.ToEntero() > 0 ? DdlUsuario.SelectedItem.Text : "Todos"; + // RepParams.Add(new ReportParameter("Fecha", DateTime.Today.ToString())); + // RepParams.Add(new ReportParameter("AsignadoA", Usuario)); + // RepParams.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - ImprimirPDF($"Empresas/{UsuarioActual.CveEmpresa}/Formatos/EntregasPorRealizar.rdlc", DtPaqueteriasGuias, RepParams, "Entregas por realizar", "PDF",RDSName:"DsInventarios"); - } + // ImprimirPDF($"Empresas/{UsuarioActual.CveEmpresa}/Formatos/EntregasPorRealizar.rdlc", DtPaqueteriasGuias, RepParams, "Entregas por realizar", "PDF",RDSName:"DsInventarios"); + //} - private byte[] DocumentoEntregaInterna(GridViewRow row) + private string DocumentoEntregaInterna(GridViewRow row) { string ClienteNombre = row.DataKey("NombreComercial"); string FolioVenta = row.DataKey("SerieFolio"); string Pedido = row.DataKey("PedidoContrato"); string OrdenCompra = row.DataKey("OrdenCompra"); int CveVenta = row.DataKey("CveVenta").ToEntero(); + string TipoDocto = row.DataKey("TipoDocto"); DataTable DtDetalle = new DataTable(); ClsVentas ObjVentas = new ClsVentas(); @@ -136,12 +138,63 @@ public partial class Inventarios_EntregasPorRealizar : ClsPaginas } ObjVentas.Dispose(); - List RepParams = new List(); - RepParams.Add(new ReportParameter("Cliente", ClienteNombre)); - RepParams.Add(new ReportParameter("FolioVenta", FolioVenta)); - RepParams.Add(new ReportParameter("Pedido", Pedido)); - RepParams.Add(new ReportParameter("OrdenCompra", OrdenCompra)); - return StreamPDF($"Empresas/{UsuarioActual.CveEmpresa}/Formatos/GuiaInternaAsignada.rdlc", DtDetalle, RepParams, "Notificacion de Envio", "PDF", RDSName: "DsInventarios"); + string DetalleTable = ""; + foreach (DataRow dRow in DtDetalle.Rows) + { + string detalle = string.Format("{0}{1}{2}", dRow["Codigo"], dRow["Cantidad"], dRow["PS"]); + DetalleTable += detalle; + } + + StringBuilder strBody = new StringBuilder(); + + strBody.Append(""); + strBody.Append(""); + strBody.Append(""); + strBody.Append(""); + strBody.Append(" "); + strBody.Append("
"); + strBody.Append($""); + strBody.Append("
"); + strBody.Append("

"); + strBody.Append($" Apreciable {ClienteNombre}, su pedido ya se encuentra en camino. Le confirmamos los productos que recibirá conforme a la "); + strBody.Append($" {TipoDocto}:"); + strBody.Append("

"); + strBody.Append($"

{FolioVenta} - Pedido {Pedido} - Orden de Compra {OrdenCompra}

"); + strBody.Append("
"); + strBody.Append(" "); + strBody.Append(DetalleTable); + strBody.Append("
"); + strBody.Append("
"); + strBody.Append("

"); + strBody.Append(" Solicitamos su apoyo en la verificación del pedido que está próximo a recibir y en caso de presentarse alguno de los siguientes inconvenientes favor de rechazar el paquete y comunicarse de inmediato con su Ejecutivo Comercial:"); + strBody.Append("

"); + strBody.Append("

"); + strBody.Append(" • Empaque violado.
"); + strBody.Append("• Daño físico en la caja.
"); + strBody.Append("• Producto incompleto o distinto al solicitado.
"); + strBody.Append("• Alguna otra situación que se considere que compromete la integridad de la mercancía."); + strBody.Append(""); + strBody.Append("

"); + strBody.Append("
"); + strBody.Append("

"); + strBody.Append(" Gracias por realizar su pedido
"); + strBody.Append(" Compuproveedores"); + strBody.Append("

"); + strBody.Append("

"); + strBody.Append(" Sigue disfrutando de nuestros productos y servicios
"); + strBody.Append(" www.compuproveedores.com"); + strBody.Append(""); + strBody.Append("

"); + strBody.Append(" "); + strBody.Append(""); + + //List RepParams = new List(); + //RepParams.Add(new ReportParameter("Cliente", ClienteNombre)); + //RepParams.Add(new ReportParameter("FolioVenta", FolioVenta)); + //RepParams.Add(new ReportParameter("Pedido", Pedido)); + //RepParams.Add(new ReportParameter("OrdenCompra", OrdenCompra)); + //return StreamPDF($"Empresas/{UsuarioActual.CveEmpresa}/Formatos/GuiaInternaAsignada.rdlc", DtDetalle, RepParams, "Notificacion de Envio", "PDF", RDSName: "DsInventarios"); + return strBody.ToString(); } private void MandarNotificacionCorreo(GridViewRow row) @@ -156,20 +209,21 @@ public partial class Inventarios_EntregasPorRealizar : ClsPaginas string LogCorreo = string.Format("{0} -- {1} --- {2}", "Tipo de entrega", CorreoEntregaAlmacen, Para); LogCorreo.GuardaLog(); - byte[] ArchivoBinario = DocumentoEntregaInterna(row); + //byte[] ArchivoBinario = DocumentoEntregaInterna(row); + string body = DocumentoEntregaInterna(row); ClsSisMail MailCls = new ClsSisMail(); - List LSRutasMail = new List(); - ClsSisMail.ArchivoMail itemMail = new ClsSisMail.ArchivoMail(); + //List LSRutasMail = new List(); + //ClsSisMail.ArchivoMail itemMail = new ClsSisMail.ArchivoMail(); - { - var withBlock = itemMail; - itemMail.ArchivoBinario = ArchivoBinario; - itemMail.NombreArchivo = "Notificacion de Envio"; - } + //{ + // var withBlock = itemMail; + // itemMail.ArchivoBinario = ArchivoBinario; + // itemMail.NombreArchivo = "Notificacion de Envio"; + //} - LSRutasMail.Add(itemMail); - MailCls.SendMail(ClsPaginas.EmpresaNotificaciones, Para, "Entrega en camino", "Pendiente", Para, LSRutasMail); + //LSRutasMail.Add(itemMail); + MailCls.SendMail(ClsPaginas.EmpresaNotificaciones, Para, "Entrega en camino", body, Para); MailCls = null; } } \ No newline at end of file diff --git a/Nomina/Nomina2.aspx b/Nomina/Nomina2.aspx index e5b598ad1..f347c4d54 100644 --- a/Nomina/Nomina2.aspx +++ b/Nomina/Nomina2.aspx @@ -87,9 +87,22 @@
  • Ir a asistencia
  • +
  • + Nomina tabular +
  • +
  • + Simulador +
  • +
  • + Cargar archivoSua +
  • +
  • + Descargar Archivos sua +
  • + @@ -212,7 +225,7 @@
    - @@ -380,6 +393,70 @@ + + @@ -1283,13 +1292,11 @@ -
    - - +
    @@ -1300,28 +1307,28 @@
    - +
    - +
    - + @@ -1555,81 +1562,81 @@
    -
    -
    -
    - - Fonacot -
    -
    - -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    - - +
    +
    +
    + + Fonacot +
    +
    + +
    +
    +
    + +
    -
    -
    - - +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    -
    -
    -
    -
    -
    - +
    +
    +
    + - - - - - + + + + + +
    +
    +
    +
    + + +
    +
    -
    -
    -
    - - +
    +
    +
    + + + + + +
    +
    + + + +
    +
    +
    +
    + +
    +
    +
    + +
    -
    -
    -
    - - - - - -
    -
    - - - -
    -
    -
    -
    - -
    -
    -
    - -
    -
    -
    -
    @@ -4538,6 +4545,104 @@
    + + + + + + @@ -4605,7 +4710,7 @@ let strcurp = ""; if (!iscalculandocurp) { - alertatoast(6, "Se esta calculando la CURP favor de esperar un momento!","",7); + alertatoast(6, "Se esta calculando la CURP favor de esperar un momento!", "", 7); iscalculandocurp = true let paterno; @@ -4621,14 +4726,14 @@ let estado; <%= String.Format("estado=$('#{0} option:selected').text();", DdlEstados.ClientID) %> - estado= abreviacion[estados.indexOf(estado.toLowerCase())] + estado = abreviacion[estados.indexOf(estado.toLowerCase())] //abc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; //random09a = Math.floor(Math.random() * (9 - 1 + 1)) + 1; //random09b = Math.floor(Math.random() * (9 - 1 + 1)) + 1; //randomAZ = Math.floor(Math.random() * (26 - 0 + 1)) + 0; ano = Number(FechaNacimiento.slice(6, 10)); - let dteNacimiento =ano.toString().slice(2) + FechaNacimiento.slice(3, 5) + FechaNacimiento.slice(0, 2) - strcurp =fnCalculaCURP(nombre.toUpperCase(), paterno.toUpperCase(), materno.toUpperCase(), dteNacimiento, genero, estado) + let dteNacimiento = ano.toString().slice(2) + FechaNacimiento.slice(3, 5) + FechaNacimiento.slice(0, 2) + strcurp = fnCalculaCURP(nombre.toUpperCase(), paterno.toUpperCase(), materno.toUpperCase(), dteNacimiento, genero, estado) /*old*//* let codve1array = (ano < 2000 ? numeric01 : abc); @@ -4668,13 +4773,13 @@ if (msg.length > 0) { <%= String.Format(" $('#{0}').val(msg);", TxtCURP.ClientID) %> } else { - alertatoast(8, "No se pudo obtener la CURP","",7) + alertatoast(8, "No se pudo obtener la CURP", "", 7) } iscalculandocurp = false; }, error: function (msg) { console.log("error:" + JSON.stringify(msg)); - alertatoast(7, "No se pudo obtener la CURP","",7); + alertatoast(7, "No se pudo obtener la CURP", "", 7); iscalculandocurp = false; } }); @@ -4707,16 +4812,16 @@ return true; //Validado } - function generarRFC() { + function generarRFC() { - alertatoast(6, "Se esta calculando el RFC favor de esperar un momento!","",7); + alertatoast(6, "Se esta calculando el RFC favor de esperar un momento!", "", 7); let ap_paterno; <%= String.Format("ap_paterno=$('#{0}').val();", TxtAPaterno.ClientID) %> let ap_materno; <%= String.Format("ap_materno=$('#{0}').val();", TxtAMaterno.ClientID) %> let nombre; <%= String.Format("nombre=$('#{0}').val();", TxtNombres.ClientID) %> let FechaNacimiento; <%= String.Format("FechaNacimiento=$('#{0}').val();", TxtFechaNacimiento.ClientID) %> ano = Number(FechaNacimiento.slice(6, 10)); - var rfc = ano.toString().slice(2) + FechaNacimiento.slice(3, 5) + FechaNacimiento.slice(0, 2); + var rfc = ano.toString().slice(2) + FechaNacimiento.slice(3, 5) + FechaNacimiento.slice(0, 2); var dteNacimiento = rfc; //FILTRA ACENTOS @@ -4760,9 +4865,9 @@ function ValidaRFC() { if (rfcValidoJS(<%= String.Format("$('#{0}').val()", TxtRFC.ClientID) %>)) { - alertatoast(5, "RFC valido!","",7); + alertatoast(5, "RFC valido!", "", 7); } else { - alertatoast(8, "RFC invalido!","",7) + alertatoast(8, "RFC invalido!", "", 7) } } function rfcValidoJS(rfc, aceptarGenerico = true) { @@ -4811,21 +4916,21 @@ success: function (msg) { console.log(msg) if (msg.length > 0) { - alertatoast(5, "CURP valida!","",7); + alertatoast(5, "CURP valida!", "", 7); } else { - alertatoast(8, "CURP invalida!","",7) + alertatoast(8, "CURP invalida!", "", 7) } iscalculandocurp = false; }, error: function (msg) { console.log("error:" + JSON.stringify(msg)); - alertatoast(7, "No se pudo validar la CURP","",7); + alertatoast(7, "No se pudo validar la CURP", "", 7); iscalculandocurp = false; } }); } - + function RFCDigitoVerificador(rfc) { var rfcsuma = []; var nv = 0; @@ -5401,7 +5506,7 @@ } - + function fnCalculaCURP(pstNombre, pstPaterno, pstMaterno, dfecha, pstSexo, pnuCveEntidad) { pstCURP = ""; diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index a0ce17f20..7ebb6d419 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -56,7 +56,7 @@ Partial Class RH_Personal If ViewState("NombreCompleto") Is Nothing Then Return "" Else - Return ViewState("NombreCompleto").ToString + Return ViewState("NombreCompleto").ToString() End If End Get Set(value As String) @@ -68,7 +68,7 @@ Partial Class RH_Personal If ViewState("CredencialElector") Is Nothing Then Return "-1" Else - Return ViewState("CredencialElector").ToString + Return ViewState("CredencialElector").ToString() End If End Get Set(value As String) @@ -80,7 +80,7 @@ Partial Class RH_Personal If ViewState("Documentacion") Is Nothing Then Return "-1" Else - Return ViewState("Documentacion").ToString + Return ViewState("Documentacion").ToString() End If End Get Set(value As String) @@ -128,7 +128,7 @@ Partial Class RH_Personal If ViewState("FechaLimite") Is Nothing Then Return Date.Now.AddDays(15) Else - Return ViewState("FechaLimite").ToString.ToDate + Return ViewState("FechaLimite").ToString().ToDate End If End Get Set(value As Date) @@ -153,7 +153,7 @@ Partial Class RH_Personal If ViewState("ObservacionDocumentacion") Is Nothing Then Return "" Else - Return ViewState("ObservacionDocumentacion").ToString + Return ViewState("ObservacionDocumentacion").ToString() End If End Get Set(value As String) @@ -165,7 +165,7 @@ Partial Class RH_Personal If ViewState("AdjuntoDocumentacion") Is Nothing Then Return "" Else - Return ViewState("AdjuntoDocumentacion").ToString + Return ViewState("AdjuntoDocumentacion").ToString() End If End Get Set(value As String) @@ -177,7 +177,7 @@ Partial Class RH_Personal If ViewState("CvePersonal") Is Nothing Then Return -1 Else - Return ViewState("CvePersonal").ToString.ToEntero + Return ViewState("CvePersonal").ToString().ToEntero End If End Get End Property @@ -191,12 +191,12 @@ Partial Class RH_Personal End Property Private ReadOnly Property SendMail As String Get - Return ViewState("SendMail").ToString + Return ViewState("SendMail").ToString() End Get End Property Private ReadOnly Property SendMailPassword As String Get - Return ViewState("SendMailPassword").ToString + Return ViewState("SendMailPassword").ToString() End Get End Property @@ -205,7 +205,7 @@ Partial Class RH_Personal If ViewState("CveUniforme") Is Nothing Then Return -1 Else - Return ViewState("CveUniforme").ToString.ToEntero + Return ViewState("CveUniforme").ToString().ToEntero End If End Get End Property @@ -247,7 +247,7 @@ Partial Class RH_Personal If ViewState("CvePersonalEstatusInicial") Is Nothing Then Return -1 Else - Return ViewState("CvePersonalEstatusInicial").ToString.ToEntero + Return ViewState("CvePersonalEstatusInicial").ToString().ToEntero End If End Get Set(value As Integer) @@ -428,7 +428,7 @@ Partial Class RH_Personal If ViewState("VacSupervisorNombre") Is Nothing Then Return "" Else - Return ViewState("VacSupervisorNombre").ToString + Return ViewState("VacSupervisorNombre").ToString() End If End Get Set(value As String) @@ -441,7 +441,7 @@ Partial Class RH_Personal If ViewState("VacSupervisorCorreo") Is Nothing Then Return "" Else - Return ViewState("VacSupervisorCorreo").ToString + Return ViewState("VacSupervisorCorreo").ToString() End If End Get Set(value As String) @@ -454,7 +454,7 @@ Partial Class RH_Personal If ViewState("VacCveSupervisor") Is Nothing Then Return -1 Else - Return ViewState("VacCveSupervisor").ToString.ToEntero + Return ViewState("VacCveSupervisor").ToString().ToEntero End If End Get Set(value As Integer) @@ -524,7 +524,7 @@ Partial Class RH_Personal If ViewState("CvePermiso") Is Nothing Then Return -1 Else - Return ViewState("CvePermiso").ToString.ToEntero + Return ViewState("CvePermiso").ToString().ToEntero End If End Get Set(value As Integer) @@ -806,7 +806,7 @@ Partial Class RH_Personal If Request("CvePersonal") IsNot Nothing AndAlso IsNumeric(Request("CvePersonal")) AndAlso Request("CvePersonal").ToEntero > 0 Then ViewState("CvePersonal") = Request("CvePersonal") - 'CvePersonal = ViewState("CvePersonal").ToString.ToEntero + 'CvePersonal = ViewState("CvePersonal").ToString().ToEntero CargaDatos() CargaDocumentacionFirmaDecontratos() 'LnkAddLicencias.Visible = True @@ -928,9 +928,9 @@ Partial Class RH_Personal If Request("CveSubProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveSubProyecto")) Then Dim DTSub As DataTable = GlobalDTSubProyectos(-1, Request("CveSubProyecto").ToEntero) 'Cambiame If DTSub.Rows.Count > 0 Then - Dim DTProy As DataTable = GlobalDTProyectos(UsuarioActual.Empresa.CveEmpresa).FiltraParametros("CveProyecto = " & DTSub.Rows(0)("CveProyecto").ToString) + Dim DTProy As DataTable = GlobalDTProyectos(UsuarioActual.Empresa.CveEmpresa).FiltraParametros("CveProyecto = " & DTSub.Rows(0)("CveProyecto").ToString()) If DTProy.Rows.Count > 0 Then - DdlProyectoAsistenciaC.SelectedValue = DTProy.Rows(0)("CveProyecto").ToString + DdlProyectoAsistenciaC.SelectedValue = DTProy.Rows(0)("CveProyecto").ToString() DdlProyectoAsistenciaA_SelectedIndexChanged(Me, New EventArgs) DdlSubProyectoAsistenciasC.SelectedValue = Request("CveSubProyecto") End If @@ -1149,7 +1149,7 @@ Partial Class RH_Personal ' If UsuarioActual.CveSucursal = -1 Then ' DdlSucursal.Items.Insert(0, New ListItem("Seleccione", "-1")) ' Else - ' DdlSucursal.SelectedValue = UsuarioActual.CveSucursal.ToString + ' DdlSucursal.SelectedValue = UsuarioActual.CveSucursal.ToString() ' End If 'End Sub @@ -1311,6 +1311,9 @@ Partial Class RH_Personal If ObjPersonal.GetPersonal(CvePersonal, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) Then If ObjPersonal.DtResultados.Rows.Count > 0 Then + ChkEstemporal.Checked = ObjPersonal.DtResultados.Rows(0)("esTemporal").ToString() = "1" + CHKRFCValidado.Checked = ObjPersonal.DtResultados.Rows(0)("RFCValidado").ToString() = "1" + 'Carga Datos Personales LtlPersonal.Text = ObjPersonal.NombreCompleto NombreCompleto = ObjPersonal.NombreCompleto @@ -1320,9 +1323,9 @@ Partial Class RH_Personal TxtNombres.Text = ObjPersonal.Nombres TxtCorreo.Text = ObjPersonal.Correo TxtCodigo.Text = ObjPersonal.Codigo - DdlEscolaridad.SelectedValue = ObjPersonal.CveEscolaridad.ToString - DdlEstadoCivil.SelectedValueExist(ObjPersonal.CveEstadoCivil.ToString) - DdlGenero.SelectedValue = ObjPersonal.CveGenero.ToString + DdlEscolaridad.SelectedValue = ObjPersonal.CveEscolaridad.ToString() + DdlEstadoCivil.SelectedValueExist(ObjPersonal.CveEstadoCivil.ToString()) + DdlGenero.SelectedValue = ObjPersonal.CveGenero.ToString() TxtFechaNacimiento.Text = ObjPersonal.FechaNacimiento.ToShortDateString TxtRFC.Text = ObjPersonal.RFC TxtCURP.Text = ObjPersonal.CURP @@ -1332,14 +1335,14 @@ Partial Class RH_Personal TxtNumExt.Text = ObjPersonal.NumExt TxtNumInt.Text = ObjPersonal.NumInt TxtColonia.Text = ObjPersonal.Colonia - DdlEstados.SelectedValueExist(ObjPersonal.CveEstado.ToString) + DdlEstados.SelectedValueExist(ObjPersonal.CveEstado.ToString()) TxtCP.Text = ObjPersonal.CP TxtColonia.Text = ObjPersonal.Colonia TxtCiudad.Text = ObjPersonal.Ciudad TxtEstado.Text = ObjPersonal.Estado TxtTelefono.Text = ObjPersonal.Telefono TxtCelular.Text = ObjPersonal.Celular - TxtLugarNacimiento.Text = ObjPersonal.LugarNacimiento.ToString + TxtLugarNacimiento.Text = ObjPersonal.LugarNacimiento.ToString() TxtNombrePadre.Text = ObjPersonal.NombrePadre TxtNombreMadre.Text = ObjPersonal.NombreMadre Session("FileUpload") = ObjPersonal.URL @@ -1389,70 +1392,74 @@ Partial Class RH_Personal 'Carga RH TxtFechaInicioContrato.Text = ObjPersonal.FechaInicioContrato.ToShortDateString TxtFechaFinContrato.Text = If(ObjPersonal.FechaFinContrato.ToShortDateString = "01/01/0001", "", ObjPersonal.FechaFinContrato.ToShortDateString) - DdlTipoContrato.SelectedValue = ObjPersonal.CveTipoContrato.ToString - DdlTurno.SelectedValue = ObjPersonal.CveTurno.ToString - DdlJornada.SelectedValue = ObjPersonal.CveJornada.ToString - DdlDepartamento.SelectedValue = ObjPersonal.CveDepartamento.ToString + DdlTipoContrato.SelectedValue = ObjPersonal.CveTipoContrato.ToString() + DdlTurno.SelectedValue = ObjPersonal.CveTurno.ToString() + DdlJornada.SelectedValue = ObjPersonal.CveJornada.ToString() + DdlDepartamento.SelectedValue = ObjPersonal.CveDepartamento.ToString() DdlSubproyectoZona.SelectedValueExist(ObjPersonal.CveSubproyectoZona) DDLUsuarioNomina.SelectedValueExist(ObjPersonal.CveUsuarioNomina) - 'DdlViaticos.SelectedValue = ObjPersonal.IdCtaContViaticos.ToString + 'DdlViaticos.SelectedValue = ObjPersonal.IdCtaContViaticos.ToString() 'For i As Integer = DdlDepartamento.Items.Count - 1 To 1 Step -1 - ' If DdlDepartamento.Items(i).Value.Contains(ObjPersonal.CveDepartamento.ToString) Then + ' If DdlDepartamento.Items(i).Value.Contains(ObjPersonal.CveDepartamento.ToString()) Then ' DdlDepartamento.Items(i).Selected = True ' Exit For ' End If 'Next - DdlPuesto.SelectedValue = ObjPersonal.CvePuesto.ToString - DdlRuta.SelectedValue = ObjPersonal.CveRuta.ToString - DdlMotivoBaja.SelectedValue = ObjPersonal.CveMotivoBaja.ToString + DdlPuesto.SelectedValue = ObjPersonal.CvePuesto.ToString() + DdlRuta.SelectedValue = ObjPersonal.CveRuta.ToString() + DdlMotivoBaja.SelectedValue = ObjPersonal.CveMotivoBaja.ToString() TxtFechaBaja.Text = If(ObjPersonal.FechaBaja.ToShortDateString = "01/01/0001", "", ObjPersonal.FechaBaja.ToShortDateString) If ObjPersonal.DtResultados IsNot Nothing AndAlso ObjPersonal.DtResultados.Rows.Count > 0 Then - TxtFechaActivo.Text = If(ObjPersonal.DtResultados.Rows(0)("FechaActivo").ToString.Length > 0, ObjPersonal.DtResultados.Rows(0)("FechaActivo").ToString.ToDate.ToString("dd/MM/yyyy"), ObjPersonal.DtResultados.Rows(0)("FechaIng").ToString.ToDate.ToString("dd/MM/yyyy")) - TxtFechaReingreso.Text = If(ObjPersonal.DtResultados.Rows(0)("FechaReingreso").ToString.Length > 0, ObjPersonal.DtResultados.Rows(0)("FechaReingreso").ToString.ToDate.ToString("dd/MM/yyyy"), "") + TxtFechaActivo.Text = If(ObjPersonal.DtResultados.Rows(0)("FechaActivo").ToString().Length > 0, ObjPersonal.DtResultados.Rows(0)("FechaActivo").ToString().ToDate.ToString("dd/MM/yyyy"), ObjPersonal.DtResultados.Rows(0)("FechaIng").ToString().ToDate.ToString("dd/MM/yyyy")) + TxtFechaReingreso.Text = If(ObjPersonal.DtResultados.Rows(0)("FechaReingreso").ToString().Length > 0, ObjPersonal.DtResultados.Rows(0)("FechaReingreso").ToString().ToDate.ToString("dd/MM/yyyy"), "") End If - DdlEstatusPersonal.SelectedValue = ObjPersonal.CveEstatusPersonal.ToString + DdlEstatusPersonal.SelectedValue = ObjPersonal.CveEstatusPersonal.ToString() MostrarOcultarFechasEstatus() CvePersonalEstatusInicial = ObjPersonal.CveEstatusPersonal - ViewState("CveEstatusOriginal") = ObjPersonal.CveEstatusPersonal.ToString + ViewState("CveEstatusOriginal") = ObjPersonal.CveEstatusPersonal.ToString() 'Asignación If ObjPersonal.CveCliente <> -1 Then - DdlClienteAsignado.Items.Insert(1, New ListItem(ObjPersonal.Cliente, ObjPersonal.CveCliente.ToString)) - DdlClienteAsignado.SelectedValue = ObjPersonal.CveCliente.ToString + DdlClienteAsignado.Items.Insert(1, New ListItem(ObjPersonal.Cliente, ObjPersonal.CveCliente.ToString())) + DdlClienteAsignado.SelectedValue = ObjPersonal.CveCliente.ToString() Else - DdlClienteAsignado.SelectedValue = ObjPersonal.CveCliente.ToString + DdlClienteAsignado.SelectedValue = ObjPersonal.CveCliente.ToString() End If - DdlProyectoAsignado.SelectedValue = ObjPersonal.CveProyecto.ToString + DdlProyectoAsignado.SelectedValue = ObjPersonal.CveProyecto.ToString() If ObjPersonal.CveProyecto <> -1 Then DdlProyectoAsignado_SelectedIndexChanged(Me, New System.EventArgs()) - DdlSubProyectoAsignado.SelectedValue = ObjPersonal.CveSubProyecto.ToString - DdlSupervisor.SelectedValue = ObjPersonal.CveSupervisor.ToString + DdlSubProyectoAsignado.SelectedValue = ObjPersonal.CveSubProyecto.ToString() + DdlSupervisor.SelectedValue = ObjPersonal.CveSupervisor.ToString() 'Carga Nómina TxtFechaIngreso.Text = ObjPersonal.FechaIngreso.ToShortDateString - DdlTipoPeriodo.SelectedValue = ObjPersonal.CveTipoPeriodo.ToString + DdlTipoPeriodo.SelectedValue = ObjPersonal.CveTipoPeriodo.ToString() TxtNumeroSS.Text = ObjPersonal.NumeroSS ChkSeInscribioSS.Checked = ObjPersonal.SeInscribioSS - TxtSalarioDiarioPago.Text = ObjPersonal.SalarioDiarioPago.ToString - TxtSalarioDiario.Text = ObjPersonal.SalarioDiario.ToString - TxtSDI.Text = ObjPersonal.SDI.ToString - TxtSalarioCotizado.Text = ObjPersonal.SalarioDiarioSS.ToString - TxtBono.Text = ObjPersonal.Bono.ToString - TxtNumDiasAguinaldo.Text = ObjPersonal.NumDiasAguinaldo.ToString - TxtPorPrimaVacacional.Text = ObjPersonal.PorPrimaVacacional.ToString - DdlMetodoPago.SelectedValue = ObjPersonal.CveMetodoPago.ToString + TxtSalarioDiarioPago.Text = ObjPersonal.SalarioDiarioPago.ToString() + TxtSalarioDiario.Text = ObjPersonal.SalarioDiario.ToString() + TxtSDI.Text = ObjPersonal.SDI.ToString() + TxtSalarioCotizado.Text = ObjPersonal.SalarioDiarioSS.ToString() + TxtFISalariodiarioImss.Text = ObjPersonal.SalarioDiarioSS.ToString() + TxtBono.Text = ObjPersonal.Bono.ToString() + TxtNumDiasAguinaldo.Text = ObjPersonal.NumDiasAguinaldo.ToString() + TxtFIAguinaldo.Text = ObjPersonal.NumDiasAguinaldo.ToString() + TxtPorPrimaVacacional.Text = ObjPersonal.PorPrimaVacacional.ToString() + TxtFIPrimaVacacional.Text = ObjPersonal.PorPrimaVacacional.ToString() + + DdlMetodoPago.SelectedValue = ObjPersonal.CveMetodoPago.ToString() TxtBancoNumCuenta.Text = ObjPersonal.BancoNumCuenta TxtCLABE.Text = ObjPersonal.CLABE - DdlSupervisorOrganigrama.SelectedValueExist(If(ObjPersonal.CvePersonalPadre = ObjPersonal.CvePersonal, "0", If(ObjPersonal.CvePersonalPadre.ToString = "0", "-1", ObjPersonal.CvePersonalPadre.ToString))) + DdlSupervisorOrganigrama.SelectedValueExist(If(ObjPersonal.CvePersonalPadre = ObjPersonal.CvePersonal, "0", If(ObjPersonal.CvePersonalPadre.ToString() = "0", "-1", ObjPersonal.CvePersonalPadre.ToString()))) - DdlRegimenContratacion.SelectedValue = ObjPersonal.CveSATRegimenContratacion.ToString - DdlBanco.SelectedValue = If(ObjPersonal.CveSATBanco = 0, "-1", ObjPersonal.CveSATBanco.ToString) - DdlRiesgoPuesto.SelectedValue = ObjPersonal.CveSATRiesgoPuesto.ToString + DdlRegimenContratacion.SelectedValue = ObjPersonal.CveSATRegimenContratacion.ToString() + DdlBanco.SelectedValue = If(ObjPersonal.CveSATBanco = 0, "-1", ObjPersonal.CveSATBanco.ToString()) + DdlRiesgoPuesto.SelectedValue = ObjPersonal.CveSATRiesgoPuesto.ToString() 'Carga Incidencias BtnConsultarAsistencia_Click(Me, New System.EventArgs) @@ -1487,8 +1494,8 @@ Partial Class RH_Personal DdlViaticos.Attributes.Add("onclick", "CargaCuentas(1);") DdlPrestamos.Attributes.Add("onclick", "CargaCuentas(2);") - If ObjPersonal.IdCtaContPersonal > 0 Then DdlViaticos.Items.Add(New ListItem(ObjPersonal.CtaContPersonal, ObjPersonal.IdCtaContPersonal.ToString)) : DdlViaticos.SelectedValue = ObjPersonal.IdCtaContPersonal.ToString - If ObjPersonal.IdCtaContPrestamos > 0 Then DdlPrestamos.Items.Add(New ListItem(ObjPersonal.CtaContPrestamos, ObjPersonal.IdCtaContPrestamos.ToString)) : DdlPrestamos.SelectedValue = ObjPersonal.IdCtaContPrestamos.ToString + If ObjPersonal.IdCtaContPersonal > 0 Then DdlViaticos.Items.Add(New ListItem(ObjPersonal.CtaContPersonal, ObjPersonal.IdCtaContPersonal.ToString())) : DdlViaticos.SelectedValue = ObjPersonal.IdCtaContPersonal.ToString() + If ObjPersonal.IdCtaContPrestamos > 0 Then DdlPrestamos.Items.Add(New ListItem(ObjPersonal.CtaContPrestamos, ObjPersonal.IdCtaContPrestamos.ToString())) : DdlPrestamos.SelectedValue = ObjPersonal.IdCtaContPrestamos.ToString() End If @@ -1557,9 +1564,9 @@ Partial Class RH_Personal Dim ObjCuentasDeposito As New ClsGenerales(ObjPersonal.IniciaTransacSQL()) Dim ObjAF As New ClsAF(ObjPersonal.IniciaTransacSQL()) - Dim Extension As String = Path.GetExtension(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\RH\" & ViewState("Archivo").ToString) + Dim Extension As String = Path.GetExtension(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\RH\" & ViewState("Archivo").ToString()) Dim URL As String = CvePersonal & Extension - Dim Ruta = String.Format("{0}Empresas\{1}\Temp\RH\{2}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, ViewState("Archivo").ToString) + Dim Ruta = String.Format("{0}Empresas\{1}\Temp\RH\{2}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, ViewState("Archivo").ToString()) Dim Archivo As New System.IO.FileInfo(Ruta) @@ -1628,7 +1635,7 @@ Partial Class RH_Personal If TempDTCuentasBancos.Rows.Count > 0 Then For Each row As DataRow In TempDTCuentasBancos.Rows - If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString, row("Plaza").ToString, row("Sucursal").ToString, row("Cuenta").ToString, row("CLABE").ToString, row("CIE").ToString, row("SWIFT").ToString, row("Referencia").ToString, "", UsuarioActual.CveUsuario, row("CveMoneda").ToString.ToEntero, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=row("BBVAAlias").ToString) Then + If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString(), row("Plaza").ToString(), row("Sucursal").ToString(), row("Cuenta").ToString(), row("CLABE").ToString(), row("CIE").ToString(), row("SWIFT").ToString(), row("Referencia").ToString(), "", UsuarioActual.CveUsuario, row("CveMoneda").ToString().ToEntero, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=row("BBVAAlias").ToString()) Then TieneError = True Exit For End If @@ -1700,7 +1707,7 @@ Partial Class RH_Personal End If Mensaje = "Los cambios se guardaron correctamente." - 'If ViewState("CveEstatusOriginal").ToString <> DdlEstatusPersonal.SelectedValue Then + 'If ViewState("CveEstatusOriginal").ToString() <> DdlEstatusPersonal.SelectedValue Then ' 'Manda Mail con bajas 'End If @@ -1815,12 +1822,12 @@ Partial Class RH_Personal ' 'ReemplazaTexto(objSelection, "{CP}", TxtCP.Text.Trim) ' 'ReemplazaTexto(objSelection, "{CIUDAD}", TxtCiudad.Text.Trim) ' 'ReemplazaTexto(objSelection, "{ESTADO}", TxtEstado.Text.Trim) - ' 'ReemplazaTexto(objSelection, "{DIA_INICIA_CONTRATO}", TxtFechaInicioContrato.Text.ToDate.Day.ToString) + ' 'ReemplazaTexto(objSelection, "{DIA_INICIA_CONTRATO}", TxtFechaInicioContrato.Text.ToDate.Day.ToString()) ' 'ReemplazaTexto(objSelection, "{MES_INICIA_CONTRATO}", MonthName(TxtFechaInicioContrato.Text.ToDate.Month).ToUpper) - ' 'ReemplazaTexto(objSelection, "{ANIO_INICIA_CONTRATO}", TxtFechaInicioContrato.Text.ToDate.Year.ToString) - ' 'ReemplazaTexto(objSelection, "{DIA_FIN_CONTRATO}", TxtFechaFinContrato.Text.ToDate.Day.ToString) + ' 'ReemplazaTexto(objSelection, "{ANIO_INICIA_CONTRATO}", TxtFechaInicioContrato.Text.ToDate.Year.ToString()) + ' 'ReemplazaTexto(objSelection, "{DIA_FIN_CONTRATO}", TxtFechaFinContrato.Text.ToDate.Day.ToString()) ' 'ReemplazaTexto(objSelection, "{MES_FIN_CONTRATO}", MonthName(TxtFechaFinContrato.Text.ToDate.Month).ToUpper) - ' 'ReemplazaTexto(objSelection, "{ANIO_FIN_CONTRATO}", TxtFechaFinContrato.Text.ToDate.Year.ToString) + ' 'ReemplazaTexto(objSelection, "{ANIO_FIN_CONTRATO}", TxtFechaFinContrato.Text.ToDate.Year.ToString()) ' 'objSelection.InsertBreak(Type:=wdPageBreak) ' 'GuardaLog("Termina de reemplazo de variables") @@ -1831,7 +1838,7 @@ Partial Class RH_Personal ' End If ' ArchivoPath = ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & UsuarioActual.CveUsuario & ".doc" - ' oWordDoc.SaveAs(ArchivoPath.ToString) + ' oWordDoc.SaveAs(ArchivoPath.ToString()) ' oWordDoc.Close() ' Else ' Alert("No se pudo generar el archivo", TipoMensaje.MsgError) @@ -2006,7 +2013,7 @@ Partial Class RH_Personal DdlTipoBuzonCalidad.SelectedValueExist(GvRow.DataKey("CveTipoBuzon")) ChkSeAtendio.Visible = True - ChkSeAtendio.Checked = If(GvRow.DataKey("SeAtendioChk").ToString.ToEntero = 1, True, False) + ChkSeAtendio.Checked = If(GvRow.DataKey("SeAtendioChk").ToString().ToEntero = 1, True, False) TxtFechaBuzonCalidad.Text = GvRow.DataKey("FechaQueja").ToDate.ToString("dd/MM/yyyy") TxtBuzonDescriptcion.Text = GvRow.DataKey("Descripcion") @@ -2042,7 +2049,7 @@ Partial Class RH_Personal If ViewState("CvePersonalBuzon") Is Nothing Then Return -1 Else - Return ViewState("CvePersonalBuzon").ToString.ToEntero + Return ViewState("CvePersonalBuzon").ToString().ToEntero End If End Get Set(value As Integer) @@ -2090,7 +2097,7 @@ Partial Class RH_Personal Cuerpo.AppendLine($"
    ") - Correo.SendMail(EmpresaNotificaciones, TxtMailBuzonCalidad.Text.Trim, Asunto, Body:=Cuerpo.ToString) + Correo.SendMail(EmpresaNotificaciones, TxtMailBuzonCalidad.Text.Trim, Asunto, Body:=Cuerpo.ToString()) End If @@ -2209,7 +2216,7 @@ Partial Class RH_Personal ' Dim Observaciones As String = DirectCast(GvBuzonCalidad.Rows(e.RowIndex).FindControl("TxtObs"), TextBox).Text.Trim ' Dim SeAtendio As Boolean = GvBuzonCalidad.Rows(e.RowIndex).FCCheckBox("ChkEstado").Checked - ' Dim CveBuzonCalidad As Integer = GvBuzonCalidad.DataKeys(e.RowIndex).Value.ToString.ToEntero + ' Dim CveBuzonCalidad As Integer = GvBuzonCalidad.DataKeys(e.RowIndex).Value.ToString().ToEntero ' If ObjBuzonCalidad.UpdateBuzonCalidad(SeAtendio, Observaciones, CveBuzonCalidad, UsuarioActual.CveUsuario) Then ' GvBuzonCalidad.EditIndex = -1 @@ -2660,9 +2667,9 @@ Partial Class RH_Personal e.Row.Cells(3).Width = Unit.Pixel(500) End If - If e.Row.DBCampo("Archivo").ToString <> "" Then + If e.Row.DBCampo("Archivo").ToString() <> "" Then e.Row.FCLinkButton("LinkArchivo").Visible = True - e.Row.FCLinkButton("LinkArchivo").CommandArgument = String.Format("OI\{0}", e.Row.DBCampo("Archivo").ToString) + e.Row.FCLinkButton("LinkArchivo").CommandArgument = String.Format("OI\{0}", e.Row.DBCampo("Archivo").ToString()) ScriptManager.GetCurrent(Me).RegisterPostBackControl(e.Row.FCLinkButton("LinkArchivo")) 'Registro un evento Postbacktrigger, que recargue toda la pagina para que funcione End If @@ -2684,7 +2691,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("Empresas\{0}\OI", UsuarioActual.CveEmpresa)) End If GvEB.DataSource = ObjEventoBitacora.DtResultados @@ -2893,7 +2900,7 @@ Partial Class RH_Personal End If LimpiaCuentasBancarias() - CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString) + CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString()) If CvePersonal > 0 Then CargaGvBitacora() @@ -2927,7 +2934,7 @@ Partial Class RH_Personal End If ObjCuentasBancos.Dispose() - CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString) + CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString()) End Sub #Region "GRIDVIEW - CUENTAS BANCARIAS" @@ -2966,11 +2973,11 @@ Partial Class RH_Personal End Sub Protected Sub GvBancosCuentas_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvBancosCuentas.RowEditing GvBancosCuentas.EditIndex = e.NewEditIndex - CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString) + CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString()) End Sub Protected Sub GvBancosCuentas_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvBancosCuentas.RowCancelingEdit GvBancosCuentas.EditIndex = -1 - CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString) + CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString()) End Sub Protected Sub GvBancosCuentas_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvBancosCuentas.RowUpdating Dim NombreBanco = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNombreBanco").Text.Trim @@ -2981,7 +2988,7 @@ Partial Class RH_Personal Dim NumeroCuenta = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroCuenta").Text.Trim Dim ConvenioCIE = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtConvenioCIE").Text.Trim Dim Referencia = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtReferencia").Text.Trim - Dim CveMoneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedValue.ToString.ToEntero + Dim CveMoneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedValue.ToString().ToEntero Dim Estatus = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked Dim Moneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedItem.Text @@ -3037,14 +3044,14 @@ Partial Class RH_Personal End If Dim ObjCuentasBancos As New ClsGenerales If CvePersonal > 0 Then - If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString.ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, False, Estatus, CveMoneda, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias) Then + If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, False, Estatus, CveMoneda, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias) Then DTCuentasBancos.Clear() DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal))) Alert("Cuenta actualizada con exito.", TipoMensaje.MsgInformacion) End If Else - Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString.ToEntero - 1 + Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString().ToEntero - 1 Dim Row As DataRow = TempDTCuentasBancos.Rows(index) Row("BancoNombre") = NombreBanco Row("Sucursal") = NumeroSucursal @@ -3061,25 +3068,25 @@ Partial Class RH_Personal ObjCuentasBancos.Dispose() GvBancosCuentas.EditIndex = -1 - CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString) + CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString()) CargaGvBitacora() End Sub Protected Sub GvBancosCuentas_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvBancosCuentas.RowDeleting Dim ObjCuentasBancos As New ClsGenerales If CvePersonal > 0 Then - If ObjCuentasBancos.RemoveCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then + If ObjCuentasBancos.RemoveCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then DTCuentasBancos.Clear() DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal))) Alert("Cuenta Bancaria borrada con exito.", TipoMensaje.MsgInformacion) End If Else - Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString.ToEntero - 1 + Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString().ToEntero - 1 TempDTCuentasBancos.Rows.RemoveAt(index) End If - CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString) + CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString()) ObjCuentasBancos.Dispose() CargaGvBitacora() End Sub @@ -3096,20 +3103,20 @@ Partial Class RH_Personal Const OrdenInicial As String = "" Dim Arg(2) As String - Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c) + Arg = CType(sender, LinkButton).CommandArgument().ToString().Split(";"c) Campo = Arg(0) gvi = Arg(1).ToEntero Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal) Campo = Campo.Substring(0, Campo.Length - 1) - If ViewState(String.Format("O{0}", Campo, gvi)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo, gvi)).ToString = String.Format("{0} DESC", Campo) Then + If ViewState(String.Format("O{0}", Campo, gvi)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo, gvi)).ToString() = String.Format("{0} DESC", Campo) Then ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo) Literal.Text = String.Format("") Else ViewState(String.Format("O{0}", Campo, gvi)) = String.Format("{0} DESC", Campo) Literal.Text = String.Format("") End If - Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo, gvi)).ToString + Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo, gvi)).ToString() ViewState("Orden") = Orden CargaGrid(Orden, gvi) End Sub @@ -3214,17 +3221,17 @@ Partial Class RH_Personal params.Add(New ReportParameter("FechaFin", If(ObjPersonal.FechaBaja.ToShortDateString = "01/01/0001", "", ObjPersonal.FechaBaja.ToShortDateString))) params.Add(New ReportParameter("CuentaContable", DdlViaticos.SelectedItem.Text)) params.Add(New ReportParameter("FechaIngreso", ObjPersonal.FechaIngreso.ToShortDateString)) - params.Add(New ReportParameter("TipoPeriodo", ObjPersonal.CveTipoPeriodo.ToString)) + params.Add(New ReportParameter("TipoPeriodo", ObjPersonal.CveTipoPeriodo.ToString())) params.Add(New ReportParameter("RegimenContratacion", ObjPersonal.RegimenContratacion)) params.Add(New ReportParameter("RiesgoPuesto", DdlRiesgoPuesto.SelectedItem.Text)) params.Add(New ReportParameter("NoSeguroSocial", ObjPersonal.NumeroSS)) params.Add(New ReportParameter("InscribioSeguro", If(ObjPersonal.SeInscribioSS, "Si", "No"))) - params.Add(New ReportParameter("SDD", ObjPersonal.SalarioDiario.ToString)) - params.Add(New ReportParameter("SDI", ObjPersonal.SDI.ToString)) - params.Add(New ReportParameter("SalarioIMSS", ObjPersonal.SalarioDiarioSS.ToString)) - params.Add(New ReportParameter("Bono", ObjPersonal.Bono.ToString)) - params.Add(New ReportParameter("DiasAguinaldo", ObjPersonal.NumDiasAguinaldo.ToString)) - params.Add(New ReportParameter("PrimaVacacional", ObjPersonal.PorPrimaVacacional.ToString)) + params.Add(New ReportParameter("SDD", ObjPersonal.SalarioDiario.ToString())) + params.Add(New ReportParameter("SDI", ObjPersonal.SDI.ToString())) + params.Add(New ReportParameter("SalarioIMSS", ObjPersonal.SalarioDiarioSS.ToString())) + params.Add(New ReportParameter("Bono", ObjPersonal.Bono.ToString())) + params.Add(New ReportParameter("DiasAguinaldo", ObjPersonal.NumDiasAguinaldo.ToString())) + params.Add(New ReportParameter("PrimaVacacional", ObjPersonal.PorPrimaVacacional.ToString())) params.Add(New ReportParameter("MetodoPago", If(DdlMetodoPago.SelectedValue = "-1", "", DdlMetodoPago.SelectedItem.Text))) params.Add(New ReportParameter("Banco", If(DdlBanco.SelectedValue = "-1", "", DdlBanco.SelectedItem.Text))) params.Add(New ReportParameter("NoCuenta", ObjPersonal.BancoNumCuenta)) @@ -3308,17 +3315,17 @@ Partial Class RH_Personal params.Add(New ReportParameter("FechaFin", If(ObjPersonal.FechaBaja.ToShortDateString = "01/01/0001", "", ObjPersonal.FechaBaja.ToShortDateString))) params.Add(New ReportParameter("CuentaContable", DdlViaticos.SelectedItem.Text)) params.Add(New ReportParameter("FechaIngreso", ObjPersonal.FechaIngreso.ToShortDateString)) - params.Add(New ReportParameter("TipoPeriodo", ObjPersonal.CveTipoPeriodo.ToString)) + params.Add(New ReportParameter("TipoPeriodo", ObjPersonal.CveTipoPeriodo.ToString())) params.Add(New ReportParameter("RegimenContratacion", ObjPersonal.RegimenContratacion)) params.Add(New ReportParameter("RiesgoPuesto", DdlRiesgoPuesto.SelectedItem.Text)) params.Add(New ReportParameter("NoSeguroSocial", ObjPersonal.NumeroSS)) params.Add(New ReportParameter("InscribioSeguro", If(ObjPersonal.SeInscribioSS, "Si", "No"))) - params.Add(New ReportParameter("SDD", ObjPersonal.SalarioDiario.ToString)) - params.Add(New ReportParameter("SDI", ObjPersonal.SDI.ToString)) - params.Add(New ReportParameter("SalarioIMSS", ObjPersonal.SalarioDiarioSS.ToString)) - params.Add(New ReportParameter("Bono", ObjPersonal.Bono.ToString)) - params.Add(New ReportParameter("DiasAguinaldo", ObjPersonal.NumDiasAguinaldo.ToString)) - params.Add(New ReportParameter("PrimaVacacional", ObjPersonal.PorPrimaVacacional.ToString)) + params.Add(New ReportParameter("SDD", ObjPersonal.SalarioDiario.ToString())) + params.Add(New ReportParameter("SDI", ObjPersonal.SDI.ToString())) + params.Add(New ReportParameter("SalarioIMSS", ObjPersonal.SalarioDiarioSS.ToString())) + params.Add(New ReportParameter("Bono", ObjPersonal.Bono.ToString())) + params.Add(New ReportParameter("DiasAguinaldo", ObjPersonal.NumDiasAguinaldo.ToString())) + params.Add(New ReportParameter("PrimaVacacional", ObjPersonal.PorPrimaVacacional.ToString())) params.Add(New ReportParameter("MetodoPago", If(DdlMetodoPago.SelectedValue = "-1", "", DdlMetodoPago.SelectedItem.Text))) params.Add(New ReportParameter("Banco", If(DdlBanco.SelectedValue = "-1", "", DdlBanco.SelectedItem.Text))) params.Add(New ReportParameter("NoCuenta", ObjPersonal.BancoNumCuenta)) @@ -3330,7 +3337,7 @@ Partial Class RH_Personal edad = edad - 1 End If - params.Add(New ReportParameter("Edad", edad.ToString)) + params.Add(New ReportParameter("Edad", edad.ToString())) @@ -3399,8 +3406,8 @@ Partial Class RH_Personal Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) - params.Add(New ReportParameter("Empleado", LtlPersonal.Text.ToString)) - params.Add(New ReportParameter("Saldo", LblSaldoGxC.Text.ToString)) + params.Add(New ReportParameter("Empleado", LtlPersonal.Text.ToString())) + params.Add(New ReportParameter("Saldo", LblSaldoGxC.Text.ToString())) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) @@ -3422,21 +3429,21 @@ Partial Class RH_Personal If DTGastosPorCheque.Rows.Count > 0 Then For Each Row As DataRow In DTGastosPorCheque.Rows - Dim FolioPago As String = Row("FolioPago").ToString + Dim FolioPago As String = Row("FolioPago").ToString() Row("FolioPago") = "" - If Row("CveCompra").ToString = "" And Row("CveIE").ToString <> "" Then + If Row("CveCompra").ToString() = "" And Row("CveIE").ToString() <> "" Then Row("FechaVencimiento") = Row("FechaDocumento") Row("FolioPago") = FolioPago End If - If Row("FolioPago").ToString <> "" Then + If Row("FolioPago").ToString() <> "" Then Row("SerieFolio") = "" End If Next Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) - params.Add(New ReportParameter("Empleado", LtlPersonal.Text.ToString)) + params.Add(New ReportParameter("Empleado", LtlPersonal.Text.ToString())) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) @@ -3494,10 +3501,10 @@ Partial Class RH_Personal Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim chkEstatus As CheckBox - CveDocumentacionElectronica = GvRow.DataKey("CveDocumentacionElectronica").ToString.ToEntero - CveDocumentacion = GvRow.DataKey("CveDocumentacion").ToString.ToEntero + CveDocumentacionElectronica = GvRow.DataKey("CveDocumentacionElectronica").ToString().ToEntero + CveDocumentacion = GvRow.DataKey("CveDocumentacion").ToString().ToEntero Documentacion = GvRow.DataKey("Documentacion") - AdjuntoDocumentacion = GvRow.DataKey("Adjunto").ToString + AdjuntoDocumentacion = GvRow.DataKey("Adjunto").ToString() chkEstatus = GvRow.FCCheckBox("chkEstatus") @@ -3522,24 +3529,24 @@ Partial Class RH_Personal For Each dRow As GridViewRow In GvDocumentosFirma.Rows - Dim _CveDocumentacion As Integer = dRow.DataKey("CveDocumentacion").ToString.ToEntero + Dim _CveDocumentacion As Integer = dRow.DataKey("CveDocumentacion").ToString().ToEntero Dim _Adjunto As String = dRow.DataKey("Adjunto") 'Dim _Documentacion As String = dRow.DataKey("Documentacion") - Dim _CveDocumentacionElectronica As Integer = dRow.DataKey("CveDocumentacionElectronica").ToString.ToEntero + Dim _CveDocumentacionElectronica As Integer = dRow.DataKey("CveDocumentacionElectronica").ToString().ToEntero Dim _txtObservaciones As TextBox = dRow.FCTextBox("TxtObservaciones") Dim _TxtFechaLimite As TextBox = dRow.FCTextBox("TxtFechaLimite") Dim _TxtFechaVigencia As TextBox = dRow.FCTextBox("TxtFechaVigencia") Dim chkEstatus As CheckBox = dRow.FCCheckBox("chkEstatus") Dim _estatus As Integer - _estatus = If(dRow.DataKey("Estatus").ToString.ToUpper = "TRUE", 1, 0) + _estatus = If(dRow.DataKey("Estatus").ToString().ToUpper = "TRUE", 1, 0) Dim _FechaVigencia As Date Dim _FechaLimite As Date - Dim DiasLimite As Integer = dRow.DataKey("DiasLimite").ToString.ToEntero - Dim AplicaDiasLimite As Boolean = If(dRow.DataKey("AplicaDiasLimite").ToString = "1", True, False) - Dim AplicaFechaVencimiento As Boolean = If(dRow.DataKey("AplicaFechaVencimiento").ToString = "1", True, False) + Dim DiasLimite As Integer = dRow.DataKey("DiasLimite").ToString().ToEntero + Dim AplicaDiasLimite As Boolean = If(dRow.DataKey("AplicaDiasLimite").ToString() = "1", True, False) + Dim AplicaFechaVencimiento As Boolean = If(dRow.DataKey("AplicaFechaVencimiento").ToString() = "1", True, False) If _TxtFechaVigencia.Text.Length = 10 Then _FechaVigencia = _TxtFechaVigencia.Text.ToDate @@ -3655,9 +3662,9 @@ Partial Class RH_Personal Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim activo As Boolean = False - Dim _CveDocumentacionElectronica As Integer = GvRow.DataKey("CveDocumentacionElectronica").ToString.ToEntero - Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString.ToEntero - Dim _Adjunto As String = GvRow.DataKey("Adjunto").ToString + Dim _CveDocumentacionElectronica As Integer = GvRow.DataKey("CveDocumentacionElectronica").ToString().ToEntero + Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString().ToEntero + Dim _Adjunto As String = GvRow.DataKey("Adjunto").ToString() Dim _fechaLimite As Date = GvRow.FCTextBox("TxtFechaLimite").Text.ToDate Dim obserbaciones As String = DirectCast(GvRow.FindControl("TxtObservaciones"), TextBox).Text @@ -3691,26 +3698,26 @@ Partial Class RH_Personal If e.Row.RowType = DataControlRowType.DataRow Then - Dim Adjunto As String = e.Row.DBCampo("Adjunto").ToString + Dim Adjunto As String = e.Row.DBCampo("Adjunto").ToString() Dim ImgDownLoadFormato As LinkButton = e.Row.FCLinkButton("ImgDownLoadFormato") Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad") Dim ImgRequired As Literal = e.Row.FCLiteral("ImgRequired") Dim txtFechaLimite As TextBox = e.Row.FCTextBox("TxtFechaLimite") Dim requerido As Boolean = If(e.Row.DBCampo("Requerido").ToUpper = "TRUE", True, False) Dim chkEstatus As CheckBox = e.Row.FCCheckBox("chkEstatus") - Dim documentacionFormato As String = e.Row.DBCampo("DocumentacionFormato").ToString - Dim Documentacion As String = e.Row.DBCampo("Documentacion").ToString - Dim _CveDocumentacion As Integer = e.Row.DBCampo("CveDocumentacion").ToString.ToEntero - Dim separado As Char() = ".".ToString.ToCharArray + Dim documentacionFormato As String = e.Row.DBCampo("DocumentacionFormato").ToString() + Dim Documentacion As String = e.Row.DBCampo("Documentacion").ToString() + Dim _CveDocumentacion As Integer = e.Row.DBCampo("CveDocumentacion").ToString().ToEntero + Dim separado As Char() = ".".ToString().ToCharArray Dim array() As String = Adjunto.Split(separado) Dim extencion As String = "" Dim existeAdjunto As Boolean = False Dim TxtFechaVigencia As TextBox = e.Row.FCTextBox("TxtFechaVigencia") ' FechaVigencia - Dim DiasLimite As Integer = e.Row.DataKey("DiasLimite").ToString.ToEntero - Dim AplicaDiasLimite As Boolean = If(e.Row.DataKey("AplicaDiasLimite").ToString = "1", True, False) - Dim AplicaFechaVencimiento As Boolean = If(e.Row.DataKey("AplicaFechaVencimiento").ToString = "1", True, False) + Dim DiasLimite As Integer = e.Row.DataKey("DiasLimite").ToString().ToEntero + Dim AplicaDiasLimite As Boolean = If(e.Row.DataKey("AplicaDiasLimite").ToString() = "1", True, False) + Dim AplicaFechaVencimiento As Boolean = If(e.Row.DataKey("AplicaFechaVencimiento").ToString() = "1", True, False) txtFechaLimite.Visible = If(AplicaDiasLimite, True, False) TxtFechaVigencia.Visible = If(AplicaFechaVencimiento, True, False) @@ -3723,7 +3730,7 @@ Partial Class RH_Personal extencion = array(array.Length - 1) End If - If e.Row.DBCampo("Estatus").ToString.ToEntero = 1 Then + If e.Row.DBCampo("Estatus").ToString().ToEntero = 1 Then chkEstatus.Checked = True Else chkEstatus.Checked = False @@ -3736,7 +3743,7 @@ Partial Class RH_Personal ImgDownLoadFormato.Visible = True End If - txtFechaLimite.Text = e.Row.DBCampo("FechaLimite").ToString.ToDate.ToString("dd/MM/yyyy") + txtFechaLimite.Text = e.Row.DBCampo("FechaLimite").ToString().ToDate.ToString("dd/MM/yyyy") If Adjunto.Trim.Length > 0 Then @@ -3771,7 +3778,7 @@ Partial Class RH_Personal Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - Dim CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString.ToEntero + Dim CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString().ToEntero Dim DocumentacionFormato As String = CveDocumentacion & "_" & GvRow.DataKey("DocumentacionFormato") DescarFormato(DocumentacionFormato) @@ -3794,7 +3801,7 @@ Partial Class RH_Personal Dim objDoc As New clsGemBoxDocument(pathDesti) Dim objRH As New ClsRH - Dim FechaActual As String = Now.Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString & " del " & Now.Year.ToString() + Dim FechaActual As String = Now.Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString() & " del " & Now.Year.ToString() objDoc.SustituirTags(objRH.GetDatosTagsDocumentos(CvePersonal, UsuarioActual.CveEmpresa)) @@ -3826,20 +3833,20 @@ Partial Class RH_Personal If objRH.PersonalReclutamientoGet(CvePersonal, UsuarioActual.Empresa.CveEmpresa) Then - ListaTagsDocumentost.Add(New TagsDocumentos("{Nombres}", objRH.DtResultados(0)("Nombres").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{Nombres}", objRH.DtResultados(0)("Nombres").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{APaterno}", objRH.DtResultados(0)("APaterno").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{APaterno}", objRH.DtResultados(0)("APaterno").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{AMaterno}", objRH.DtResultados(0)("AMaterno").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{AMaterno}", objRH.DtResultados(0)("AMaterno").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{RFC}", objRH.DtResultados(0)("RFC").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{RFC}", objRH.DtResultados(0)("RFC").ToString())) @@ -3848,105 +3855,105 @@ Partial Class RH_Personal - ListaTagsDocumentost.Add(New TagsDocumentos("{Estatura}", objRH.DtResultados(0)("Estatura").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{Estatura}", objRH.DtResultados(0)("Estatura").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{Peso}", objRH.DtResultados(0)("Peso").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{Peso}", objRH.DtResultados(0)("Peso").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{LugarNacimiento}", objRH.DtResultados(0)("LugarNacimiento").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{LugarNacimiento}", objRH.DtResultados(0)("LugarNacimiento").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{Edad}", objRH.DtResultados(0)("Edad").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{Edad}", objRH.DtResultados(0)("Edad").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{NombreTelEmergencia}", objRH.DtResultados(0)("NombreTelEmergencia").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{NombreTelEmergencia}", objRH.DtResultados(0)("NombreTelEmergencia").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{TipoSangre}", objRH.DtResultados(0)("TipoSangre").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{TipoSangre}", objRH.DtResultados(0)("TipoSangre").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{Vivienda}", objRH.DtResultados(0)("Vivienda").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{Vivienda}", objRH.DtResultados(0)("Vivienda").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{ViviendaDueno}", objRH.DtResultados(0)("ViviendaDueno").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{ViviendaDueno}", objRH.DtResultados(0)("ViviendaDueno").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{CreditoInfonavit}", objRH.DtResultados(0)("CreditoInfonavit").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{CreditoInfonavit}", objRH.DtResultados(0)("CreditoInfonavit").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{RentaMensual}", objRH.DtResultados(0)("RentaMensual").ToString.ToDecimal.ToString("###,###,###.00"))) + ListaTagsDocumentost.Add(New TagsDocumentos("{RentaMensual}", objRH.DtResultados(0)("RentaMensual").ToString().ToDecimal.ToString("###,###,###.00"))) - ListaTagsDocumentost.Add(New TagsDocumentos("{TransportePublico}", objRH.DtResultados(0)("TransportePublico").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{TransportePublico}", objRH.DtResultados(0)("TransportePublico").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormente}", objRH.DtResultados(0)("TrabajadoAnteriormente").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormente}", objRH.DtResultados(0)("TrabajadoAnteriormente").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormenteObservaciones}", objRH.DtResultados(0)("TrabajadoAnteriormenteObservaciones").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormenteObservaciones}", objRH.DtResultados(0)("TrabajadoAnteriormenteObservaciones").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{ParientesEmpresa}", objRH.DtResultados(0)("ParientesEmpresa").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{ParientesEmpresa}", objRH.DtResultados(0)("ParientesEmpresa").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelito}", objRH.DtResultados(0)("AcusadoDelito").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelito}", objRH.DtResultados(0)("AcusadoDelito").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelitoObservaciones}", objRH.DtResultados(0)("AcusadoDelitoObservaciones").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelitoObservaciones}", objRH.DtResultados(0)("AcusadoDelitoObservaciones").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{Calle}", objRH.DtResultados(0)("Calle").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{Calle}", objRH.DtResultados(0)("Calle").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{Colonia}", objRH.DtResultados(0)("Colonia").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{Colonia}", objRH.DtResultados(0)("Colonia").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{CP}", objRH.DtResultados(0)("CP").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{CP}", objRH.DtResultados(0)("CP").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{Telefono}", objRH.DtResultados(0)("Telefono").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{Telefono}", objRH.DtResultados(0)("Telefono").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{Celular}", objRH.DtResultados(0)("Celular").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{Celular}", objRH.DtResultados(0)("Celular").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{Correo}", objRH.DtResultados(0)("Correo").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{Correo}", objRH.DtResultados(0)("Correo").ToString())) 'If Not IsDBNull(objRH.DtResultados(0)("CveSucursal")) Then @@ -3956,45 +3963,45 @@ Partial Class RH_Personal - ListaTagsDocumentost.Add(New TagsDocumentos("{NumeroSS}", objRH.DtResultados(0)("NumeroSS").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{NumeroSS}", objRH.DtResultados(0)("NumeroSS").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{Licencia}", objRH.DtResultados(0)("Licencia").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{Licencia}", objRH.DtResultados(0)("Licencia").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{CartillaMilitar}", objRH.DtResultados(0)("CartillaMilitar").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{CartillaMilitar}", objRH.DtResultados(0)("CartillaMilitar").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{CURP}", objRH.DtResultados(0)("CURP").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{CURP}", objRH.DtResultados(0)("CURP").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{AutorizaAntidoping}", objRH.DtResultados(0)("AutorizaAntidoping").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{AutorizaAntidoping}", objRH.DtResultados(0)("AutorizaAntidoping").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{Observaciones}", objRH.DtResultados(0)("Observaciones").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{Observaciones}", objRH.DtResultados(0)("Observaciones").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString())) - ListaTagsDocumentost.Add(New TagsDocumentos("{FechaIngreso}", objRH.DtResultados(0)("FechaIngreso").ToString.ToDate.ToShortDateString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{FechaIngreso}", objRH.DtResultados(0)("FechaIngreso").ToString().ToDate.ToShortDateString)) - ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString.ToDate.ToShortDateString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString().ToDate.ToShortDateString)) - ListaTagsDocumentost.Add(New TagsDocumentos("{Puesto}", objRH.DtResultados(0)("Puesto").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{Puesto}", objRH.DtResultados(0)("Puesto").ToString())) ListaTagsDocumentost.Add(New TagsDocumentos("{CUIP}", "")) ListaTagsDocumentost.Add(New TagsDocumentos("{Denominacion}", "")) - ListaTagsDocumentost.Add(New TagsDocumentos("{FechaNacimiento}", objRH.DtResultados(0)("FechaNacimiento").ToString.ToDate.ToString("dd/MM/yyyy"))) + ListaTagsDocumentost.Add(New TagsDocumentos("{FechaNacimiento}", objRH.DtResultados(0)("FechaNacimiento").ToString().ToDate.ToString("dd/MM/yyyy"))) Dim fechaActual As String = " " & Now.Day & " del mes " & Now.Month & " del año " & Now.Year @@ -4029,117 +4036,117 @@ Partial Class RH_Personal ' If objRH.PersonalReclutamientoGet(CvePersonal, UsuarioActual.Empresa.CveEmpresa) Then ' If Not IsDBNull(objRH.DtResultados(0)("Nombres")) Then - ' ListaTagsDocumentost.Add(New TagsDocumentos("{Nombres}", objRH.DtResultados(0)("Nombres").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{Nombres}", objRH.DtResultados(0)("Nombres").ToString())) ' End If ' If Not objRH.DtResultados(0)("APaterno") Is Nothing Then - ' ListaTagsDocumentost.Add(New TagsDocumentos("{APaterno}", objRH.DtResultados(0)("APaterno").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{APaterno}", objRH.DtResultados(0)("APaterno").ToString())) ' End If ' If Not objRH.DtResultados(0)("AMaterno") Is Nothing Then - ' ListaTagsDocumentost.Add(New TagsDocumentos("{AMaterno}", objRH.DtResultados(0)("AMaterno").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{AMaterno}", objRH.DtResultados(0)("AMaterno").ToString())) ' End If ' If Not objRH.DtResultados(0)("NombreCompleto") Is Nothing Then - ' ListaTagsDocumentost.Add(New TagsDocumentos("{NombreCompleto}", objRH.DtResultados(0)("NombreCompleto").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{NombreCompleto}", objRH.DtResultados(0)("NombreCompleto").ToString())) ' End If ' If Not IsDBNull(objRH.DtResultados(0)("Estatura")) Then - ' ListaTagsDocumentost.Add(New TagsDocumentos("{Estatura}", objRH.DtResultados(0)("Estatura").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{Estatura}", objRH.DtResultados(0)("Estatura").ToString())) ' End If ' If Not IsDBNull(objRH.DtResultados(0)("Peso")) Then - ' ListaTagsDocumentost.Add(New TagsDocumentos("{Peso}", objRH.DtResultados(0)("Peso").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{Peso}", objRH.DtResultados(0)("Peso").ToString())) ' End If ' If Not IsDBNull(objRH.DtResultados(0)("LugarNacimiento")) Then - ' ListaTagsDocumentost.Add(New TagsDocumentos("{LugarNacimiento}", objRH.DtResultados(0)("LugarNacimiento").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{LugarNacimiento}", objRH.DtResultados(0)("LugarNacimiento").ToString())) ' End If ' If Not IsDBNull(objRH.DtResultados(0)("Edad")) Then - ' ListaTagsDocumentost.Add(New TagsDocumentos("{Edad}", objRH.DtResultados(0)("Edad").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{Edad}", objRH.DtResultados(0)("Edad").ToString())) ' End If ' If Not IsDBNull(objRH.DtResultados(0)("NombreTelEmergencia")) Then - ' ListaTagsDocumentost.Add(New TagsDocumentos("{NombreTelEmergencia}", objRH.DtResultados(0)("NombreTelEmergencia").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{NombreTelEmergencia}", objRH.DtResultados(0)("NombreTelEmergencia").ToString())) ' End If ' If Not IsDBNull(objRH.DtResultados(0)("TipoSangre")) Then - ' ListaTagsDocumentost.Add(New TagsDocumentos("{TipoSangre}", objRH.DtResultados(0)("TipoSangre").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{TipoSangre}", objRH.DtResultados(0)("TipoSangre").ToString())) ' End If - ' If Not IsDBNull(objRH.DtResultados(0)("Vivienda")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Vivienda}", objRH.DtResultados(0)("Vivienda").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("Vivienda")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Vivienda}", objRH.DtResultados(0)("Vivienda").ToString())) - ' If Not IsDBNull(objRH.DtResultados(0)("ViviendaDueno")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{ViviendaDueno}", objRH.DtResultados(0)("ViviendaDueno").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("ViviendaDueno")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{ViviendaDueno}", objRH.DtResultados(0)("ViviendaDueno").ToString())) - ' If Not IsDBNull(objRH.DtResultados(0)("CreditoInfonavit")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{CreditoInfonavit}", objRH.DtResultados(0)("CreditoInfonavit").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("CreditoInfonavit")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{CreditoInfonavit}", objRH.DtResultados(0)("CreditoInfonavit").ToString())) - ' If Not IsDBNull(objRH.DtResultados(0)("RentaMensual")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{RentaMensual}", objRH.DtResultados(0)("RentaMensual").ToString.ToDecimal.ToString("###,###,###.00"))) + ' If Not IsDBNull(objRH.DtResultados(0)("RentaMensual")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{RentaMensual}", objRH.DtResultados(0)("RentaMensual").ToString().ToDecimal.ToString("###,###,###.00"))) - ' If Not IsDBNull(objRH.DtResultados(0)("TransportePublico")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{TransportePublico}", objRH.DtResultados(0)("TransportePublico").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("TransportePublico")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{TransportePublico}", objRH.DtResultados(0)("TransportePublico").ToString())) - ' If Not IsDBNull(objRH.DtResultados(0)("TrabajadoAnteriormente")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormente}", objRH.DtResultados(0)("TrabajadoAnteriormente").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("TrabajadoAnteriormente")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormente}", objRH.DtResultados(0)("TrabajadoAnteriormente").ToString())) - ' If Not IsDBNull(objRH.DtResultados(0)("TrabajadoAnteriormenteObservaciones")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormenteObservaciones}", objRH.DtResultados(0)("TrabajadoAnteriormenteObservaciones").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("TrabajadoAnteriormenteObservaciones")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormenteObservaciones}", objRH.DtResultados(0)("TrabajadoAnteriormenteObservaciones").ToString())) - ' If Not IsDBNull(objRH.DtResultados(0)("ParientesEmpresa")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{ParientesEmpresa}", objRH.DtResultados(0)("ParientesEmpresa").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("ParientesEmpresa")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{ParientesEmpresa}", objRH.DtResultados(0)("ParientesEmpresa").ToString())) - ' If Not IsDBNull(objRH.DtResultados(0)("AcusadoDelito")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelito}", objRH.DtResultados(0)("AcusadoDelito").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("AcusadoDelito")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelito}", objRH.DtResultados(0)("AcusadoDelito").ToString())) - ' If Not IsDBNull(objRH.DtResultados(0)("AcusadoDelitoObservaciones")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelitoObservaciones}", objRH.DtResultados(0)("AcusadoDelitoObservaciones").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("AcusadoDelitoObservaciones")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelitoObservaciones}", objRH.DtResultados(0)("AcusadoDelitoObservaciones").ToString())) - ' If Not IsDBNull(objRH.DtResultados(0)("Direccion")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("Direccion")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString())) - ' If Not IsDBNull(objRH.DtResultados(0)("Calle")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Calle}", objRH.DtResultados(0)("Calle").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("Calle")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Calle}", objRH.DtResultados(0)("Calle").ToString())) - ' If Not IsDBNull(objRH.DtResultados(0)("Colonia")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Colonia}", objRH.DtResultados(0)("Colonia").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("Colonia")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Colonia}", objRH.DtResultados(0)("Colonia").ToString())) - ' If Not IsDBNull(objRH.DtResultados(0)("CP")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{CP}", objRH.DtResultados(0)("CP").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("CP")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{CP}", objRH.DtResultados(0)("CP").ToString())) - ' If Not IsDBNull(objRH.DtResultados(0)("Telefono")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Telefono}", objRH.DtResultados(0)("Telefono").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("Telefono")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Telefono}", objRH.DtResultados(0)("Telefono").ToString())) - ' If Not IsDBNull(objRH.DtResultados(0)("Celular")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Celular}", objRH.DtResultados(0)("Celular").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("Celular")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Celular}", objRH.DtResultados(0)("Celular").ToString())) - ' If Not IsDBNull(objRH.DtResultados(0)("Correo")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Correo}", objRH.DtResultados(0)("Correo").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("Correo")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Correo}", objRH.DtResultados(0)("Correo").ToString())) ' If Not IsDBNull(objRH.DtResultados(0)("CveSucursal")) Then ' ' ListaTagsDocumentost.Add(New TagsDocumentos("{CveSucursal}", DDLSucursal4.Text)) ' End If - ' If Not IsDBNull(objRH.DtResultados(0)("NumeroSS")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{NumeroSS}", objRH.DtResultados(0)("NumeroSS").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("NumeroSS")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{NumeroSS}", objRH.DtResultados(0)("NumeroSS").ToString())) - ' If Not IsDBNull(objRH.DtResultados(0)("Licencia")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Licencia}", objRH.DtResultados(0)("Licencia").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("Licencia")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Licencia}", objRH.DtResultados(0)("Licencia").ToString())) - ' If Not IsDBNull(objRH.DtResultados(0)("CartillaMilitar")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{CartillaMilitar}", objRH.DtResultados(0)("CartillaMilitar").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("CartillaMilitar")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{CartillaMilitar}", objRH.DtResultados(0)("CartillaMilitar").ToString())) - ' If Not IsDBNull(objRH.DtResultados(0)("CURP")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{CURP}", objRH.DtResultados(0)("CURP").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("CURP")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{CURP}", objRH.DtResultados(0)("CURP").ToString())) - ' If Not IsDBNull(objRH.DtResultados(0)("AutorizaAntidoping")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{AutorizaAntidoping}", objRH.DtResultados(0)("AutorizaAntidoping").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("AutorizaAntidoping")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{AutorizaAntidoping}", objRH.DtResultados(0)("AutorizaAntidoping").ToString())) - ' If Not IsDBNull(objRH.DtResultados(0)("Observaciones")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Observaciones}", objRH.DtResultados(0)("Observaciones").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("Observaciones")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Observaciones}", objRH.DtResultados(0)("Observaciones").ToString())) - ' If Not IsDBNull(objRH.DtResultados(0)("CredencialElector")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{CredencialElector}", objRH.DtResultados(0)("CredencialElector").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("CredencialElector")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{CredencialElector}", objRH.DtResultados(0)("CredencialElector").ToString())) - ' If Not IsDBNull(objRH.DtResultados(0)("Sucursal")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Sucursal}", objRH.DtResultados(0)("Sucursal").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("Sucursal")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Sucursal}", objRH.DtResultados(0)("Sucursal").ToString())) - ' If Not IsDBNull(objRH.DtResultados(0)("Puesto")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Puesto}", objRH.DtResultados(0)("Puesto").ToString)) + ' If Not IsDBNull(objRH.DtResultados(0)("Puesto")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Puesto}", objRH.DtResultados(0)("Puesto").ToString())) ' 'If Not IsDBNull(objRH.DtResultados(0)("InformacionFidedigno")) Then chkFidedigna4.Checked = objRH.DtResultados(0)("InformacionFidedigno") - ' ListaTagsDocumentost.Add(New TagsDocumentos("{InformacionFidedigno}", objRH.DtResultados(0)("InformacionFidedigno").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{InformacionFidedigno}", objRH.DtResultados(0)("InformacionFidedigno").ToString())) ' End If ' If Not IsDBNull(objRH.DtResultados(0)("FechaNacimiento")) Then - ' ListaTagsDocumentost.Add(New TagsDocumentos("{InformacionFidedigno}", objRH.DtResultados(0)("FechaNacimiento").ToString.ToDate.ToString("dd/MM/yyyy"))) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{InformacionFidedigno}", objRH.DtResultados(0)("FechaNacimiento").ToString().ToDate.ToString("dd/MM/yyyy"))) ' End If @@ -4165,11 +4172,11 @@ Partial Class RH_Personal Protected Sub LBCancelar_Click(sender As Object, e As EventArgs) - Dim FolioFiscal = CType(sender, LinkButton).CommandArgument.ToString + Dim FolioFiscal = CType(sender, LinkButton).CommandArgument.ToString() Dim gvr As GridViewRow = CType(CType(sender, LinkButton).BindingContainer, GridViewRow) - Dim CveNomina As Integer = gvr.DataKey("CveNomina").ToString.ToEntero - Dim Total As Decimal = gvr.DataKey("Total").ToString.ToDecimal - Dim RFCReceptor As String = gvr.DataKey("RFC").ToString + Dim CveNomina As Integer = gvr.DataKey("CveNomina").ToString().ToEntero + Dim Total As Decimal = gvr.DataKey("Total").ToString().ToDecimal + Dim RFCReceptor As String = gvr.DataKey("RFC").ToString() Dim Obj As New Timbrado @@ -4195,7 +4202,7 @@ Partial Class RH_Personal GvVacaciones.DataSource = objRH.DtResultados If objRH.DtResultados.Rows.Count > 0 Then - VacFolioActual = objRH.DtResultados.Compute("Max(Folio)", String.Empty).ToString.ToEntero + VacFolioActual = objRH.DtResultados.Compute("Max(Folio)", String.Empty).ToString().ToEntero Else VacFolioActual = 0 End If @@ -4215,7 +4222,7 @@ Partial Class RH_Personal If e.Row.RowType = DataControlRowType.DataRow Then - Dim _Estatus As Boolean = Boolean.Parse(e.Row.DBCampo("Estatus").ToString) + Dim _Estatus As Boolean = Boolean.Parse(e.Row.DBCampo("Estatus").ToString()) Dim _Documento As String = e.Row.DataKey("Documento") Dim _CveAutoriza As Integer = e.Row.DataKey("CveAutoriza").ToEntero() Dim RutaDocuemntoAutorizacion As String = String.Format("{0}Personal\{1}\Vacaciones\{2}", UsuarioActual.Empresa.Ruta, CvePersonal, _Documento) @@ -4259,7 +4266,7 @@ Partial Class RH_Personal End If Next For Each GvRow As GridViewRow In GvVacaciones.Rows - 'Dim _Estatus As Boolean = Boolean.Parse(GvRow.DataKey("Estatus").ToString) + 'Dim _Estatus As Boolean = Boolean.Parse(GvRow.DataKey("Estatus").ToString()) 'Dim _Documento As String = GvRow.DataKey("Documento") 'Dim _CveAutoriza As Integer = GvRow.DataKey("CveAutoriza").ToEntero 'Dim RutaDocuemntoAutorizacion As String = String.Format("{0}Personal\{1}\Vacaciones\{2}", UsuarioActual.Empresa.Ruta, CvePersonal, _Documento) @@ -4292,17 +4299,17 @@ Partial Class RH_Personal If objRH.VacacionesResumenGet(CvePersonal, UsuarioActual.Empresa.CveEmpresa) Then If objRH.DtResultados.Rows.Count > 0 Then - VacInicioPeriodo = objRH.DtResultados(0)("InicioPeriodo").ToString.ToDate - VacFinPeriodo = objRH.DtResultados(0)("FinPeriodo").ToString.ToDate - VacAnios = objRH.DtResultados(0)("Anios").ToString.ToEntero - VacDias = objRH.DtResultados(0)("Dias").ToString.ToEntero - VacDiasUsados = objRH.DtResultados(0)("DiasUsados").ToString.ToEntero - VacDiasCancelados = objRH.DtResultados(0)("DiasCancelados").ToString.ToEntero - VacDiasDisponibles = objRH.DtResultados(0)("DiasDisponibles").ToString.ToEntero + VacInicioPeriodo = objRH.DtResultados(0)("InicioPeriodo").ToString().ToDate + VacFinPeriodo = objRH.DtResultados(0)("FinPeriodo").ToString().ToDate + VacAnios = objRH.DtResultados(0)("Anios").ToString().ToEntero + VacDias = objRH.DtResultados(0)("Dias").ToString().ToEntero + VacDiasUsados = objRH.DtResultados(0)("DiasUsados").ToString().ToEntero + VacDiasCancelados = objRH.DtResultados(0)("DiasCancelados").ToString().ToEntero + VacDiasDisponibles = objRH.DtResultados(0)("DiasDisponibles").ToString().ToEntero GvVacacionesResumen.DataSource = objRH.DtResultados - VacSupervisorNombre = objRH.DtResultados(0)("SupervisorNombre").ToString - VacSupervisorCorreo = objRH.DtResultados(0)("SupervisorCorreo").ToString - VacCveSupervisor = objRH.DtResultados(0)("SupervisorCorreo").ToString.ToEntero + VacSupervisorNombre = objRH.DtResultados(0)("SupervisorNombre").ToString() + VacSupervisorCorreo = objRH.DtResultados(0)("SupervisorCorreo").ToString() + VacCveSupervisor = objRH.DtResultados(0)("SupervisorCorreo").ToString().ToEntero Else VacInicioPeriodo = Now @@ -4361,7 +4368,7 @@ Partial Class RH_Personal ' Dim fInicio As Date = TxtFechaInicioVac.Text.ToDate ' Dim fFin As Date = TxtFechaFinVac.Text.ToDate ' Dim ErrorSolicitud As Boolean = True - ' Dim DiasSolicitados As Integer = (fFin - fInicio).TotalDays.ToString.ToEntero + ' Dim DiasSolicitados As Integer = (fFin - fInicio).TotalDays.ToString().ToEntero ' If fInicio < fFin Or fInicio = fFin Then @@ -4456,7 +4463,7 @@ Partial Class RH_Personal ' Dim objDoc As New clsGemBoxDocument(pathDesti) - ' Dim FechaActual As String = Now.Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString & " del " & Now.Year.ToString() + ' Dim FechaActual As String = Now.Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString() & " del " & Now.Year.ToString() @@ -4572,10 +4579,10 @@ Partial Class RH_Personal CvePersonalVacaciones = GvRow.DataKey("CvePersonalVacaciones").ToEntero 'ChkEstatusDiaVacacion.Checked = Boolean.Parse(GvRow.DataKey("Estatus")) - VacFolio = GvRow.DataKey("Folio").ToString.ToEntero + VacFolio = GvRow.DataKey("Folio").ToString().ToEntero - TxtFechaDiaVacacion.Text = GvRow.DataKey("FechaInicio").ToString.ToDate.ToString("dd/MM/yyyy") - TxtFechaDiaVacacionFin.Text = GvRow.DataKey("FechaFin").ToString.ToDate.ToString("dd/MM/yyyy") + TxtFechaDiaVacacion.Text = GvRow.DataKey("FechaInicio").ToString().ToDate.ToString("dd/MM/yyyy") + TxtFechaDiaVacacionFin.Text = GvRow.DataKey("FechaFin").ToString().ToDate.ToString("dd/MM/yyyy") UpModalEditarDiaVacacion.Update() RegistraScript("$('#divEditarDiaVacacion').modal({ backdrop: 'static', keyboard: false});") @@ -4801,8 +4808,8 @@ Partial Class RH_Personal objRH.Dispose() objEdoc.Dispose() - _CveDocumentacion = DTVacaciones(0)("CveDocumentacion").ToString.ToEntero - _DocumentacionFormato = DTVacaciones(0)("DocumentacionFormato").ToString + _CveDocumentacion = DTVacaciones(0)("CveDocumentacion").ToString().ToEntero + _DocumentacionFormato = DTVacaciones(0)("DocumentacionFormato").ToString() _PathDocumento = UsuarioActual.Empresa.Ruta & "Formatos\" & _CveDocumentacion & "_" & _DocumentacionFormato If File.Exists(_PathDocumento) Then @@ -4814,11 +4821,11 @@ Partial Class RH_Personal ListaTags.AddRange(GetDatosTagsVacaciones(_Folio).ToArray) For Each dRow As DataRow In DtVacacionesFolio.Rows - FechasVacaciones = FechasVacaciones & dRow("Fecha").ToString.ToDate.ToString("dd/MM/yyyy") & vbLf + FechasVacaciones = FechasVacaciones & dRow("Fecha").ToString().ToDate.ToString("dd/MM/yyyy") & vbLf Next ListaTags.Add(New TagsDocumentos("{FechasVacaciones}", FechasVacaciones)) - ListaTags.Add(New TagsDocumentos("{Folio}", _Folio.ToString)) + ListaTags.Add(New TagsDocumentos("{Folio}", _Folio.ToString())) objGemDocument.SustituirTags(ListaTags) @@ -4850,9 +4857,9 @@ Partial Class RH_Personal If objRH.DtResultados.Rows.Count > 0 Then - ListaTags.Add(New TagsDocumentos("{Anios}", VacAnios.ToString)) - ListaTags.Add(New TagsDocumentos("{DiasUsados}", VacDiasUsados.ToString)) - ListaTags.Add(New TagsDocumentos("{DiasDisponibles}", VacDiasDisponibles.ToString)) + ListaTags.Add(New TagsDocumentos("{Anios}", VacAnios.ToString())) + ListaTags.Add(New TagsDocumentos("{DiasUsados}", VacDiasUsados.ToString())) + ListaTags.Add(New TagsDocumentos("{DiasDisponibles}", VacDiasDisponibles.ToString())) If Not IsDBNull(objRH.DtResultados(0)("InicioVac")) Then ListaTags.Add(New TagsDocumentos("{InicioVac}", objRH.DtResultados(0)("InicioVac").ToString().ToDate.ToString("dd/MM/yyyy"))) @@ -5073,14 +5080,14 @@ Partial Class RH_Personal Dim rowInfo As DataRow = UniformesInfo.Rows(index) - CveAlmacenUniforme = rowInfo.Item("CveAlmacen").ToString.ToEntero - DescripcionUniforme = rowInfo.Item("CodigoPS").ToString - PU = rowInfo.Item("PU").ToString.ToDecimal + CveAlmacenUniforme = rowInfo.Item("CveAlmacen").ToString().ToEntero + DescripcionUniforme = rowInfo.Item("CodigoPS").ToString() + PU = rowInfo.Item("PU").ToString().ToDecimal - CveUM = rowInfo.Item("CveUM").ToString.ToEntero - CvePS = rowInfo.Item("CvePS").ToString.ToEntero - CveMovimientoUniforme = rowInfo.Item("CveMovimiento").ToString.ToEntero - CveMovimientoDetalleUniforme = rowInfo.Item("CveMovimientoDetalle").ToString.ToEntero + CveUM = rowInfo.Item("CveUM").ToString().ToEntero + CvePS = rowInfo.Item("CvePS").ToString().ToEntero + CveMovimientoUniforme = rowInfo.Item("CveMovimiento").ToString().ToEntero + CveMovimientoDetalleUniforme = rowInfo.Item("CveMovimientoDetalle").ToString().ToEntero RegistraScript(String.Format("$('#{0}').modal();", "ModalUniforme")) End Sub @@ -5141,9 +5148,9 @@ 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("Empresas\{0}\RH\Personal\", UsuarioActual.CveEmpresa)) End If - ViewState("Archivo") = String.Format("{0}.{1}", CvePersonal.ToString, FileExtension) + ViewState("Archivo") = String.Format("{0}.{1}", CvePersonal.ToString(), FileExtension) Next If File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & "." & FileExtension) Then Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.{2}", UsuarioActual.CveEmpresa, CvePersonal, FileExtension) @@ -5161,7 +5168,7 @@ Partial Class RH_Personal Public Sub CargaPermisos() Dim ObjRH As New ClsRH - Dim CvePersonal As Integer = If(IsNumeric(Request("CvePersonal")), Request("CvePersonal").ToString.ToEntero, -1) + Dim CvePersonal As Integer = If(IsNumeric(Request("CvePersonal")), Request("CvePersonal").ToString().ToEntero, -1) If ObjRH.ChecadorPermisosGet(-1, "-1", CvePersonal, Now.AddMonths(-3), Now.AddMonths(2), -1, -1, UsuarioActual.CveEmpresa) Then GvPermisos.DataSource = ObjRH.DtResultados Else @@ -5233,14 +5240,14 @@ Partial Class RH_Personal Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - CvePermiso = GvRow.DataKey("CvePermiso").ToString.ToEntero - TxtPermisoDescripcion.Text = GvRow.DataKey("Descripcion").ToString - TxtFechaInicioPer.Text = GvRow.DataKey("FechaInicio").ToString - TxtFechaFinPer.Text = GvRow.DataKey("FechaFin").ToString + CvePermiso = GvRow.DataKey("CvePermiso").ToString().ToEntero + TxtPermisoDescripcion.Text = GvRow.DataKey("Descripcion").ToString() + TxtFechaInicioPer.Text = GvRow.DataKey("FechaInicio").ToString() + TxtFechaFinPer.Text = GvRow.DataKey("FechaFin").ToString() - If GvRow.DataKey("HoraEntrada").ToString.Length > 0 Then + If GvRow.DataKey("HoraEntrada").ToString().Length > 0 Then Try - TxtHoraEntrada.Text = TimeSpan.Parse(GvRow.DataKey("HoraEntrada").ToString).ToString("hh:mm:ss") + TxtHoraEntrada.Text = TimeSpan.Parse(GvRow.DataKey("HoraEntrada").ToString()).ToString("hh:mm:ss") Catch ex As Exception TxtHoraEntrada.Text = "" End Try @@ -5249,9 +5256,9 @@ Partial Class RH_Personal End If - If GvRow.DataKey("HoraSalida").ToString.Length > 0 Then + If GvRow.DataKey("HoraSalida").ToString().Length > 0 Then Try - TxtHoraSalida.Text = TimeSpan.Parse(GvRow.DataKey("HoraSalida").ToString).ToString("hh:mm:ss") + TxtHoraSalida.Text = TimeSpan.Parse(GvRow.DataKey("HoraSalida").ToString()).ToString("hh:mm:ss") Catch ex As Exception TxtHoraSalida.Text = "" End Try @@ -5261,8 +5268,8 @@ Partial Class RH_Personal BtnPermiso.Text = "Actualizar" - ChkGoceSueldo.Checked = Boolean.Parse(GvRow.DataKey("GoceSueldo").ToString) - ChkEstatusPermiso.Checked = Boolean.Parse(GvRow.DataKey("Estatus").ToString) + ChkGoceSueldo.Checked = Boolean.Parse(GvRow.DataKey("GoceSueldo").ToString()) + ChkEstatusPermiso.Checked = Boolean.Parse(GvRow.DataKey("Estatus").ToString()) UpModalPermisos.Update() RegistraScript("$('#DvPermisos').modal({ backdrop: 'static', keyboard: false});") @@ -5296,14 +5303,14 @@ Partial Class RH_Personal 'Protected Sub BtnCargarArchivo_Click(sender As Object, e As System.EventArgs) Handles BtnCargarArchivo.Click ' Preguntar si existe en temporales - ' If Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString) Then - ' Dim Extension As String = Path.GetExtension(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString) + ' If Session("FileUpload").ToString() <> String.Empty AndAlso File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString()) Then + ' Dim Extension As String = Path.GetExtension(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString()) ' If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") Then Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") ' If File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then ' File.Delete(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) - ' File.Move(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString, ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) + ' File.Move(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString(), ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) ' Else - ' File.Move(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString, ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) + ' File.Move(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString(), ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) ' End If ' Else @@ -5320,8 +5327,8 @@ Partial Class RH_Personal - ' If Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\" & Session("FileUpload").ToString) Then - ' Dim Extension As String = Path.GetExtension(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal" & Session("FileUpload").ToString) + ' If Session("FileUpload").ToString() <> String.Empty AndAlso File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\" & Session("FileUpload").ToString()) Then + ' Dim Extension As String = Path.GetExtension(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal" & Session("FileUpload").ToString()) ' If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") Then Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") ' Session("FileUpload") = "" @@ -5366,7 +5373,7 @@ Partial Class RH_Personal Dim Liga As String = $"/Compras/Compras.aspx?CveCompra={e.Row.DBCampo("CveCompra")}" If e.Row.DBCampo("Orden") = "1" Then - e.Row.Cells(0).Text = String.Format("{2}", "Texto", Liga, e.Row.DBCampo("SerieFolio").ToString) + e.Row.Cells(0).Text = String.Format("{2}", "Texto", Liga, e.Row.DBCampo("SerieFolio").ToString()) Else e.Row.BackColor = Drawing.Color.LightGray End If @@ -5424,12 +5431,12 @@ Partial Class RH_Personal If gvr.DataKey("SeTimbro") = "True" Then Dim NombreComercial = UsuarioActual.Empresa.Empresa - Dim SerieFolio = gvr.DataKey("SerieFolio").ToString - Dim Destinatario = gvr.DataKey("Correo").ToString - Dim Personal = gvr.DataKey("Nombre").ToString - Dim fechai = gvr.DataKey("FechaInicio").ToString.ToDate.ToShortDateString - Dim fechaf = gvr.DataKey("FechaFin").ToString.ToDate.ToShortDateString - Dim cvePeriodo = gvr.DataKey("CvePeriodo").ToString.ToEntero + Dim SerieFolio = gvr.DataKey("SerieFolio").ToString() + Dim Destinatario = gvr.DataKey("Correo").ToString() + Dim Personal = gvr.DataKey("Nombre").ToString() + Dim fechai = gvr.DataKey("FechaInicio").ToString().ToDate.ToShortDateString + Dim fechaf = gvr.DataKey("FechaFin").ToString().ToDate.ToShortDateString + Dim cvePeriodo = gvr.DataKey("CvePeriodo").ToString().ToEntero If UsuarioActual.CveRol = 1 Then Alert("Parametros:" + NombreComercial + " " + SerieFolio + " " + Destinatario + " " + Personal + " " + fechai + " " + fechaf) @@ -5483,13 +5490,13 @@ Partial Class RH_Personal If ListaAdjuntos.Count > 0 Then - If Correo.SendMail(UsuarioActual.Empresa, Destinatario, Asunto, Cuerpo.ToString, Archivos:=ListaAdjuntos) Then + If Correo.SendMail(UsuarioActual.Empresa, Destinatario, Asunto, Cuerpo.ToString(), Archivos:=ListaAdjuntos) Then Alert("Correo enviado existosamente a " & Destinatario) Else Alert("Se presento un error al enviar el correo a " & Destinatario) End If Else - If Correo.SendMail(UsuarioActual.Empresa, Destinatario, Asunto, Cuerpo.ToString) Then + If Correo.SendMail(UsuarioActual.Empresa, Destinatario, Asunto, Cuerpo.ToString()) Then Alert("Correo enviado existosamente a " & Destinatario) Else Alert("Se presento un error al adjuntar comprobantes") @@ -5633,7 +5640,7 @@ Partial Class RH_Personal TxtFechaExpLicencia.Text = GvRow.DataKey("FechaExpedicion") TxtFechaVencLicencia.Text = GvRow.DataKey("FechaVencimiento") - ChkModalLicenciaEstatus.Checked = Boolean.Parse(GvRow.DataKey("Estatus").ToString) + ChkModalLicenciaEstatus.Checked = Boolean.Parse(GvRow.DataKey("Estatus").ToString()) UpAddLicencias.Update() UpLicencias.Update() @@ -5769,29 +5776,29 @@ Partial Class RH_Personal If UsuarioActual.CveEmpresa.Contiene(72) Then Dim SBDomicilioSucursal As New StringBuilder() - Dim DRSucursal = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, CveSubProyecto:=dr("CveSubProyecto").ToString.ToEntero, Estatus:=1).FiltroPrimero("") + Dim DRSucursal = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, CveSubProyecto:=dr("CveSubProyecto").ToString().ToEntero, Estatus:=1).FiltroPrimero("") If DRSucursal IsNot Nothing Then Dim CiudadSucursal As String = String.Format("{0},{1}", DRSucursal("Municipio"), DRSucursal("Estado")) Dim DomicilioSucursal As String = "" SBDomicilioSucursal.AppendFormat("{0}", DRSucursal("Calle")) - If DRSucursal("NoExt").ToString.ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", DRSucursal("NoExt").ToString.ToEntero) - If DRSucursal("NoInt").ToString.ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", DRSucursal("NoInt").ToString.ToEntero) - If DRSucursal("Colonia").ToString.Length > 0 Then SBDomicilioSucursal.AppendFormat(", Col: {0}", DRSucursal("Colonia").ToString) - If DRSucursal("CP").ToString.ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", DRSucursal("CP").ToString) + If DRSucursal("NoExt").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", DRSucursal("NoExt").ToString().ToEntero) + If DRSucursal("NoInt").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", DRSucursal("NoInt").ToString().ToEntero) + If DRSucursal("Colonia").ToString().Length > 0 Then SBDomicilioSucursal.AppendFormat(", Col: {0}", DRSucursal("Colonia").ToString()) + If DRSucursal("CP").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", DRSucursal("CP").ToString()) If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal) - If DRSucursal("Pais").ToString.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", DRSucursal("Pais").ToString) + If DRSucursal("Pais").ToString().Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", DRSucursal("Pais").ToString()) End If - params.Add(New ReportParameter("NombreResponsable", dr("NombreCompleto").ToString)) - params.Add(New ReportParameter("RFC", dr("RFC").ToString)) - params.Add(New ReportParameter("Puesto", dr("Puesto").ToString)) - params.Add(New ReportParameter("Departamento", dr("Departamento").ToString)) - params.Add(New ReportParameter("Sucursal", dr("SubProyecto").ToString)) - params.Add(New ReportParameter("Telefono", dr("Celular").ToString)) - params.Add(New ReportParameter("DireccionSucursal", SBDomicilioSucursal.ToString)) - params.Add(New ReportParameter("PuestoUsuarioActual", dr("PuestoUsuarioImprimio").ToString)) + params.Add(New ReportParameter("NombreResponsable", dr("NombreCompleto").ToString())) + params.Add(New ReportParameter("RFC", dr("RFC").ToString())) + params.Add(New ReportParameter("Puesto", dr("Puesto").ToString())) + params.Add(New ReportParameter("Departamento", dr("Departamento").ToString())) + params.Add(New ReportParameter("Sucursal", dr("SubProyecto").ToString())) + params.Add(New ReportParameter("Telefono", dr("Celular").ToString())) + params.Add(New ReportParameter("DireccionSucursal", SBDomicilioSucursal.ToString())) + params.Add(New ReportParameter("PuestoUsuarioActual", dr("PuestoUsuarioImprimio").ToString())) End If params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) @@ -5914,7 +5921,7 @@ Partial Class RH_Personal DTFamiliares(IndexActual)("Observaciones") = TxtObservacionesFamiliar.Text.Trim DTFamiliares(IndexActual)("Beneficiario") = ChkBeneficiario.Checked - If DTFamiliares(IndexActual)("CveFamiliar").ToString = "-1" Then + If DTFamiliares(IndexActual)("CveFamiliar").ToString() = "-1" Then DTFamiliares(IndexActual)("Accion") = "2" Else DTFamiliares(IndexActual)("Accion") = "1" @@ -5965,7 +5972,7 @@ Partial Class RH_Personal Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim activo As Boolean = True - CveFamiliar = GvRow.DataKey("CveFamiliar").ToString.ToEntero + CveFamiliar = GvRow.DataKey("CveFamiliar").ToString().ToEntero ActualizarFamiliar = True IndexActual = GvRow.RowIndex @@ -5979,7 +5986,7 @@ Partial Class RH_Personal TxtOcupacionFamiliar4.Text = GvRow.DataKey("Ocupacion") TxtTelefonoFamiliar.Text = GvRow.DataKey("Telefono") TxtObservacionesFamiliar.Text = GvRow.DataKey("Observaciones") - ChkBeneficiario.Checked = Boolean.Parse(GvRow.DataKey("Beneficiario").ToString) + ChkBeneficiario.Checked = Boolean.Parse(GvRow.DataKey("Beneficiario").ToString()) UpModalFamiliar.Update() RegistraScript("$('#divAgregarFamiliar').modal({ backdrop: 'static', keyboard: false});") @@ -5994,7 +6001,7 @@ Partial Class RH_Personal Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) IndexActual = GvRow.RowIndex Dim activo As Boolean = False - Dim CveFamiliar As Integer = GvRow.DataKey("CveFamiliar").ToString.ToEntero + Dim CveFamiliar As Integer = GvRow.DataKey("CveFamiliar").ToString().ToEntero If CveFamiliar > 0 Then @@ -6029,41 +6036,41 @@ Partial Class RH_Personal - If dRow("Accion").ToString = "1" Then 'Actualiza + If dRow("Accion").ToString() = "1" Then 'Actualiza Dim Beneficiario As Integer = -1 - If Boolean.Parse(dRow("Beneficiario").ToString) Then + If Boolean.Parse(dRow("Beneficiario").ToString()) Then Beneficiario = 1 Else Beneficiario = 0 End If - objRH.PersonalFamiliaresUpdate(dRow("CveFamiliar").ToString.ToEntero, CvePersonal, dRow("CveParentesco").ToString.ToEntero, dRow("Nombre").ToString, dRow("Domicilio").ToString, dRow("Edad").ToString.ToEntero, dRow("Ocupacion").ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, dRow("Telefono").ToString, If(dRow("Observaciones").ToString.Trim = "", "-1", dRow("Observaciones").ToString.Trim), Beneficiario) + objRH.PersonalFamiliaresUpdate(dRow("CveFamiliar").ToString().ToEntero, CvePersonal, dRow("CveParentesco").ToString().ToEntero, dRow("Nombre").ToString(), dRow("Domicilio").ToString(), dRow("Edad").ToString().ToEntero, dRow("Ocupacion").ToString(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, dRow("Telefono").ToString(), If(dRow("Observaciones").ToString().Trim = "", "-1", dRow("Observaciones").ToString().Trim), Beneficiario) End If - If dRow("Accion").ToString = "2" Then 'Inserta + If dRow("Accion").ToString() = "2" Then 'Inserta - Dim Beneficiario As Boolean = Boolean.Parse(dRow("Beneficiario").ToString) + Dim Beneficiario As Boolean = Boolean.Parse(dRow("Beneficiario").ToString()) - objRH.PersonalFamiliaresAdd(CvePersonal, dRow("CveParentesco").ToString.ToEntero, dRow("Nombre").ToString, dRow("Domicilio").ToString, dRow("Edad").ToString.ToEntero, dRow("Ocupacion").ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, dRow("Telefono").ToString, If(dRow("Observaciones").ToString.Trim = "", "-1", dRow("Observaciones").ToString.Trim), Beneficiario) + objRH.PersonalFamiliaresAdd(CvePersonal, dRow("CveParentesco").ToString().ToEntero, dRow("Nombre").ToString(), dRow("Domicilio").ToString(), dRow("Edad").ToString().ToEntero, dRow("Ocupacion").ToString(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, dRow("Telefono").ToString(), If(dRow("Observaciones").ToString().Trim = "", "-1", dRow("Observaciones").ToString().Trim), Beneficiario) End If - If dRow("CveParentesco").ToString.ToEntero = 1 Then + If dRow("CveParentesco").ToString().ToEntero = 1 Then ValPadre = True End If - If dRow("CveParentesco").ToString.ToEntero = 2 Then + If dRow("CveParentesco").ToString().ToEntero = 2 Then ValMadre = True End If - If dRow("Accion").ToString = "3" Then 'Borra - objRH.PersonalFamiliaresRemove(dRow("CveFamiliar").ToString.ToEntero, -1) + If dRow("Accion").ToString() = "3" Then 'Borra + objRH.PersonalFamiliaresRemove(dRow("CveFamiliar").ToString().ToEntero, -1) End If Next @@ -6108,4 +6115,43 @@ Partial Class RH_Personal Alert("Se actualizo el calculo de fonacot") End If End Sub + Protected Sub LnkCalcularFactor_Click(sender As Object, e As EventArgs) + If TxtFIAguinaldo.Text = "0" Or TxtFIAguinaldo.Text = "" Then + TxtFIAguinaldo.Text = "15" + End If + If TxtFIPrimaVacacional.Text = "0" Or TxtFIPrimaVacacional.Text = "" Then + TxtFIPrimaVacacional.Text = "25" + End If + RegistraScript("$('#DmodalFactordeIntegraccion').modal()") + UpFactordeintegracion.Update() + End Sub + Protected Sub LnkCalcularFactordeintegracion_Click(sender As Object, e As EventArgs) + Dim SD As Decimal = TxtFISalariodiarioImss.Text.ToDecimal() + Dim primav As Decimal = TxtFIPrimaVacacional.Text.ToDecimal() + Dim DiasVacaciones As Decimal = TxtFIDiasVacaciones.Text.ToDecimal() + Dim diasaguinaldo As Decimal = TxtFIAguinaldo.Text.ToDecimal() + Dim FI As Decimal = (365 + diasaguinaldo + DiasVacaciones + (DiasVacaciones * (primav / 100))) / 365 + Dim SDI As Decimal = (SD * FI) + TxtFactordeIntegracion.Text = FI.ToString() + TxtFISalarioDiarioIntegrado.Text = String.Format("{0:###0.########}", SDI) + UpFactordeintegracion.Update() + Alert(String.Format(" salario diario integreado {0:###0.########}", SDI)) + End Sub + Protected Sub LnkCalcularFactordeintegracionyguardar_Click(sender As Object, e As EventArgs) + LnkCalcularFactordeintegracion_Click(Nothing, Nothing) + + Using ObjPersonal As ClsRH = New ClsRH() + If ObjPersonal.UpdateSalarioImss(CvePersonal, UsuarioActual.CveEmpresa, TxtFISalarioDiarioIntegrado.Text.ToDouble(), TxtFISalariodiarioImss.Text.ToDouble) Then + Alert("Se ha actualizado el salario diario integreado") + End If + End Using + End Sub + Protected Sub ChkEstemporal_CheckedChanged(sender As Object, e As EventArgs) + + Using ObjPersonal As ClsRH = New ClsRH() + If ObjPersonal.Updateestemporal(CvePersonal, UsuarioActual.CveEmpresa, ChkEstemporal.Checked) Then + Alert("Se ha actualizado el usuario", TipoMensaje.ToastInformacion) + End If + End Using + End Sub End Class diff --git a/TareasProgramadas/Tareas119.ashx b/TareasProgramadas/Tareas119.ashx index a1b854f02..83be5b74f 100644 --- a/TareasProgramadas/Tareas119.ashx +++ b/TareasProgramadas/Tareas119.ashx @@ -23,8 +23,7 @@ public class TareasJam : IHttpHandler switch (Metodo) { case "TestConexion": - //PruebaConexionFTP("ftp://127.0.0.1/", "Toor", "agj-3500"); - retorno = PruebaConexionFTP("ftp://us2.hostedftp.com/", "agrojam", "A12345678"); + retorno = PruebaConexionFTP("ftp://us2.hostedftp.com/", "agrojam", "A12345678"); break; case "EjecutaThalamus": retorno =EjecutaThalamus(CveEmpresa); @@ -41,8 +40,8 @@ public class TareasJam : IHttpHandler context.Response.Write("False"); } - context.Response.End(); - //ModExtensiones.GuardaLogAD(string.Format("{3} CveEmpresa={0} cveTareaProgramada={1} CveTareaProgramadaHistorial={2}", CveEmpresa, cveTareaProgramada, CveTareaProgramadaHistorial, Metodo), "Tareas Programadas"); + context.Response.End(); + } private bool EjecutaThalamus(int CveEmpresa) { @@ -52,6 +51,8 @@ public class TareasJam : IHttpHandler DataTable DTProductos = new DataTable(); DataTable DTVentas = new DataTable(); DataTable DTClientes = new DataTable(); + DataTable DTAlmacenes = new DataTable(); + bool ErrorProceso = false; if (ObjGenerales.GetJAMCorveta(1)) @@ -72,6 +73,12 @@ public class TareasJam : IHttpHandler } else { ErrorProceso = true; } + if (ObjGenerales.GetJAMCorveta(4)) + { + DTAlmacenes = ObjGenerales.DtResultados.Copy(); + } + else { ErrorProceso = true; } + ObjGenerales.Dispose(); if (!ErrorProceso) @@ -79,6 +86,8 @@ public class TareasJam : IHttpHandler string RutaProductos = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Productos{DateTime.Now.ToString("yyyyMMdd")}.xlsx"; string RutaVentas = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Ventas{DateTime.Now.ToString("yyyyMMdd")}.xlsx"; string RutaClientes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Clientes{DateTime.Now.ToString("yyyyMMdd")}.xlsx"; + string RutaAlmacenes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Almacenes{DateTime.Now.ToString("yyyyMMdd")}.xlsx"; + string FTPServer = "ftp://127.0.0.1/"; string TFPUsr = "Toor"; @@ -87,7 +96,7 @@ public class TareasJam : IHttpHandler SpreadsheetInfo.SetLicense(Extensiones.ModExtensiones.SerialGemBoxSpreadsheet()); var workbookProductos = new ExcelFile(); - var worksheetProductos = workbookProductos.Worksheets.Add("Ventas"); + var worksheetProductos = workbookProductos.Worksheets.Add("Productos"); worksheetProductos.InsertDataTable(DTProductos, new InsertDataTableOptions() { ColumnHeaders = true, @@ -106,7 +115,7 @@ public class TareasJam : IHttpHandler var workbookClientes = new ExcelFile(); - var worksheetClientes = workbookClientes.Worksheets.Add("Ventas"); + var worksheetClientes = workbookClientes.Worksheets.Add("Clientes"); worksheetClientes.InsertDataTable(DTClientes, new InsertDataTableOptions() { ColumnHeaders = true, @@ -115,14 +124,26 @@ public class TareasJam : IHttpHandler workbookClientes.Save(RutaClientes); + var workbookAlmacenes = new ExcelFile(); + var worksheetAlmacenes = workbookClientes.Worksheets.Add("Almacenes"); + worksheetAlmacenes.InsertDataTable(DTAlmacenes, new InsertDataTableOptions() + { + ColumnHeaders = true, + StartRow = 0 + }); + workbookClientes.Save(RutaAlmacenes); + + var FInfoProductos = new FileInfo(RutaProductos); var FInfoVentas = new FileInfo(RutaVentas); var FInfoClientes = new FileInfo(RutaClientes); + var FInfoAlmacenes = new FileInfo(RutaAlmacenes); bool CargaProductos = false; bool CargaVentas = false; bool CargaClientes = false; + bool CargaAlmacenes = false; CargaProductos = CargarArchivos(FInfoProductos, FTPServer, TFPUsr, FTPPass); if (CargaProductos) @@ -149,7 +170,17 @@ public class TareasJam : IHttpHandler } - if (CargaProductos & CargaVentas & CargaClientes) + if (CargaProductos & CargaVentas& CargaClientes ) + { + CargaAlmacenes = CargarArchivos(FInfoAlmacenes, FTPServer, TFPUsr, FTPPass); + if (CargaClientes) + { + CargaAlmacenes = VerificarArchivo(FInfoAlmacenes, FInfoAlmacenes.Length, FTPServer, TFPUsr, FTPPass); + } + } + + + if (CargaProductos & CargaVentas & CargaClientes & CargaAlmacenes) { return true; } @@ -272,7 +303,7 @@ public class TareasJam : IHttpHandler private bool PruebaConexionFTP( string FTPServer, string FTPUsr, string FTPPass) { - bool Respuesta = false; + bool Respuesta = false; FtpWebRequest request =(FtpWebRequest)WebRequest.Create($"{FTPServer}/Test.log"); request.Method = WebRequestMethods.Ftp.ListDirectory; diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 09ea53ad9..6b4136efb 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -429,6 +429,20 @@
    + + + +
    + + + + + + +
    + + +
    diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 882f36ef2..e0ded8064 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -658,6 +658,7 @@ Partial Class Clientes End Property #End Region + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then @@ -975,7 +976,14 @@ Partial Class Clientes End If End If + + + If ObjCliente.GetEstados("-1") Then + DdlEstadoSAT.DataSource = ObjCliente.DtResultados.Copy + End If + ObjCliente.Dispose() + DdlSucursalCliente.DataBind() DdlSucursalCliente.Items.Insert(0, New ListItem("Matriz", "0")) DdlSucursalCliente.Items.Insert(0, New ListItem("Todas", "-1")) @@ -988,6 +996,11 @@ Partial Class Clientes DdlClienteSucursalEnvio.DataBind() DdlClienteSucursalEnvio.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlClienteSucursalEnvio.SelectedValue = "-1" + + DdlEstadoSAT.DataBind() + DdlEstadoSAT.Items.Insert(0, New ListItem("Seleccione", "-1")) + DdlEstadoSAT.SelectedValue = "-1" + End Sub Private Sub CargaGridRetenciones() Dim ObjClientes As New ClsClientes @@ -1511,6 +1524,9 @@ Partial Class Clientes DdlPais.SelectedValueExist(ObjClientes.CvePais) CargaEstado() + + DdlEstadoSAT.SelectedValueExist(ObjClientes.CveSATEstado) + If DdlPais.SelectedValue.Contiene("151", "66", "40") Then DdlEstado.Visible = True DdlEstado.SelectedValueExist(ObjClientes.CveEstado) @@ -2443,7 +2459,7 @@ Partial Class Clientes CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero, DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero, CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero, CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero, CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero, NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(), ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, - TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text) Then + TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero) Then ViewState("CveCliente") = ObjClientes.CveCliente @@ -2538,7 +2554,7 @@ Partial Class Clientes CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero, NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(), ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(), - RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text) Then + RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero) Then ObjClientes.LimpiaImpuestosLocales(CveCliente) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 49abae98b..583103124 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -14490,7 +14490,7 @@ Partial Class Ventas DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString()) End If - TxtCorreoNotificaciones.Text = GlobalDTUsuarios(UsuarioActual.CveUsuario).FiltroPrimeroValor("Correo") + 'TxtCorreoNotificaciones.Text = GlobalDTUsuarios(UsuarioActual.CveUsuario).FiltroPrimeroValor("Correo") End Sub #End Region diff --git a/vwd.webinfo b/vwd.webinfo index 7b35128de..a2d171c0b 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -66,6 +66,10 @@ + + + +