protected void GeneralAction(Library.Invoice.QueryConditions conditions, string filtro) { bool detalle = Detallado_RB.Checked; CommonReportMng reportMng = new CommonReportMng(AppContext.ActiveSchema, this.Text, filtro); if (!detalle) { _list = VentasList.GetListMensual(conditions); PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT); InformeVentasMensualRpt rpt = reportMng.GetVentasMensualReport(_list); PgMng.FillUp(); if (Informe_RB.Checked) { ShowReport(rpt); } else { ShowVentasChart(); } } else if (Cliente_RB.Checked) { if (detalle) { _list = VentasList.GetListByClienteMensual(conditions); PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT); InformeVentasMensualxClienteRpt rpt = reportMng.GetVentasMensualxClienteReport(_list); PgMng.FillUp(); if (Informe_RB.Checked) { ShowReport(rpt); } else { ShowClientesChart(); } } } else if (Producto_RB.Checked) { _list = VentasList.GetListByProductoMensual(conditions); PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT); InformeVentasMensualxProductoRpt rpt = reportMng.GetVentasMensualxProductoReport(_list); PgMng.FillUp(); if (Informe_RB.Checked) { ShowReport(rpt); } else { ShowProductosChart(); } } }
public InformeVentasMensualxProductoRpt GetVentasMensualxProductoReport(VentasList list) { List <VentasInfo> pList = new List <VentasInfo>(); foreach (VentasInfo item in list) { pList.Add(item); } if (pList.Count == 0) { return(null); } InformeVentasMensualxProductoRpt doc = new InformeVentasMensualxProductoRpt(); doc.SetDataSource(pList); FormatHeader(doc); return(doc); }