diff --git a/Contabilidad2/RepSituacionFinanciera.aspx.vb b/Contabilidad2/RepSituacionFinanciera.aspx.vb index f3f16dacf..fb092acf1 100644 --- a/Contabilidad2/RepSituacionFinanciera.aspx.vb +++ b/Contabilidad2/RepSituacionFinanciera.aspx.vb @@ -587,18 +587,30 @@ Partial Class AC2_SituacionFinanciera Private Sub ImprimirReporte(Optional Formato As String = "PDF") Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue) Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy") - 'nombre del archivo a generar + Dim fileName As String = "EdoSituacionFinanciera" - 'ubicacion del rdlc + Dim reportpath As String = "Contabilidad2/Reportes/RepSituacionFinanciera.rdlc" - 'parametros a enviar al reporte + Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa)) - params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri)) + + + Dim ImgLogoInfo As New IO.FileInfo($"{UsuarioActual.Empresa.Ruta}\Logo.png") + + + If ImgLogoInfo.Exists Then + params.Add(New ReportParameter("pImg", $"file://{ImgLogoInfo.FullName}")) + Else + params.Add(New ReportParameter("pImg", "")) + End If + + params.Add(New ReportParameter("pFirma1", If(ChkFirma.Checked, String.Format("{0}", vbCrLf), ""))) params.Add(New ReportParameter("pFirma2", If(ChkFirma.Checked, String.Format("{0}l", vbCrLf), ""))) params.Add(New ReportParameter("pFechaFin", FechaF)) + params.Add(New ReportParameter("periodo", String.Format("de {0} {1}", DdlPeriodo.SelectedItem.ToString, DdlEjercicio.SelectedItem.ToString))) ImprimirPDF(reportpath, DtDatos, params, fileName, Formato) End Sub diff --git a/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc b/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc index 840e67f08..6c35c1cfe 100644 --- a/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc +++ b/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc @@ -3048,16 +3048,17 @@ =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" , Fields!ImporteActual.Value, 0),"DataSet1") - =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL CONTABLE" , Fields!ImporteActual.Value, 0),"DataSet1") + =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" , Fields!ImporteActual.Value, 0),"DataSet1") - =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL CONTABLE" , Fields!ImporteAnterior.Value, 0),"DataSet1") + =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" , Fields!ImporteAnterior.Value, 0),"DataSet1") - =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL CONTABLE" , Fields!ImporteActual.Value, 0),"DataSet1") + =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" , Fields!ImporteActual.Value, 0),"DataSet1") =Variables!TotalPasivoActual.Value+Variables!TotalPatrimonioHActual.Value + true =Variables!TotalPatrimonioHAnterior.Value+ Variables!TotalPasivoAnterior.Value diff --git a/OC/OC.aspx b/OC/OC.aspx index 3f8652f2d..7bbbc6911 100644 --- a/OC/OC.aspx +++ b/OC/OC.aspx @@ -890,6 +890,8 @@ + + <%-- 0 --%> @@ -904,6 +906,7 @@ + <%-- 1 --%> @@ -924,6 +927,7 @@ + <%-- 2 --%> <%--DataTextField--%> @@ -935,6 +939,7 @@ + <%-- 3 --%> @@ -943,6 +948,7 @@ + <%-- 4 --%> @@ -972,28 +978,22 @@ + <%-- 5 --%> - - <%--Activo Fijo--%> + - - <%--Maquinaria--%> + - <%-- - - - - - --%> + <%-- 6 --%> @@ -1007,6 +1007,8 @@ + + <%-- 7 --%> @@ -1020,7 +1022,7 @@ - + <%-- 8 --%> @@ -1028,18 +1030,18 @@ - + <%-- 9 --%> + <%-- 10 --%> - - <%-- --%> +
@@ -1054,27 +1056,30 @@
- <%-- - --%> +
+ <%-- 11 --%> - - <%----%> + + <%-- 12 --%> Ver + <%-- 13 --%> + + <%-- 14 --%> @@ -1085,27 +1090,29 @@ + + <%-- 15 --%> + <%-- 16 --%> + <%-- 17 --%> - <%-- - --%> +
- <%-- - --%> +
diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index ed899c1ce..d9425c0b0 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -862,7 +862,7 @@ Partial Class OC If (UsuarioActual.TienePermisoProceso(203)) AndAlso Dr("TipoTermino").ToString.ToEntero = 3 AndAlso Dr("Tipo").ToString = "OC" Then CargaClasificaciones() If Not UsuarioActual.TienePermisoProceso(131) Then DesHabilitar() - GvD.Columns(9).Visible = True + GvD.Columns(10).Visible = True LbAgregar.Enabled = True txtPrecioUnitario.Enabled = True DdlProyecto.Enabled = True @@ -1599,7 +1599,7 @@ Partial Class OC SubProyectosNoAutorizados.Add(Row("SubProyecto").ToString) CboE.BackColor = Drawing.Color.Silver CboE.Enabled = False - GvD.Columns(9).Visible = False 'No permitir la edicion + GvD.Columns(10).Visible = False 'No permitir la edicion 'GvD.Columns(9).Visible = True ChkCotizacion.Enabled = False TxtDescrip.Enabled = False @@ -1635,7 +1635,7 @@ Partial Class OC 'EDICION 'CUANDO EL LA REGISRO Y TIENE ACCESO A ESE ESTATUS If objOC.CveUsuario = UsuarioActual.CveUsuario AndAlso (DtEstatusUsuarios.FiltraParametros(String.Format(" CveEstatus = {0}", CveEstatus)).Rows.Count >= 1 Or CveEstatus = 0) Then - GvD.Columns(9).Visible = True 'No permitir la edicion + GvD.Columns(10).Visible = True 'No permitir la edicion If ChkCotizacion.Checked AndAlso UsuarioActual.Empresa.Funcionalidad(565) = "1" Then ChkCotizacion.Enabled = False Else @@ -1720,7 +1720,7 @@ Partial Class OC If EditarOC Then CboE.Enabled = True - GvD.Columns(9).Visible = True 'Permitir la edicion + GvD.Columns(10).Visible = True 'Permitir la edicion ChkCotizacion.Enabled = True TxtDescrip.Enabled = True TxtJustificacion.Enabled = True @@ -3684,11 +3684,11 @@ Partial Class OC 'If DtEstatusUsuarios.FiltraParametros(String.Format("CveSubProyecto = {0}", e.Row.DBCampo("CveSubProyecto"))).Rows.Count = 0 Then e.Row.FCImageButton("ImgEdit").Visible = False : e.Row.FCImageButton("ImgDelete").Visible = False If TipoOC = "OC" AndAlso Not IsDBNull(e.Row.DBCampo("CveOrdenCompraPadre")) AndAlso IsNumeric(e.Row.DBCampo("CveOrdenCompraPadre")) Then - GvD.Columns(10).Visible = True + GvD.Columns(11).Visible = True lblTipoPadreHijo.Visible = True e.Row.FCLiteral("LtlLiga").Text = String.Format("{1}", e.Row.DBCampo("CveOrdenCompraPadre"), e.Row.DBCampo("FolioOrdenCompraPadre")) ElseIf TipoOC = "REQ" AndAlso Not IsDBNull(e.Row.DBCampo("CveOrdenCompraHija")) AndAlso IsNumeric(e.Row.DBCampo("CveOrdenCompraHija")) Then - GvD.Columns(10).Visible = True + GvD.Columns(11).Visible = True lblTipoPadreHijo.Visible = True e.Row.FCLiteral("LtlLiga").Text = String.Format("{1}", e.Row.DBCampo("CveOrdenCompraHija"), e.Row.DBCampo("FolioOrdenCompraHija")) End If @@ -3702,7 +3702,7 @@ Partial Class OC If ObjOC.DtResultados.Rows.Count = 1 Then e.Row.FCLiteral("LtlCompra").Text = String.Format("{1}", ObjOC.DtResultados.FiltroPrimeroValor("CveCompra"), e.Row.DBCampo("FolioCompra")) LblCompra.Visible = True - GvD.Columns(11).Visible = True + GvD.Columns(12).Visible = True ElseIf ObjOC.DtResultados.Rows.Count > 1 Then LblCompra.Visible = True e.Row.FCLiteral("LtlCompra").Visible = False @@ -3711,7 +3711,7 @@ Partial Class OC 'e.Row.FCLinkButton("LnkCompra").CausesValidation = False 'e.Row.FCLinkButton("LnkCompra").OnClientClick = "return true;" 'return true; e.Row.FCLinkButton("LnkCompra").CommandArgument = e.Row.DBCampo("CveOrdenCompraDetalle") - GvD.Columns(11).Visible = True + GvD.Columns(12).Visible = True Else e.Row.FCLiteral("LtlCompra").Text = "" LblCompra.Visible = True @@ -4134,8 +4134,8 @@ Partial Class OC DdlProveedorSucursal.Enabled = False DdlProveedorContacto.Enabled = False - GvD.Columns(9).Visible = False - GvD.Columns(10).Visible = True + GvD.Columns(10).Visible = False + GvD.Columns(11).Visible = True If Not (BtnCancelarPrevio.Enabled And (CveEstatus <> CveEstatusFinalError OrElse CveEstatus <> CveEstatusFinalOK OrElse UsuarioActual.TienePermisoProceso(148).ToEntero > 0)) Then BtnCancelarPrevio.Enabled = False @@ -4299,11 +4299,11 @@ Partial Class OC 'Seccion Grid If VerificaPresupuesto Then GvD.Width = 1750 - GvD.Columns(12).Visible = True GvD.Columns(13).Visible = True GvD.Columns(14).Visible = True GvD.Columns(15).Visible = True GvD.Columns(16).Visible = True + GvD.Columns(17).Visible = True 'Panel General UpPresupuestosAC.Visible = True @@ -4330,11 +4330,11 @@ Partial Class OC Else 'GvD.Width = Width.ToEntero - GvD.Columns(12).Visible = False GvD.Columns(13).Visible = False GvD.Columns(14).Visible = False GvD.Columns(15).Visible = False GvD.Columns(16).Visible = False + GvD.Columns(17).Visible = False UpPresupuestosAC.Visible = False End If @@ -6685,11 +6685,11 @@ Partial Class OC CboE_SelectedIndexChanged(CboE, EventArgs.Empty) - GvD.Columns(9).Visible = True 'Permitir la edicion + GvD.Columns(10).Visible = True 'Permitir la edicion lblTipoPadreHijo.Visible = False - GvD.Columns(10).Visible = False - LblCompra.Visible = False GvD.Columns(11).Visible = False + LblCompra.Visible = False + GvD.Columns(12).Visible = False ChkCotizacion.Visible = True ChkCotizacion.Enabled = True @@ -6818,7 +6818,7 @@ Partial Class OC ScriptManager.RegisterStartupScript(Me, GetType(Page), "anioactual", script, True) VerificaPresupuesto = False RVSubProyecto.Enabled = If(RequiereSubProyecto = True, True, False) - GvD.Columns(10).Visible = False + GvD.Columns(11).Visible = False CargaComboCFDI() CargaMonedas() 'CargaClasificaciones() diff --git a/RH/Personal.aspx b/RH/Personal.aspx index 26e186b2d..0b2cfa41e 100644 --- a/RH/Personal.aspx +++ b/RH/Personal.aspx @@ -4119,7 +4119,7 @@ Agregar --%>
-
+
diff --git a/SAT/SolicitudesNominaSat.aspx b/SAT/SolicitudesNominaSat.aspx index e90c87678..c44653907 100644 --- a/SAT/SolicitudesNominaSat.aspx +++ b/SAT/SolicitudesNominaSat.aspx @@ -41,18 +41,19 @@ white-space: nowrap; } - .reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(2), - .reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2) { + .reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(2) + /*,.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2) */ + { background-color: #900; color: #FFF; } .reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(3), .reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(4), - .reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(5), + .reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(5)/*, .reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(3), .reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(4), - .reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(5) { + .reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(5)*/ { background-color: #3598dc; color: #FFF; } @@ -66,14 +67,14 @@ white-space: nowrap; } - .reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(2), - .reporte2 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2) { + .reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(2)/*, + .reporte2 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ { background-color: #900; color: #FFF; } - .reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(7)), - .reporte2 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3):not(:nth-child(7)){ + .reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(7))/*, + .reporte2 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3):not(:nth-child(7))*/{ background-color: #3598dc; color: #FFF; } @@ -93,17 +94,17 @@ } .reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(2), - .reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(n+20), + .reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(n+20)/*, .reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2), - .reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+20){ + .reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+20)*/{ background-color: #900; color: #FFF; } .reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(1), - .reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+20)), + .reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+20))/*, .reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(1), - .reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3):not(:nth-child(n+20)) { + .reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3):not(:nth-child(n+20))*/ { background-color: #3598dc; color: #FFF; } @@ -115,39 +116,82 @@ white-space: nowrap; } - .reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(2), - .reporte4 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2) { + .reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(2)/*, + .reporte4 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ { background-color: #900; color: #FFF; } - .reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3), - .reporte4 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3) { + .reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+6))/*, + .reporte4 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3)*/ { + background-color: #3598dc; + color: #FFF; + } + + .reporte5 .GVSolicitudTimbreNominaGral tr th:nth-child(2)/*, + .reporte5 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ { + background-color: #900; + color: #FFF; + } + .reporte5 .GVSolicitudTimbreNominaGral tr th:nth-child(3)/*, + .reporte5 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(3)*/ { background-color: #3598dc; color: #FFF; } - .reporte6 .GVSolicitudTimbreNominaGral tr td:nth-child(n) { white-space: nowrap; } - - .reporte6 .GVSolicitudTimbreNominaGral tr td:nth-child(n+3), - .reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3) { + + .reporte6 .GVSolicitudTimbreNominaGral tr td:nth-child(n+4), + .reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+4) { text-align: right !important; } - .reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+6)) { + .reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+4):not(:nth-child(n+7)) { background-color: #900; color: #FFF; } - - .reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6) { + .reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+7):not(:nth-child(n+10)) { background-color: #3598dc; color: #FFF; + } + + + + .reporte7 .GVSolicitudTimbreNominaGral tr td:nth-child(n+3), + .reporte7 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3) { + text-align: right !important; } + .reporte7 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+6)) { + background-color: #900; + color: #FFF; + } + .reporte7 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6):not(:nth-child(n+9)) { + background-color: #3598dc; + color: #FFF; + } + + + + + .reporte8 .GVSolicitudTimbreNominaGral tr td:nth-child(n+6), + .reporte8 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6) { + text-align: right !important; + } + + .reporte8 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6):not(:nth-child(n+9)) { + background-color: #900; + color: #FFF; + } + .reporte8 .GVSolicitudTimbreNominaGral tr th:nth-child(n+9):not(:nth-child(n+12)) { + background-color: #3598dc; + color: #FFF; + } + + .reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(1), .reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(4) { white-space: nowrap; @@ -161,7 +205,7 @@
  • - Descargar + Descargar
  • @@ -181,21 +225,22 @@
    - +
    - - - - - + + + + + + <%----%>
    - +
    <%----%> @@ -210,7 +255,7 @@
    - +
    <%----%>
    diff --git a/SAT/SolicitudesNominaSat.aspx.cs b/SAT/SolicitudesNominaSat.aspx.cs index e70c82a6e..89225bcd0 100644 --- a/SAT/SolicitudesNominaSat.aspx.cs +++ b/SAT/SolicitudesNominaSat.aspx.cs @@ -58,8 +58,56 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas nom.SATSolicitudTimbreNominaGral(DdlReporte.SelectedValue.ToString().ToEntero(), UsuarioActual.CveEmpresa, fechaInicio, fechaFin); ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook(); - var libro = wb.AddWorksheet(nom.DtResultados , "Nomina"); + var libro = wb.AddWorksheet(nom.DtResultados , "Nomina"); libro.ColumnsUsed().AdjustToContents(); + libro.Range(1, 1, 1, nom.DtResultados.Columns.Count).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 153, 153)); + switch (DdlReporte.SelectedValue.ToString().ToEntero()) + { + case 1: + libro.Range(1, 2, 1, 2).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153,0,0)); + libro.Range(1, 3, 1, 5).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220)); + break; + case 2: + libro.Range(1, 2, 1, 2).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 0, 0)); + libro.Range(1, 3, 1, 6).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220)); + libro.Range(1, 8, 1, 11).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220)); + break; + case 3: + libro.Range(1, 1, 1, 10).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220)); + libro.Range(1, 11, 1, nom.DtResultados.Columns.Count).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 0, 0)); + break; + case 4: + libro.Range(1, 2, 1, 2).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 0, 0)); + libro.Range(1, 3, 1, 5).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220)); + break; + case 5: + libro.Range(1, 2, 1, 2).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 0, 0)); + libro.Range(1, 3, 1, 3).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220)); + break; + case 6: + libro.Range(1, 4, 1, 6).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 0, 0)); + libro.Range(1, 7, 1, 9).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220)); + break; + case 7: + libro.Range(1, 3, 1, 5).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 0, 0)); + libro.Range(1, 6, 1, 8).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220)); + break; + case 8: + libro.Range(1, 6, 1, 8).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 0, 0)); + libro.Range(1, 9, 1, 12).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220)); + break; + case 9: + break; + default: + break; + } + libro.Row(1).InsertRowsAbove(4); + libro.Range(1, 2, 1, 6).Merge().Value = UsuarioActual.Empresa.Empresa; + libro.Range(2, 2, 2, 6).Merge().Value = $"Reporte de {DdlReporte.SelectedItem.Text }"; + libro.Range(3, 2, 3, 6).Merge().Value = $"del {fechaInicio.ToDateTime():dd/MM/yyyy} al {fechaFin.ToDateTime():dd/MM/yyyy}"; + libro.Range(2, 7, 2, 9).Merge().Value = $"Fecha:{DateTime.Now:dd/MM/yyyy}"; + libro.Range(3, 7, 3, 9).Merge().Value = $"Hora:{DateTime.Now:HH:mm}"; + System.IO.Stream fs = new System.IO.MemoryStream(); wb.SaveAs(fs); fs.Position = 0; @@ -75,7 +123,7 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas Response.Buffer = true; Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; - Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", "Visor nómina ")); + Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", $"Visor nómina ( Reporte :{DdlReporte.SelectedValue}) ")); Response.BinaryWrite(memoryStream.ToArray()); Response.End(); } diff --git a/vwd.webinfo b/vwd.webinfo index c1f66d114..973bfdedd 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -464,6 +464,8 @@ + +