Cambios visuales

This commit is contained in:
HECTOR RODRIGUEZ
2021-04-16 17:52:15 -07:00
parent 47b1413610
commit e589219ab9
2 changed files with 85 additions and 64 deletions

View File

@@ -1062,8 +1062,10 @@ Partial Class RH_Personal
End Sub
Private Sub CargaUsuariosNomina()
DDLUsuarioNomina.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
Dim dttemp As DataTable
Dim FiltroAD() As String = {"CveUsuario", "Usuario", "Nombre", "Contraseña", "CveEmpresa", "Rol", "Correo", "Empresa", "CveRol"}
dttemp = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
DDLUsuarioNomina.DataSource = dttemp.FiltraParametros(String.Format("CveEmpresa = {0} AND Estatus =1 and CveRol <> 1", UsuarioActual.CveEmpresa), "Rol ASC", FiltroAD)
DDLUsuarioNomina.DataBind()
DDLUsuarioNomina.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
@@ -3498,69 +3500,71 @@ Partial Class RH_Personal
ObjPersonal.Dispose()
End Sub
Private Sub GenerarPDFGastosXComp(Optional Formato As String = "PDF")
If CvePersonal > 0 Then
If RBLTipoGastos.SelectedValue = "1" Then
If RBLTipoGastos.SelectedValue = "1" Then
If DTGastosSinComp.Rows.Count > 0 Then
If DTGastosSinComp.Rows.Count > 0 Then
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("UsuarioImprimio", UsuarioActual.Nombre))
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("UsuarioImprimio", UsuarioActual.Nombre))
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
If Imagen.Exists Then
params.Add(New ReportParameter("pImg", logouri))
Else
params.Add(New ReportParameter("pImg", ""))
End If
ImprimirPDF("Empresas/Grales/Formatos/GastosXComprobarGral.rdlc", DTGastosSinComp, params, "GastosSinComprobarGral", Formato)
Else
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If
ElseIf RBLTipoGastos.SelectedValue = "2" Then
If DTGastosPorCheque.Rows.Count > 0 Then
For Each Row As DataRow In DTGastosPorCheque.Rows
Dim FolioPago As String = Row("FolioPago").ToString()
Row("FolioPago") = ""
If Row("CveCompra").ToString() = "" And Row("CveIE").ToString() <> "" Then
Row("FechaVencimiento") = Row("FechaDocumento")
Row("FolioPago") = FolioPago
If Imagen.Exists Then
params.Add(New ReportParameter("pImg", logouri))
Else
params.Add(New ReportParameter("pImg", ""))
End If
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("UsuarioImprimio", UsuarioActual.Nombre))
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
If Imagen.Exists Then
params.Add(New ReportParameter("pImg", logouri))
ImprimirPDF("Empresas/Grales/Formatos/GastosXComprobarGral.rdlc", DTGastosSinComp, params, "GastosSinComprobarGral", Formato)
Else
params.Add(New ReportParameter("pImg", ""))
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If
ImprimirPDF("Empresas/Grales/Formatos/GastosXComprobarCheque.rdlc", DTGastosPorCheque, params, "GastosPorCheque", Formato)
Else
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
ElseIf RBLTipoGastos.SelectedValue = "2" Then
If DTGastosPorCheque.Rows.Count > 0 Then
For Each Row As DataRow In DTGastosPorCheque.Rows
Dim FolioPago As String = Row("FolioPago").ToString()
Row("FolioPago") = ""
If Row("CveCompra").ToString() = "" And Row("CveIE").ToString() <> "" Then
Row("FechaVencimiento") = Row("FechaDocumento")
Row("FolioPago") = FolioPago
End If
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("UsuarioImprimio", UsuarioActual.Nombre))
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
If Imagen.Exists Then
params.Add(New ReportParameter("pImg", logouri))
Else
params.Add(New ReportParameter("pImg", ""))
End If
ImprimirPDF("Empresas/Grales/Formatos/GastosXComprobarCheque.rdlc", DTGastosPorCheque, params, "GastosPorCheque", Formato)
Else
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If
End If
Else
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If
End Sub