-- mejoras, cambio de "no requiere unidad"
-- quitar la unidad especificada!
This commit is contained in:
@@ -53,7 +53,7 @@ Partial Class RepContratosCalendario
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString()
|
||||
txtFechaF.Text = GetLastDayOfMonth(NowADS()).ToShortDateString()
|
||||
InicializaCombos()
|
||||
CargaDatos()
|
||||
CargaDatos()
|
||||
End If
|
||||
'InicializaCalendar()
|
||||
End Sub
|
||||
@@ -189,27 +189,14 @@ Partial Class RepContratosCalendario
|
||||
End Sub
|
||||
Private Sub CargaCronograma(Optional TipoVista As Integer = -1)
|
||||
If DtAvance IsNot Nothing Then
|
||||
|
||||
|
||||
Dim strData As New StringBuilder
|
||||
Dim strAFData As New StringBuilder
|
||||
|
||||
|
||||
|
||||
'Dim separator As String = ""
|
||||
'Dim str As New StringBuilder()
|
||||
'str.AppendLine("datosGant=[")
|
||||
|
||||
|
||||
Dim StrFiltro As String = ""
|
||||
If DdlTipoUnidad.SelectedValue.ToEntero > 0 Then StrFiltro = " AND CveTipoActivoFijo = " & DdlTipoUnidad.SelectedValue
|
||||
|
||||
Dim DtUnidades As DataTable = GlobalDTActivoFijos(UsuarioActual.CveEmpresa).FiltraParametros("Codigo <> '' AND MedidaVehicular IN (2,3) " & StrFiltro, Orderby:=" TipoActivoFijo ASC, CodigoNumeroOrden ASC", DistinctColumns:={"Codigo", "CveActivoFijo"})
|
||||
|
||||
|
||||
Dim jsonData As New JArray()
|
||||
Dim jsonCategorias As New JArray()
|
||||
|
||||
Dim random = New Random()
|
||||
|
||||
'DATOS
|
||||
@@ -237,11 +224,11 @@ Partial Class RepContratosCalendario
|
||||
Dim FF As Date = Row("FechaFinal").ToString.ToDate
|
||||
|
||||
strData.AppendLine("{")
|
||||
strData.AppendLine($"category: '{Row("CodigoAF").ToString}',")
|
||||
strData.AppendLine($"category: '{Row("CodigoAF").ToString.Replace("'", "")}',")
|
||||
strData.AppendLine($"fromDate: '{FI.ToString("yyyy-MM-dd HH:mm:ss")}',")
|
||||
strData.AppendLine($"toDate: '{FF.ToString("yyyy-MM-dd HH:mm:ss")}',")
|
||||
'strData.AppendLine($"columnSettings: {{fill: '{String.Format("#{0:X6}", random.Next(16777216))}'}},")
|
||||
strData.AppendLine($"unidad: '{Row("NombreAF").ToString}',")
|
||||
strData.AppendLine($"unidad: '{Row("NombreAF").ToString.Replace("'", "")}',")
|
||||
strData.AppendLine($"color: am4core.color('" & String.Format("#{0:X6}", random.Next(16777216)) & "'),")
|
||||
strData.AppendLine($"cveContrato: {Row("CveContrato").ToString.ToEntero},")
|
||||
strData.AppendLine($"contrato: '{Row("NumeroContrato").ToString}',")
|
||||
@@ -249,7 +236,6 @@ Partial Class RepContratosCalendario
|
||||
strData.AppendLine($"cliente: '{Row("NombreComercial").ToString.Replace("'", "")}'")
|
||||
strData.AppendLine("},")
|
||||
|
||||
|
||||
strAF.AppendFormat("{0},", Row("CveAF"))
|
||||
|
||||
'uniad contrato y duracion
|
||||
@@ -275,16 +261,15 @@ Partial Class RepContratosCalendario
|
||||
New JProperty("category", Row("Codigo"))
|
||||
)
|
||||
jsonCategorias.Add(obj)
|
||||
|
||||
strAFData.AppendLine("{")
|
||||
strAFData.AppendLine($"category: '{Row("Codigo").ToString}',")
|
||||
strAFData.AppendFormat("category: '{0}'", Row("Codigo"))
|
||||
strAFData.AppendLine("},")
|
||||
|
||||
Next
|
||||
strAFData.AppendLine("{}]")
|
||||
|
||||
'RegistraScript($"cargaDiagramaGrant({jsonData.ToString()},{jsonCategorias.ToString()},{TipoVista});", $"{random.Next(16777216)}")
|
||||
RegistraScript($"cargaDiagramaGrantAMC4({strData.ToString().Replace(",{}", "")},{strAFData.ToString().Replace(",{}", "")},{TipoVista});", $"{random.Next(16777216)}")
|
||||
RegistraScript($" cargaDiagramaGrantAMC4({strData.ToString().Replace(",{}", "")},{strAFData.ToString().Replace(",{}", "")},{TipoVista}); ", random.Next(16777216).ToString)
|
||||
|
||||
UPPGantt.Update()
|
||||
UPGat.Update()
|
||||
@@ -562,8 +547,6 @@ Partial Class RepContratosCalendario
|
||||
e.Row.BackColor = Drawing.ColorTranslator.FromHtml(BGC_Atencion)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -893,7 +876,7 @@ Partial Class RepContratosCalendario
|
||||
'End If
|
||||
|
||||
DdlAF.DataBind()
|
||||
DdlAF.Items.Insert(0, New ListItem("-", "-1"))
|
||||
DdlAF.Items.Insert(0, New ListItem("-", "0")) 'DEBE DE SER CERO, SI SE QUIERE QUITAR LA UNIDAD
|
||||
UpModal.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user