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 @@ + +