- mejora para el uso de Zona
This commit is contained in:
@@ -118,7 +118,6 @@ Partial Class AC2_RepAnexoCatalogo
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Request("CM") IsNot Nothing AndAlso IsNumeric(Request("CM")) AndAlso Request("CM").ToEntero > 0 Then
|
If Request("CM") IsNot Nothing AndAlso IsNumeric(Request("CM")) AndAlso Request("CM").ToEntero > 0 Then
|
||||||
DdlCuenta.SelectedValueExist(Request("CM").ToString)
|
DdlCuenta.SelectedValueExist(Request("CM").ToString)
|
||||||
End If
|
End If
|
||||||
@@ -127,6 +126,7 @@ Partial Class AC2_RepAnexoCatalogo
|
|||||||
CveProyecto = Request("CveProyecto").ToString
|
CveProyecto = Request("CveProyecto").ToString
|
||||||
DdlProyecto.SelectedValueExist(CveProyecto)
|
DdlProyecto.SelectedValueExist(CveProyecto)
|
||||||
DdlProyecto_SelectedIndexChanged(Nothing, Nothing)
|
DdlProyecto_SelectedIndexChanged(Nothing, Nothing)
|
||||||
|
divProyecto.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Request("CveSubProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveSubProyecto")) Then
|
If Request("CveSubProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveSubProyecto")) Then
|
||||||
@@ -172,7 +172,7 @@ Partial Class AC2_RepAnexoCatalogo
|
|||||||
|
|
||||||
DdlCuentas.DataBind()
|
DdlCuentas.DataBind()
|
||||||
|
|
||||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto)
|
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto, VisualizacionReporte:=1)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -2745,7 +2745,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
|||||||
e.Row.ControlStyle.Font.Size = 13
|
e.Row.ControlStyle.Font.Size = 13
|
||||||
End If
|
End If
|
||||||
Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero
|
Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero
|
||||||
'setgraficaCC(e)
|
setgraficaProy(e)
|
||||||
'Dim CveProyecto As Integer = e.Row.DataKey("CveProyecto").ToEntero
|
'Dim CveProyecto As Integer = e.Row.DataKey("CveProyecto").ToEntero
|
||||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
|
If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
|
||||||
|
|
||||||
@@ -2860,7 +2860,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub setgraficaProyCC(e As GridViewRowEventArgs)
|
Public Sub setgraficaProy(e As GridViewRowEventArgs)
|
||||||
Dim lista As New List(Of Object)
|
Dim lista As New List(Of Object)
|
||||||
Dim colorindex As Integer = 0
|
Dim colorindex As Integer = 0
|
||||||
For Each campo As String() In listaCampos
|
For Each campo As String() In listaCampos
|
||||||
@@ -2893,18 +2893,17 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
|||||||
ExportToExcelG(GvIngresosMesH, GvGastosMesH, TMesT1, "Reporte_Mensual_Horizontal", UsuarioActual, "Mensual Horizontal", Gv3:=GvTotalesMesH)
|
ExportToExcelG(GvIngresosMesH, GvGastosMesH, TMesT1, "Reporte_Mensual_Horizontal", UsuarioActual, "Mensual Horizontal", Gv3:=GvTotalesMesH)
|
||||||
ElseIf Tab.ActiveTabIndex = 2 AndAlso GvIngresosAnualH.Rows.Count > 0 Then
|
ElseIf Tab.ActiveTabIndex = 2 AndAlso GvIngresosAnualH.Rows.Count > 0 Then
|
||||||
ExportToExcelG(GvIngresosAnualH, GvGastosAnualH, TMesT1, "Reporte_Anual_Horizontal", UsuarioActual, "Anual Horizontal", Gv3:=GvTotalesAnualH)
|
ExportToExcelG(GvIngresosAnualH, GvGastosAnualH, TMesT1, "Reporte_Anual_Horizontal", UsuarioActual, "Anual Horizontal", Gv3:=GvTotalesAnualH)
|
||||||
|
|
||||||
ElseIf Tab.ActiveTabIndex = 3 AndAlso GvIngresosSubProyectoH.Rows.Count > 0 Then
|
ElseIf Tab.ActiveTabIndex = 3 AndAlso GvIngresosSubProyectoH.Rows.Count > 0 Then
|
||||||
|
ExportToExcelG(GvIngresosSubProyectoH, GvGastosSubProyectoH, TMesT1, "Reporte_CentroCosto_Horizontal", UsuarioActual, $"Estado de Resultados Horizontal por {LblSubProyecto.Text}", Gv3:=GvTotalesSubProyectoH, EsPorSubProyecto:=True)
|
||||||
ExportToExcelG(GvIngresosSubProyectoH, GvGastosSubProyectoH, TMesT1, "Reporte_Proyecto_Horizontal", UsuarioActual, $"Estado de Resultados Horizontal por {LblSubProyecto.Text}", Gv3:=GvTotalesSubProyectoH, EsPorSubProtyecto:=True)
|
ElseIf Tab.ActiveTabIndex = 4 AndAlso GvIngresosProyectoH.Rows.Count > 0 Then
|
||||||
|
ExportToExcelG(GvIngresosProyectoH, GvGastosProyectoH, TMesT1, "Reporte_Proyecto_Horizontal", UsuarioActual, $"Estado de Resultados Horizontal por Proyecto", EsPorSubProyecto:=True)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Public Sub ExportToExcelG(Gv1 As GridView, Gv2 As GridView, NombreArchivoXLSx As String, Optional Titulo As String = "Reporte", Optional Usuario As Usuario = Nothing, Optional Filtros As String = "", Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100)
|
'Public Sub ExportToExcelG(Gv1 As GridView, Gv2 As GridView, NombreArchivoXLSx As String, Optional Titulo As String = "Reporte", Optional Usuario As Usuario = Nothing, Optional Filtros As String = "", Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100)
|
||||||
Public Sub ExportToExcelG(Gv1 As GridView, Gv2 As GridView, TablaResultados As HtmlTable, NombreArchivoXLSx As String, Usuario As Usuario, Titulo As String, Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100, Optional Gv3 As GridView = Nothing, Optional EsPorSubProtyecto As Boolean = False)
|
Public Sub ExportToExcelG(Gv1 As GridView, Gv2 As GridView, TablaResultados As HtmlTable, NombreArchivoXLSx As String, Usuario As Usuario, Titulo As String, Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100, Optional Gv3 As GridView = Nothing, Optional EsPorSubProyecto As Boolean = False)
|
||||||
|
|
||||||
Dim sw1 As New StringWriter()
|
Dim sw1 As New StringWriter()
|
||||||
Dim htw1 As New HtmlTextWriter(sw1)
|
Dim htw1 As New HtmlTextWriter(sw1)
|
||||||
@@ -3023,7 +3022,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
|||||||
RangoFechas.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
RangoFechas.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||||
|
|
||||||
|
|
||||||
If EsPorSubProtyecto And DdlSubproyecto.SelectedValue.ToEntero > 0 Then
|
If EsPorSubProyecto And DdlSubproyecto.SelectedValue.ToEntero > 0 Then
|
||||||
Dim RangoSubProyecto = worksheet.Cells.GetSubrangeAbsolute(5, celdasConTexto.FirstColumnIndex, 5, celdasConTexto.LastColumnIndex)
|
Dim RangoSubProyecto = worksheet.Cells.GetSubrangeAbsolute(5, celdasConTexto.FirstColumnIndex, 5, celdasConTexto.LastColumnIndex)
|
||||||
RangoSubProyecto.Merged = True
|
RangoSubProyecto.Merged = True
|
||||||
RangoSubProyecto.Value = DdlSubproyecto.SelectedItem.Text
|
RangoSubProyecto.Value = DdlSubproyecto.SelectedItem.Text
|
||||||
@@ -3042,9 +3041,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
|||||||
worksheet.Rows(8).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
worksheet.Rows(8).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
||||||
worksheet.Rows(8).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
|
worksheet.Rows(8).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
|
||||||
|
|
||||||
|
If Not EsPorSubProyecto Then
|
||||||
|
|
||||||
If Not EsPorSubProtyecto Then
|
|
||||||
worksheet.Rows(8 + Gv1.Rows.Count + 2).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
worksheet.Rows(8 + Gv1.Rows.Count + 2).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
||||||
worksheet.Rows(8 + Gv1.Rows.Count + 2).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
|
worksheet.Rows(8 + Gv1.Rows.Count + 2).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
|
||||||
Else
|
Else
|
||||||
@@ -3052,8 +3049,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
|||||||
worksheet.Rows(18).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
|
worksheet.Rows(18).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If i > 0 Then
|
If i > 0 Then
|
||||||
Try
|
Try
|
||||||
worksheet.Columns(i).AutoFit(1)
|
worksheet.Columns(i).AutoFit(1)
|
||||||
@@ -3081,11 +3076,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
|||||||
End Using
|
End Using
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
For I = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
|
For I = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
|
||||||
|
|
||||||
If I > 0 Then
|
If I > 0 Then
|
||||||
@@ -3108,7 +3098,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
|||||||
|
|
||||||
excel.Save(HttpContext.Current.Response, $"{NombreArchivoXLSx}.xlsx")
|
excel.Save(HttpContext.Current.Response, $"{NombreArchivoXLSx}.xlsx")
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||||
@@ -3117,9 +3106,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user