diff --git a/Bancos/CuentasBancariasDetalle.aspx b/Bancos/CuentasBancariasDetalle.aspx
index a046b1e1a..68474870f 100644
--- a/Bancos/CuentasBancariasDetalle.aspx
+++ b/Bancos/CuentasBancariasDetalle.aspx
@@ -197,7 +197,9 @@
-
+
+
+<%--
Número de Tarjeta:
@@ -222,9 +224,7 @@
-
- <%--
-
--%>
+
@@ -242,13 +242,21 @@
Agregar
-
+ --%>
-
+
+
+
+
+
+
+
+
+ <%--
@@ -317,7 +325,9 @@
-
+ --%>
+
+
diff --git a/Bancos/CuentasBancariasDetalle.aspx.vb b/Bancos/CuentasBancariasDetalle.aspx.vb
index 490c0b79c..3d5b641a6 100644
--- a/Bancos/CuentasBancariasDetalle.aspx.vb
+++ b/Bancos/CuentasBancariasDetalle.aspx.vb
@@ -682,112 +682,124 @@ Partial Class Bancos_CuentasBancariasDetalle
Else
DivTarjeta.Visible = False
End If
- End Sub
-
-
+ End Sub
+
+
#End Region
-
+
#Region "D A T O S T A R J E TA - C R E D I T O"
- Private Sub LkbAgregarTarjera_Click(sender As Object, e As EventArgs) Handles LkbAgregarTarjera.Click
- Dim ObjTarjeta As New ClsBancos()
- Dim TieneError = False
-
- If Not ObjTarjeta.AddTarjetaCredito(CveCuenta, TxtNumTarjeta.Text, TxtNombreResponsable.Text, TxtFechaVencimiento.Text.ToDate, UsuarioActual.CveUsuario) Then
- TieneError = True
- End If
-
- If Not TieneError Then
- Alert("Se guardo la tarjeta de credito correctamente", TipoMensaje.MsgInformacion)
- TxtNumTarjeta.Text = ""
- TxtNombreResponsable.Text = ""
- TxtFechaVencimiento.Text = ""
- CargaDatosTarjeta()
- Else
- Alert("Ocurrio un Error al Guardar la tarjeta de credito", TipoMensaje.MsgError)
- End If
-
- ObjTarjeta.Dispose()
- UpDatos.Update()
- End Sub
-
+ 'Private Sub LkbAgregarTarjera_Click(sender As Object, e As EventArgs) Handles LkbAgregarTarjera.Click
+ ' Dim ObjTarjeta As New ClsBancos()
+ ' Dim TieneError = False
+
+ ' If Not ObjTarjeta.AddTarjetaCredito(CveCuenta, TxtNumTarjeta.Text, TxtNombreResponsable.Text, TxtFechaVencimiento.Text.ToDate, UsuarioActual.CveUsuario) Then
+ ' TieneError = True
+ ' End If
+
+ ' If Not TieneError Then
+ ' Alert("Se guardo la tarjeta de credito correctamente", TipoMensaje.MsgInformacion)
+ ' TxtNumTarjeta.Text = ""
+ ' TxtNombreResponsable.Text = ""
+ ' TxtFechaVencimiento.Text = ""
+ ' CargaDatosTarjeta()
+ ' Else
+ ' Alert("Ocurrio un Error al Guardar la tarjeta de credito", TipoMensaje.MsgError)
+ ' End If
+
+ ' ObjTarjeta.Dispose()
+ ' UpDatos.Update()
+ 'End Sub
+
Private Sub CargaDatosTarjeta()
- Dim ObjTarjeta As New ClsBancos()
+ 'Dim ObjTarjeta As New ClsBancos()
+
+ 'If ObjTarjeta.GetTarjetaCredito(-1, CveCuenta, -1) Then
+ ' GvTarjetas.DataSource = ObjTarjeta.DtResultados()
+ 'Else
+ ' GvTarjetas.DataSource = Nothing
+ 'End If
+ 'GvTarjetas.DataBind()
+ 'ObjTarjeta.Dispose()
+
+ Dim ObjCreditos As New ClsBancos
+ If ObjCreditos.GetTarjetasCreditos(CveCuenta) Then
+ If ObjCreditos.DtResultados.Rows.Count > 0 Then
+ GvTC.DataSource = ObjCreditos.DtResultados
+ End If
+ GvTC.Visible = True
+ End If
+ ObjCreditos.Dispose()
+
+ GvTC.DataBind()
- If ObjTarjeta.GetTarjetaCredito(-1, CveCuenta, -1) Then
- GvTarjetas.DataSource = ObjTarjeta.DtResultados()
- Else
- GvTarjetas.DataSource = Nothing
- End If
- GvTarjetas.DataBind()
- ObjTarjeta.Dispose()
UpDatos.Update()
End Sub
- Private Sub GvTarjetas_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles GvTarjetas.RowEditing
- GvTarjetas.EditIndex = e.NewEditIndex
- CargaDatosTarjeta()
- End Sub
+ 'Private Sub GvTarjetas_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles GvTarjetas.RowEditing
+ ' GvTarjetas.EditIndex = e.NewEditIndex
+ ' CargaDatosTarjeta()
+ 'End Sub
- Private Sub GvTarjetas_RowCancelingEdit(sender As Object, e As GridViewCancelEditEventArgs) Handles GvTarjetas.RowCancelingEdit
- GvTarjetas.EditIndex = -1
- CargaDatosTarjeta()
- End Sub
+ 'Private Sub GvTarjetas_RowCancelingEdit(sender As Object, e As GridViewCancelEditEventArgs) Handles GvTarjetas.RowCancelingEdit
+ ' GvTarjetas.EditIndex = -1
+ ' CargaDatosTarjeta()
+ 'End Sub
- Private Sub GvTarjetas_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvTarjetas.RowUpdating
- Dim ObjTarjeta As New ClsBancos()
- Dim TieneError = False
+ 'Private Sub GvTarjetas_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvTarjetas.RowUpdating
+ ' Dim ObjTarjeta As New ClsBancos()
+ ' Dim TieneError = False
- Dim CveCuentaTarjeta = GvTarjetas.Rows(e.RowIndex).DataKey("CveCuentaTarjeta").ToEntero
- Dim CveCuenta As Integer = GvTarjetas.Rows(e.RowIndex).DataKey("CveCuenta").ToEntero
- Dim Numero = DirectCast(GvTarjetas.Rows(e.RowIndex).FindControl("TxtNumeroEdit"), TextBox).Text.Trim
- Dim Responsable = DirectCast(GvTarjetas.Rows(e.RowIndex).FindControl("TxtResponsableEdit"), TextBox).Text.Trim
- Dim Vencimiento = DirectCast(GvTarjetas.Rows(e.RowIndex).FindControl("TxtFechaVencimientoEdit"), TextBox).Text.ToDate
+ ' Dim CveCuentaTarjeta = GvTarjetas.Rows(e.RowIndex).DataKey("CveCuentaTarjeta").ToEntero
+ ' Dim CveCuenta As Integer = GvTarjetas.Rows(e.RowIndex).DataKey("CveCuenta").ToEntero
+ ' Dim Numero = DirectCast(GvTarjetas.Rows(e.RowIndex).FindControl("TxtNumeroEdit"), TextBox).Text.Trim
+ ' Dim Responsable = DirectCast(GvTarjetas.Rows(e.RowIndex).FindControl("TxtResponsableEdit"), TextBox).Text.Trim
+ ' Dim Vencimiento = DirectCast(GvTarjetas.Rows(e.RowIndex).FindControl("TxtFechaVencimientoEdit"), TextBox).Text.ToDate
- If Not ObjTarjeta.UpdateTarjetaCredito(CveCuentaTarjeta, CveCuenta, Numero, Responsable, Vencimiento, UsuarioActual.CveUsuario) Then
- TieneError = True
- Else
- GvTarjetas.EditIndex = -1
- End If
+ ' If Not ObjTarjeta.UpdateTarjetaCredito(CveCuentaTarjeta, CveCuenta, Numero, Responsable, Vencimiento, UsuarioActual.CveUsuario) Then
+ ' TieneError = True
+ ' Else
+ ' GvTarjetas.EditIndex = -1
+ ' End If
- If Not TieneError Then
- Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
- CargaDatosTarjeta()
- Else
- Alert("Error al actualizar los cambios.", TipoMensaje.MsgError)
- End If
+ ' If Not TieneError Then
+ ' Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
+ ' CargaDatosTarjeta()
+ ' Else
+ ' Alert("Error al actualizar los cambios.", TipoMensaje.MsgError)
+ ' End If
- ObjTarjeta.Dispose()
- UpDatos.Update()
- End Sub
+ ' ObjTarjeta.Dispose()
+ ' UpDatos.Update()
+ 'End Sub
- Private Sub GvTarjetas_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvTarjetas.RowDeleting
- Dim ObjTarjeta As New ClsBancos()
- Dim TieneError = False
+ 'Private Sub GvTarjetas_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvTarjetas.RowDeleting
+ ' Dim ObjTarjeta As New ClsBancos()
+ ' Dim TieneError = False
- Dim CveCuentaTarjeta = GvTarjetas.Rows(e.RowIndex).DataKey("CveCuentaTarjeta").ToEntero
+ ' Dim CveCuentaTarjeta = GvTarjetas.Rows(e.RowIndex).DataKey("CveCuentaTarjeta").ToEntero
- If ObjTarjeta.RemoveTarjetaCredito(CveCuentaTarjeta, UsuarioActual.CveUsuario) Then
- CargaDatosTarjeta()
- Alert("Se eliminaron datos correctamente", TipoMensaje.MsgInformacion)
- Else
- Alert("Error al eliminar", TipoMensaje.MsgError)
- End If
+ ' If ObjTarjeta.RemoveTarjetaCredito(CveCuentaTarjeta, UsuarioActual.CveUsuario) Then
+ ' CargaDatosTarjeta()
+ ' Alert("Se eliminaron datos correctamente", TipoMensaje.MsgInformacion)
+ ' Else
+ ' Alert("Error al eliminar", TipoMensaje.MsgError)
+ ' End If
- ObjTarjeta.Dispose()
- UpDatos.Update()
- End Sub
+ ' ObjTarjeta.Dispose()
+ ' UpDatos.Update()
+ 'End Sub
- Private Sub GvTarjetas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvTarjetas.RowDataBound
- If e.Row.RowType = DataControlRowType.DataRow Then
- If e.Row.RowIndex = 0 Then
- e.Row.Cells(0).Width = Unit.Pixel(100)
- e.Row.Cells(1).Width = Unit.Pixel(100)
- e.Row.Cells(2).Width = Unit.Pixel(200)
- e.Row.Cells(3).Width = Unit.Pixel(20)
- e.Row.Cells(4).Width = Unit.Pixel(20)
- End If
- End If
- End Sub
+ 'Private Sub GvTarjetas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvTarjetas.RowDataBound
+ ' If e.Row.RowType = DataControlRowType.DataRow Then
+ ' If e.Row.RowIndex = 0 Then
+ ' e.Row.Cells(0).Width = Unit.Pixel(100)
+ ' e.Row.Cells(1).Width = Unit.Pixel(100)
+ ' e.Row.Cells(2).Width = Unit.Pixel(200)
+ ' e.Row.Cells(3).Width = Unit.Pixel(20)
+ ' e.Row.Cells(4).Width = Unit.Pixel(20)
+ ' End If
+ ' End If
+ 'End Sub
Private Function CargarDdlUsuarios(UsuariosGlobal As DataTable) As DataTable
Dim tablaUsuariosFormateada As DataTable = New DataTable("Usuarios")
diff --git a/Bancos/Transferencias.aspx b/Bancos/Transferencias.aspx
index d48cdc4c6..d95f297b0 100644
--- a/Bancos/Transferencias.aspx
+++ b/Bancos/Transferencias.aspx
@@ -181,6 +181,7 @@
diff --git a/Bancos/Transferencias.aspx.vb b/Bancos/Transferencias.aspx.vb
index 3c9cabdea..d05024d07 100644
--- a/Bancos/Transferencias.aspx.vb
+++ b/Bancos/Transferencias.aspx.vb
@@ -380,7 +380,6 @@ Partial Class Bancos_Transferencias
Exit For
Else
AlertaGlobal.AppendFormat("{1}
", CveIEDestino, FolioDestino)
- 'FolioDestino = (FolioDestino.ToLong + 1).ToString
End If
Next
diff --git a/RH/Personal.aspx b/RH/Personal.aspx
index 394ab0825..29e7defd5 100644
--- a/RH/Personal.aspx
+++ b/RH/Personal.aspx
@@ -49,10 +49,19 @@
Expediente de personal
-
- Gafete
-
-
+
+
+
+
+ Gafete
+
+
+
+
+
+
+
+
Agregar cuenta bancaria
@@ -80,7 +89,7 @@
- PDF consumo
+ PDF consumo
diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb
index d0dd4ae70..1c99f6da9 100644
--- a/RH/Personal.aspx.vb
+++ b/RH/Personal.aspx.vb
@@ -3898,38 +3898,91 @@ Partial Class RH_Personal
ObjPersonal.Dispose()
End Sub
Private Sub LbGafete_Click(sender As Object, e As EventArgs) Handles LbGafete.Click
- Dim params As New List(Of ReportParameter)
- Dim ObjPersonal As New ClsRH()
- 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
+ Dim PathSource As String = UsuarioActual.Empresa.Ruta & "Formatos\Gafete.docx"
+ If File.Exists(PathSource) Then
- params.Add(New ReportParameter("Nombre", String.Format("{0} {1} {2}", TxtAPaterno.Text.Trim, TxtAMaterno.Text.Trim, TxtNombres.Text.Trim)))
- params.Add(New ReportParameter("Vigencia", TxtFechaFinContrato.Text))
- params.Add(New ReportParameter("Puesto", If(DdlPuesto.SelectedValue.ToEntero() > 0, DdlPuesto.SelectedItem.Text, "")))
- params.Add(New ReportParameter("CURP", TxtCURP.Text))
- params.Add(New ReportParameter("NoRegistro", ""))
- params.Add(New ReportParameter("RegIMSS", TxtNumeroSS.Text))
- params.Add(New ReportParameter("FechaIngreso", TxtFechaIngreso.Text))
- params.Add(New ReportParameter("DomPart", String.Format("{0} NoExt:{1} NoInt:{2} {3}", TxtCalle.Text, TxtNumExt.Text, TxtNumInt.Text, TxtColonia.Text)))
- params.Add(New ReportParameter("Emergencia", ""))
- params.Add(New ReportParameter("CUIP", ""))
- params.Add(New ReportParameter("TipoSangre", ""))
- params.Add(New ReportParameter("RFC", TxtRFC.Text))
- params.Add(New ReportParameter("Denominacion", TxtRFC.Text))
+ Dim PathRoot As String = AppDomain.CurrentDomain.BaseDirectory
+ Dim pathDesti As String
+ PathSource = UsuarioActual.Empresa.Ruta & "Formatos\Gafete.docx"
+ pathDesti = PathRoot & "Temp\" & CvePersonal & "Gafete.docx"
-
- If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & ObjPersonal.CvePersonal & ".png") Then
- params.Add(New ReportParameter("LogoUri", String.Format("{0}://{1}:{2}/Empresas/{3}/RH/Personal/{4}.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, ObjPersonal.CvePersonal)))
- Else
- params.Add(New ReportParameter("LogoUri", ""))
- End If
-
- ImprimirPDF("Empresas/Grales/Formatos/RHGafete.rdlc", New DataTable, params, String.Format("Gafete_{0}", ObjPersonal.CvePersonal), "PDF")
+ If File.Exists(pathDesti) Then
+ File.Delete(pathDesti)
End If
+
+ File.Copy(PathSource, pathDesti)
+
+ 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()
+
+
+ objDoc.SustituirTags(objRH.GetDatosTagsDocumentos(CvePersonal, UsuarioActual.CveEmpresa))
+ objRH.Dispose()
+
+
+
+ objDoc.Guardar(pathDesti)
+
+ Dim fileinfo As New FileInfo(pathDesti)
+
+
+ If fileinfo.Exists Then
+
+ Response.ContentType = "application/docx"
+ Response.AppendHeader("Content-Disposition", $"attachment; filename=Gafete_{CvePersonal}.docx")
+ Response.TransmitFile(pathDesti)
+ Response.End()
+
+ End If
+
+ 'Dim baseUrl As String = Request.Url.GetLeftPart(UriPartial.Authority)
+ 'baseUrl = baseUrl & "/temp/" & fileinfo.Name
+
+ 'RegistraDescargaJavaScript(baseUrl)
+
+
+ Else
+
+ Dim params As New List(Of ReportParameter)
+ Dim ObjPersonal As New ClsRH()
+
+ 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
+
+ params.Add(New ReportParameter("Nombre", String.Format("{0} {1} {2}", TxtAPaterno.Text.Trim, TxtAMaterno.Text.Trim, TxtNombres.Text.Trim)))
+ params.Add(New ReportParameter("Vigencia", TxtFechaFinContrato.Text))
+ params.Add(New ReportParameter("Puesto", If(DdlPuesto.SelectedValue.ToEntero() > 0, DdlPuesto.SelectedItem.Text, "")))
+ params.Add(New ReportParameter("CURP", TxtCURP.Text))
+ params.Add(New ReportParameter("NoRegistro", ""))
+ params.Add(New ReportParameter("RegIMSS", TxtNumeroSS.Text))
+ params.Add(New ReportParameter("FechaIngreso", TxtFechaIngreso.Text))
+ params.Add(New ReportParameter("DomPart", String.Format("{0} NoExt:{1} NoInt:{2} {3}", TxtCalle.Text, TxtNumExt.Text, TxtNumInt.Text, TxtColonia.Text)))
+ params.Add(New ReportParameter("Emergencia", TxtTelefonoEmergencia.Text))
+ params.Add(New ReportParameter("CUIP", ""))
+ params.Add(New ReportParameter("TipoSangre", DdlTipoSangre.SelectedItem.Text))
+ params.Add(New ReportParameter("RFC", TxtRFC.Text))
+ params.Add(New ReportParameter("Denominacion", TxtRFC.Text))
+
+ If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & ObjPersonal.CvePersonal & ".png") Then
+ params.Add(New ReportParameter("LogoUri", String.Format("{0}://{1}:{2}/Empresas/{3}/RH/Personal/{4}.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, ObjPersonal.CvePersonal)))
+ Else
+ params.Add(New ReportParameter("LogoUri", ""))
+ End If
+
+ ImprimirPDF("Empresas/Grales/Formatos/RHGafete.rdlc", New DataTable, params, String.Format("Gafete_{0}", ObjPersonal.CvePersonal), "PDF")
+
+ End If
+ End If
+ ObjPersonal.Dispose()
+
End If
- ObjPersonal.Dispose()
+
+
+
End Sub
Private Sub GenerarPDFGastosXComp(Optional Formato As String = "PDF")
If CvePersonal > 0 Then