OC rdl 189

This commit is contained in:
rakcsle
2024-11-07 16:15:53 -07:00
parent 8b07f996bb
commit 536b0c3e82
4 changed files with 287 additions and 92 deletions

View File

@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls;
using Extensiones;
using System.Data;
using static Extensiones.ModExtensiones;
@@ -280,14 +280,19 @@ public partial class Ventas_RepProductosServiciosPeriodo : ClsPaginas
CveClienteClasificacion: DdlClienteClasificacion.SelectedValue.ToEntero(), ModalidadContable: !ChkLecturaAdmin.Checked))
{
GvDatos.DataSource = ObjVentas.DtResultados;
DtVentas = ObjVentas.DtResultados;
}
DtVentas = ObjVentas.DtResultados;
}
CveProyecto = DdlProyecto.SelectedValue.ToEntero();
ObjVentas.Dispose();
GvDatos.DataBind();
if (GvDatos.Rows.Count > 0)
{
//CargaGraficas(DtVentas);
//this.DvGraficas.Visible = true;
}
else
{
this.DvGraficas.Visible = false;
}
UPDatos.Update();
@@ -298,6 +303,37 @@ public partial class Ventas_RepProductosServiciosPeriodo : ClsPaginas
}
#endregion
#region GRAFICA
private void CargaGraficas(DataTable DtVentas)
{
MuestraGrafica(div_ventas, DtVentas, "GPO", "Total", "", "", "gh2", "");
}
private void CargaGraficaNEW(DataTable D_T_Datos)
{
JArray jsonData = new JArray();
for (int x=24; x <= 35 ; x++)
{
string Mes = D_T_Datos.Columns[x].ColumnName;
JObject obj = new JObject();
obj.Add(new JProperty("mes", Mes));
for (int y = 1; y <= D_T_Datos.Rows.Count - 1; y++) // y Empiesa en 1 para no agregar el total
{
obj.Add(new JProperty(D_T_Datos.Rows[y][4].ToString(), D_T_Datos.Rows[y][x].ToString()));
}
jsonData.Add(obj);
}
JArray jsonSeries = new JArray();
for (int y = 1; y <= D_T_Datos.Rows.Count - 1; y++) // y Empiesa en 1 para no agregar el total
{
JObject obj = new JObject(
new JProperty(D_T_Datos.Rows[y][4].ToString(), D_T_Datos.Rows[y][4].ToString())
);
jsonSeries.Add(obj);
}
string jsdatos = jsonData.ToString();
string jsseries = jsonSeries.ToString();