OC rdl 189
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user