E172 Rep Indicador Resumen: Afinar información de las tablas

-Los saldos y totales ahora se muestran como campos de moneda para distinguirlos mejor de las cantidades
-El tipo de moneda por entrada ahora se visualiza en las tablas
-Las tablas ahora se ordenan por subtotal y moneda o saldo y moneda
-Las gráficas ahora solo grafican el Top 25 de cada tabla

Cambios en BD [SIG_Resp_MLR]:
- Se modificó PA_Citrus_IndicadoresGet
  - +2 param: @FechaI @FechaF
  - Ahora filtra por CveTipoProveedor = 192 (Productor)
- Se modificó PA_Vta_GetRepPS + columna Abreviatura, los totales usan la Abreviatura ahora en vez de Moneda
This commit is contained in:
MLopez
2022-11-30 14:12:10 -07:00
parent 95d5e901c6
commit 2d83db0b82
3 changed files with 92 additions and 28 deletions

View File

@@ -3394,11 +3394,13 @@ Public Class ClsCGame
#Region "INDICADORES"
Public Function GetIndicadores(CveEmpresa As Integer) As Boolean
Public Function GetIndicadores(CveEmpresa As Integer, FechaI As Date, FechaF As Date) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Citrus_IndicadoresGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
End With
Try
SqlAdapter.Fill(Data)

View File

@@ -127,7 +127,8 @@
<Columns>
<asp:BoundField DataField="Gpo" HeaderText="Prod/Serv" ItemStyle-Width="300px" />
<asp:BoundField DataFormatString="{0:n}" DataField="Cantidad" ItemStyle-CssClass="margenbound" HeaderText="Cantidad" />
<asp:BoundField DataFormatString="{0:n}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="SubTotal" />
<asp:BoundField DataFormatString="{0:c}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="SubTotal" />
<asp:BoundField DataField="Abreviatura" ItemStyle-CssClass="margenbound" HeaderText="" />
</Columns>
</asp:GridView>
</div>
@@ -183,9 +184,14 @@
<Columns>
<asp:BoundField DataField="Gpo" HeaderText="Prod/Serv" ItemStyle-Width="300px" />
<asp:BoundField DataFormatString="{0:n}" DataField="Cantidad" ItemStyle-CssClass="margenbound" HeaderText="Cantidad" />
<asp:BoundField DataFormatString="{0:n}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="SubTotal" />
<asp:BoundField DataFormatString="{0:c}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="SubTotal" />
<asp:BoundField DataField="Abreviatura" ItemStyle-CssClass="margenbound" HeaderText="" />
</Columns>
</asp:GridView>
<%--<asp:GridView ID="GridView1" runat="server" GridLines="None"
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
AutoGenerateColumns="True" AllowPaging="False" ShowFooter="False">
</asp:GridView>--%>
</div>
</ContentTemplate>
</asp:UpdatePanel>
@@ -239,7 +245,8 @@
<Columns>
<asp:BoundField DataField="Gpo" HeaderText="Prod/Serv" ItemStyle-Width="300px" />
<asp:BoundField DataFormatString="{0:n}" DataField="Cantidad" ItemStyle-CssClass="margenbound" HeaderText="Cantidad" />
<asp:BoundField DataFormatString="{0:n}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="SubTotal" />
<asp:BoundField DataFormatString="{0:c}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="SubTotal" />
<asp:BoundField DataField="Abreviatura" ItemStyle-CssClass="margenbound" HeaderText="" />
</Columns>
</asp:GridView>
</div>
@@ -294,7 +301,8 @@
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
<Columns>
<asp:BoundField DataField="Gpo" HeaderText="Cliente" />
<asp:BoundField DataFormatString="{0:n}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" />
<asp:BoundField DataFormatString="{0:c}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" />
<asp:BoundField DataField="CveMoneda" ItemStyle-CssClass="margenbound" HeaderText="" />
</Columns>
</asp:GridView>
</div>
@@ -349,7 +357,8 @@
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
<Columns>
<asp:BoundField DataField="Gpo" HeaderText="Proveedor" />
<asp:BoundField DataFormatString="{0:n}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" />
<asp:BoundField DataFormatString="{0:c}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" />
<asp:BoundField DataField="CveMoneda" ItemStyle-CssClass="margenbound" HeaderText="" />
</Columns>
</asp:GridView>
</div>
@@ -388,7 +397,7 @@
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span id="Span10" runat="server" class="caption-subject bold uppercase">Indicadores por Proveedor</span>
<span id="Span10" runat="server" class="caption-subject bold uppercase">Indicadores por Proveedor Productor</span>
</div>
<div class="actions">
<div class="btn-group">
@@ -405,11 +414,11 @@
<Columns>
<asp:BoundField DataField="RazonSocial" HeaderText="Proveedor" />
<asp:BoundField DataFormatString="{0:n}" DataField="Cantidad" ItemStyle-CssClass="margenbound" HeaderText="Cantidad" />
<asp:BoundField DataFormatString="{0:n}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="SubTotal" />
<asp:BoundField DataFormatString="{0:n}" DataField="PUPromedioKG" ItemStyle-CssClass="margenbound" HeaderText="PUnit/KG" />
<asp:BoundField DataFormatString="{0:c}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="SubTotal" />
<asp:BoundField DataFormatString="{0:c}" DataField="PUPromedioKG" ItemStyle-CssClass="margenbound" HeaderText="PUnit/KG" />
<asp:BoundField DataFormatString="{0:n}" DataField="Merma" ItemStyle-CssClass="margenbound" HeaderText="Merma" />
<asp:BoundField DataFormatString="{0:n}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" />
<asp:BoundField DataFormatString="{0:n}" DataField="Abonado" ItemStyle-CssClass="margenbound" HeaderText="Abonado" />
<asp:BoundField DataFormatString="{0:c}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" />
<asp:BoundField DataFormatString="{0:c}" DataField="Abonado" ItemStyle-CssClass="margenbound" HeaderText="Abonado" />
</Columns>
</asp:GridView>
</div>
@@ -423,7 +432,7 @@
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span id="Span11" runat="server" class="caption-subject bold uppercase">Indicadores - Gráfica </span>
<span id="Span11" runat="server" class="caption-subject bold uppercase">Indicadores por Proveedor Productor- Gráfica </span>
</div>
<div class="actions">
<div class="btn-group">
@@ -495,7 +504,7 @@
AmCharts.makeChart("chartdiv_cxp192", { ...chartconfig, dataProvider: json["CxP192"] }); // Compras x Producto ProveedorClasificacion 192
AmCharts.makeChart("chartdiv_ccxc", { ...chartconfig, dataProvider: json["CCxC"] }); // Cuentas por Cobrar x Cliente
AmCharts.makeChart("chartdiv_cpxp", { ...chartconfig, dataProvider: json["CPxP"] }); // Cuentas por Pagar x Proveedor
// AmCharts.makeChart("chartdiv_indicadores", { ...chartconfig, dataProvider: json["Indicadores"] }); // Indicadores por Proveedor
// AmCharts.makeChart("chartdiv_indicadores", { ...chartconfig, dataProvider: json["Indicadores"] }); // Indicadores por Proveedor Productor
document.getElementById('amChartsAttribution').style.visibility = 'visible';
}

