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(); } } }
protected override void PrintAction() { PgMng.Reset(4, 1, Face.Resources.Messages.RETRIEVING_DATA, this); Library.Invoice.QueryConditions conditions = new Library.Invoice.QueryConditions(); conditions.Cliente = TodosCliente_CkB.Checked ? null : _client; conditions.Producto = TodosProducto_CkB.Checked ? null : _product; conditions.TipoProducto = TodosProducto_CkB.Checked ? (ETipoProducto)(long)TipoProducto_CB.SelectedValue : ETipoProducto.Todos; conditions.Serie = TodosSerie_CkB.Checked ? null : _serie; conditions.Expediente = TodosExpediente_CkB.Checked ? null : _expedient; conditions.TipoExpediente = TodosExpediente_CkB.Checked ? (ETipoExpediente)(long)TipoExpediente_CB.SelectedValue : ETipoExpediente.Todos; conditions.FechaIni = FInicial_DTP.Checked ? FInicial_DTP.Value : DateTime.MinValue; conditions.FechaFin = FFinal_DTP.Checked ? FFinal_DTP.Value : DateTime.MaxValue; bool detalle = TipoDetallado_RB.Checked; string filtro = GetFilterValues(); PgMng.Grow(); CommonReportMng reportMng = new CommonReportMng(AppContext.ActiveSchema, this.Text, filtro); if (Cliente_RB.Checked) { VentasList list = VentasList.GetListByCliente(conditions, detalle); PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT); InformeVentasClientesRpt rpt = reportMng.GetVentasClientesReport(list, detalle); PgMng.FillUp(); ShowReport(rpt); } else if (Producto_RB.Checked) { VentasList list = VentasList.GetListByProducto(conditions, detalle); PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT); InformeVentasProductosRpt rpt = reportMng.GetVentasProductosReport(list, detalle); PgMng.FillUp(); ShowReport(rpt); } else { VentasList list = VentasList.GetListByExpediente(conditions, detalle); PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT); InformeVentasExpedientesRpt rpt = reportMng.GetVentasExpedienteReport(list, detalle); PgMng.FillUp(); ShowReport(rpt); } _action_result = DialogResult.Ignore; }
protected virtual void ViewInformeVentasAction() { PgMng.Reset(3, 1, Face.Resources.Messages.RETRIEVING_DATA, this); PgMng.Grow(); Library.Invoice.QueryConditions conditions = new Library.Invoice.QueryConditions { Expediente = EntityInfoNoChilds }; VentasList list = VentasList.GetListByExpediente(conditions, true); PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT); Library.Invoice.CommonReportMng reportMng = new Library.Invoice.CommonReportMng(AppContext.ActiveSchema, Resources.Labels.VENTAS_EXPEDIENTE_REPORT_TITLE, "Expediente = " + EntityInfoNoChilds.Codigo); InformeVentasExpedientesRpt report = reportMng.GetVentasExpedienteReport(list, true); PgMng.FillUp(); ShowReport(report); }
protected override void PrintAction() { PgMng.Reset(4, 1, Face.Resources.Messages.RETRIEVING_DATA, this); Library.Invoice.QueryConditions conditions = new Library.Invoice.QueryConditions(); conditions.Cliente = TodosCliente_CkB.Checked ? null : _cliente; conditions.Familia = TodosFamilia_CkB.Checked ? null : _familia; conditions.Producto = TodosProducto_CkB.Checked ? null : _producto;; conditions.FechaIni = FInicial_DTP.Checked ? FInicial_DTP.Value : DateTime.MinValue;; conditions.FechaFin = FFinal_DTP.Checked ? FFinal_DTP.Value : DateTime.MaxValue; conditions.Order = (Ascendente_RB.Checked) ? ListSortDirection.Ascending : ListSortDirection.Descending; string filtro = GetFilterValues(); if (Cliente_RB.Checked) { VentasList ventas = VentasList.GetHistoricoPreciosClientesList(conditions); PgMng.Grow(); CommonReportMng rptMng = new CommonReportMng(AppContext.ActiveSchema, this.Text, filtro); InformeHistoricoPreciosClientesRpt rpt = rptMng.GetInformeHistoricoPreciosClientesReport(ventas); PgMng.FillUp(); ShowReport(rpt); } else { VentasList ventas = VentasList.GetHistoricoPreciosProductosList(conditions); PgMng.Grow(); CommonReportMng rptMng = new CommonReportMng(AppContext.ActiveSchema, this.Text, filtro); InformeHistoricoPreciosProductosRpt rpt = rptMng.GetInformeHistoricoPreciosProductosReport(ventas); PgMng.FillUp(); ShowReport(rpt); } _action_result = DialogResult.Ignore; }
protected void PorcentualAction(Library.Invoice.QueryConditions conditions, string filtro) { bool detalle = Detallado_RB.Checked; string title = this.Text; if (PorcentualBeneficios_RB.Checked) { title = "Informe Estadístico: Porcentual de Beneficios"; } else if (PorcentualVentas_RB.Checked) { title = "Informe Estadísitico: Porcentual de Ventas"; } if (!AgruparMeses_CB.Checked) { title += " por Periodo"; } CommonReportMng reportMng = new CommonReportMng(AppContext.ActiveSchema, title, filtro); ReportFormat format = new ReportFormat(); format.Orden = CrystalDecisions.Shared.SortDirection.DescendingOrder; if (Cliente_RB.Checked) { if (detalle) { if (PorcentualVentas_RB.Checked) { if (AgruparMeses_CB.Checked) { _list = VentasList.GetListByClientePorcentualVenta(conditions); } else { _list = VentasList.GetListByClientePorcentualVentaPeriodo(conditions); } } else if (PorcentualBeneficios_RB.Checked) { if (AgruparMeses_CB.Checked) { _list = VentasList.GetListByClientePorcentualBeneficio(conditions); } else { _list = VentasList.GetListByClientePorcentualBeneficioPeriodo(conditions); } } if (AgruparMeses_CB.Checked) { PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT); InformeVentasPorcentualxClienteRpt rpt = reportMng.GetVentasPorcentualxClienteReport(_list, conditions); PgMng.FillUp(); if (Informe_RB.Checked) { ShowReport(rpt); } else { ShowClientesChart(); } } else { PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT); InformeVentasPorcentualPeriodoxClienteRpt rpt = reportMng.GetVentasPorcentualPeriodoxClienteReport(_list, conditions); PgMng.FillUp(); if (Informe_RB.Checked) { ShowReport(rpt); } } } } else if (Producto_RB.Checked) { if (PorcentualVentas_RB.Checked) { _list = VentasList.GetListByProductoPorcentualVenta(conditions); } else if (PorcentualBeneficios_RB.Checked) { _list = VentasList.GetListByProductoPorcentualBeneficio(conditions); } PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT); InformeVentasPorcentualxProductoRpt rpt = reportMng.GetVentasPorcentualxProductoReport(_list, conditions); PgMng.FillUp(); if (Informe_RB.Checked) { ShowReport(rpt); } else { ShowProductosChart(); } } }