--FIX recarga de diagrama

--poner código en el renglón
This commit is contained in:
2024-04-12 17:25:14 -07:00
parent 22742cc055
commit 1d58181e3a
2 changed files with 66 additions and 55 deletions

View File

@@ -63,8 +63,8 @@ Partial Class RepContratosCalendario
If DtAvance IsNot Nothing Then
For Each Row As DataRow In DtAvance.Rows
If String.IsNullOrEmpty(Row("NombreAF").ToString()) Then
Row("NombreAF") = "Unidad no asignada"
If String.IsNullOrEmpty(Row("NoSerie").ToString()) Then
Row("NoSerie") = "Unidad no asignada"
End If
Next
@@ -74,22 +74,23 @@ Partial Class RepContratosCalendario
Dim random = New Random()
'DATOS
For Each Row As DataRow In DtAvance.FiltraParametros("NombreAF <> ''").Rows
For Each Row As DataRow In DtAvance.FiltraParametros("NoSerie <> ''").Rows
Dim obj As New JObject(
New JProperty("category", Row("NombreAF")),
New JProperty("category", Row("NoSerie")),
New JProperty("fromDate", Row("FechaInicial").ToString().ToDateTime().ToString("dd/MM/yyyy HH:mm").ToDateTime()),
New JProperty("toDate", Row("FechaFinal").ToString().ToDateTime().ToString("dd/MM/yyyy HH:mm").ToDateTime()),
New JProperty("columnSettings", New JObject(
New JProperty("fill", String.Format("#{0:X6}", random.Next(16777216)))
))
)
)),
New JProperty("task", Row("NombreAF"))
)
jsonData.Add(obj)
Next
'CATEGORIAS
For Each Row As DataRow In DtAvance.FiltraParametros("NombreAF <> ''", "", {"NombreAF"}).Rows
For Each Row As DataRow In DtAvance.FiltraParametros("NoSerie <> ''", "", {"NoSerie"}).Rows
Dim obj As New JObject(
New JProperty("category", Row("NombreAF"))
New JProperty("category", Row("NoSerie"))
)
jsonCategorias.Add(obj)
Next