View File

@@ -77,6 +77,22 @@ Partial Class General_RepIndicadorResumen
ViewState("CPxP") = value
End Set
End Property
#If False Then
Private Property gv1 As DataTable
Get
If ViewState("gv1") Is Nothing Then
Return New DataTable
Else
Return DirectCast(ViewState("gv1"), DataTable)
End If
End Get
Set(value As DataTable)
ViewState("gv1") = value
End Set
End Property
#End If
Private Property Indicadores As DataTable
Get
@@ -146,6 +162,8 @@ Partial Class General_RepIndicadorResumen
If ObjVentas.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), MinFecha, MaxFecha, -1,
-1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, 5, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoCambio:=1) Then
VxP = ObjVentas.DtResultados
VxP.DefaultView.Sort = "CveMoneda,SubTotal DESC"
VxP = VxP.DefaultView.ToTable
GvVxP.DataSource = VxP
Else
GvVxP.DataSource = Nothing
@@ -155,6 +173,8 @@ Partial Class General_RepIndicadorResumen
If ObjCompras.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), -1, -1, -1,
UsuarioActual.CveEmpresa, 5, -1, -1, "-1", "-1", -1, TipoCambio:=1, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveProveedorClasificacion:=192) Then
CxP192 = ObjCompras.DtResultados
CxP192.DefaultView.Sort = "CveMoneda,SubTotal DESC"
CxP192 = CxP192.DefaultView.ToTable
GvCxP192.DataSource = CxP192
Else
GvCxP192.DataSource = Nothing
@@ -164,6 +184,8 @@ Partial Class General_RepIndicadorResumen
If ObjCompras.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), -1, -1, -1,
UsuarioActual.CveEmpresa, 5, -1, -1, "-1", "-1", -1, TipoCambio:=1, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveTipoProveedor:=1) Then
CxP = ObjCompras.DtResultados
CxP.DefaultView.Sort = "CveMoneda,SubTotal DESC"
CxP = CxP.DefaultView.ToTable
GvCxP.DataSource = CxP
Else
GvCxP.DataSource = Nothing
@@ -176,6 +198,8 @@ Partial Class General_RepIndicadorResumen
"-1", "-1", "-1", FechaCorte:=FechaCorte.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
CCxC = ObjMovtos.DtResultados
CCxC.DefaultView.Sort = "CveMoneda,Saldo DESC"
CCxC = CCxC.DefaultView.ToTable
GvCCxC.DataSource = CCxC
Else
GvCCxC.DataSource = Nothing
@@ -186,15 +210,28 @@ Partial Class General_RepIndicadorResumen
"-1", "-1", "-1", FechaCorte:=FechaCorte.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
CPxP = ObjMovtos.DtResultados
CPxP.DefaultView.Sort = "CveMoneda,Saldo DESC"
CPxP = CPxP.DefaultView.ToTable
GvCPxP.DataSource = CPxP
Else
GvCPxP.DataSource = Nothing
CPxP = Nothing
End If
If ObjCitrus.GetIndicadores(UsuarioActual.CveEmpresa) Then
'If ObjCompras.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), -1, -1, -1,
' UsuarioActual.CveEmpresa, 5, -1, -1, "-1", "-1", -1, TipoCambio:=1, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveProveedorClasificacion:=192) Then
' gv1 = ObjCompras.DtResultados
' GridView1.DataSource = gv1
'Else
' GridView1.DataSource = Nothing
' gv1 = Nothing
'End If
If ObjCitrus.GetIndicadores(UsuarioActual.CveEmpresa, TxtFechaI.Text, TxtFechaF.Text) Then
Indicadores = ObjCitrus.DtResultados
Indicadores.DefaultView.Sort = "Saldo DESC"
Indicadores = Indicadores.DefaultView.ToTable
GvIndicadores.DataSource = Indicadores
Else
GvIndicadores.DataSource = Nothing
@@ -209,6 +246,7 @@ Partial Class General_RepIndicadorResumen
GvVxP.DataBind()
GvCxP192.DataBind()
GvCxP.DataBind()
'GridView1.DataBind()
GvCCxC.DataBind()
GvCPxP.DataBind()
GvIndicadores.DataBind()
@@ -259,8 +297,19 @@ Partial Class General_RepIndicadorResumen
End Sub
Protected Sub GvCxP_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCxP.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("Orden") = "" Then
'e.Row.Cells(0).Text = e.Row.DBCampo("Orden")
If e.Row.DBCampo("Orden") = "00ND" Then
e.Row.CssClass = "Totales"
e.Row.Cells(0).Text = "Total " + e.Row.DBCampo("Abreviatura")
End If
End If
End Sub
Protected Sub GvCxP192_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCxP192.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
'e.Row.Cells(0).Text = e.Row.DBCampo("Orden")
If e.Row.DBCampo("Orden") = "00ND" Then
e.Row.CssClass = "Totales"
e.Row.Cells(0).Text = "Total " + e.Row.DBCampo("Abreviatura")
End If
End If
End Sub
@@ -269,6 +318,8 @@ Partial Class General_RepIndicadorResumen
If e.Row.DBCampo("Orden") = "" Then
e.Row.CssClass = "Totales"
End If
'TODO: Sería mejor usar la Abreviatura de la tabla, pero habría que extender PA_Comp_RepCxP para incluir la columna Abreviatura
e.Row.Cells(2).Text = $"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {e.Row.DBCampo("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
End If
End Sub
Protected Sub GvCPxP_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCPxP.RowDataBound
@@ -276,6 +327,8 @@ Partial Class General_RepIndicadorResumen
If e.Row.DBCampo("Orden") = "" Then
e.Row.CssClass = "Totales"
End If
'TODO: Sería mejor usar la Abreviatura de la tabla, pero habría que extender PA_Comp_RepCxP para incluir la columna Abreviatura
e.Row.Cells(2).Text = $"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {e.Row.DBCampo("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
End If
End Sub
Protected Sub GvIndicadores_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvIndicadores.RowDataBound
@@ -377,7 +430,7 @@ Partial Class General_RepIndicadorResumen
Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
Row("Valor") = Dr("SubTotal").ToString.FormatoNumero
Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString
Row("Moneda") = Dr("Moneda").ToString
Row("Moneda") = Dr("Abreviatura").ToString
DtVxP.Rows.Add(Row)
RowColorIndex += 1
If RowColorIndex = 17 Then
@@ -385,7 +438,7 @@ Partial Class General_RepIndicadorResumen
End If
End If
Next
Dim query_vxp = From s In DtVxP.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
Dim query_vxp = From s In DtVxP.AsEnumerable().Take(25) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
'Compras x Producto TipoProveedor=1
DtCxP.Reset()
@@ -395,13 +448,13 @@ Partial Class General_RepIndicadorResumen
DtCxP.Columns.Add("Moneda")
RowColorIndex = 0
For Each Dr As DataRow In CxP.Rows
If Not Dr("Orden").ToString = "" Then
If Not Dr("Orden").ToString = "00ND" Then
Dim Row As DataRow = Nothing
Row = DtCxP.NewRow()
Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
Row("Valor") = Dr("SubTotal").ToString.FormatoNumero
Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString
Row("Moneda") = Dr("Moneda").ToString
Row("Moneda") = Dr("Abreviatura").ToString
DtCxP.Rows.Add(Row)
RowColorIndex += 1
If RowColorIndex = 17 Then
@@ -409,7 +462,7 @@ Partial Class General_RepIndicadorResumen
End If
End If
Next
Dim query_cxp = From s In DtCxP.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
Dim query_cxp = From s In DtCxP.AsEnumerable().Take(25) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
'Compras x Producto ProveedorClasificacion=192
DtCxP192.Reset()
@@ -419,13 +472,13 @@ Partial Class General_RepIndicadorResumen
DtCxP192.Columns.Add("Moneda")
RowColorIndex = 0
For Each Dr As DataRow In CxP192.Rows
If Not Dr("Orden").ToString = "" Then
If Not Dr("Orden").ToString = "00ND" Then
Dim Row As DataRow = Nothing
Row = DtCxP192.NewRow()
Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
Row("Valor") = Dr("SubTotal").ToString.FormatoNumero
Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString
Row("Moneda") = Dr("Moneda").ToString
Row("Moneda") = Dr("Abreviatura").ToString
DtCxP192.Rows.Add(Row)
RowColorIndex += 1
If RowColorIndex = 17 Then
@@ -433,7 +486,7 @@ Partial Class General_RepIndicadorResumen
End If
End If
Next
Dim query_cxp192 = From s In DtCxP192.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
Dim query_cxp192 = From s In DtCxP192.AsEnumerable().Take(25) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
'Alert(Newtonsoft.Json.JsonConvert.SerializeObject(CCxC.Rows))
@@ -451,7 +504,7 @@ Partial Class General_RepIndicadorResumen
Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
Row("Valor") = Dr("Saldo").ToString.FormatoNumero
Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString
Row("Moneda") = Dr("Moneda").ToString
Row("Moneda") = $"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
DtCCxC.Rows.Add(Row)
RowColorIndex += 1
If RowColorIndex = 17 Then
@@ -459,7 +512,7 @@ Partial Class General_RepIndicadorResumen
End If
End If
Next
Dim query_ccxc = From s In DtCCxC.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
Dim query_ccxc = From s In DtCCxC.AsEnumerable().Take(25) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
'Cuentas por pagar x Proveedor
DtCPxP.Reset()
@@ -475,7 +528,7 @@ Partial Class General_RepIndicadorResumen
Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
Row("Valor") = Dr("Saldo").ToString.FormatoNumero
Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString
Row("Moneda") = Dr("Moneda").ToString
Row("Moneda") = $"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
DtCPxP.Rows.Add(Row)
RowColorIndex += 1
If RowColorIndex = 17 Then
@@ -483,11 +536,11 @@ Partial Class General_RepIndicadorResumen
End If
End If
Next
Dim query_cpxp = From s In DtCPxP.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
Dim query_cpxp = From s In DtCPxP.AsEnumerable().Take(25) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
'TODO: Indicadores x Proveedor -- Determinar qué poner en la gráfica con E172
'Serializar datos agrupándolos en su respectivo DataTable, todos en un solo JSON
'Serializar datos agrupándolos por su respectivo DataTable, todos en un solo JSON
Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.VxP = query_vxp, .CxP = query_cxp, .CxP192 = query_cxp192, .CCxC = query_ccxc, .CPxP = query_cpxp})
'Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.VxP = query_vxp, .CCxC = New String() {}})
'Alert(json)