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; }
public override void PrintList() { PgMng.Reset(3, 1, Face.Resources.Messages.LOADING_DATA, this); CommonReportMng reportMng = new CommonReportMng(AppContext.ActiveSchema, this.Text, this.FilterValues); PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT); CuentasContablesListRpt report = reportMng.GetListReport(ResumenCuentasContablesList.GetList((IList <ResumenCuentasContablesInfo>)Datos.List)); 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(); } } }
protected override void SubmitAction() { if (!GetSettings()) { _action_result = DialogResult.Ignore; return; } PgMng.Reset(3, 1, Face.Resources.Messages.RETRIEVING_DATA, this); Library.Invoice.QueryConditions conditions = new Library.Invoice.QueryConditions(); conditions.Year = AnoActivo_DTP.Value.Year; conditions.FechaIni = FInicial_DTP.Value; conditions.FechaFin = FFinal_DTP.Value; conditions.Modelo = _t_modelo; string title = GetTitle(); string filtro = GetFilterValues(); try { switch (_modelo) { case EModelo.Modelo420: { conditions.Producto = ProductInfo.New(); conditions.Producto.Oid = Library.Invoice.ModulePrincipal.GetImpuestosImportacion(); conditions.Modelo.ETipoModelo = ETipoModelo.Soportado; ModeloList soportado = ModeloList.GetList(conditions, false); conditions.Modelo.ETipoModelo = ETipoModelo.Repercutido; ModeloList repercutido = ModeloList.GetList(conditions, false); PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT); CommonReportMng rptMng = new CommonReportMng(AppContext.ActiveSchema, title, filtro); Modelo420Rpt report = rptMng.GetModelo420Report(soportado, repercutido); PgMng.FillUp(); ShowReport(report); } break; case EModelo.Modelo111: { conditions.Modelo.ETipoModelo = ETipoModelo.EmpleadosTrabajo; ModeloList empleados_trabajo = ModeloList.GetList(conditions, false); conditions.Modelo.ETipoModelo = ETipoModelo.EmpleadosEspecie; ModeloList empleados_especie = ModeloList.GetList(conditions, false); conditions.Modelo.ETipoModelo = ETipoModelo.Profesionales; ModeloList profesionales = ModeloList.GetList(conditions, false); InputInvoiceList facturas = InputInvoiceList.GetListByModelo(EModelo.Modelo111, conditions.FechaIni, conditions.FechaFin, false); PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT); CommonReportMng rptMng = new CommonReportMng(AppContext.ActiveSchema, title, filtro); Modelo111Rpt report = rptMng.GetModelo111Report(empleados_trabajo, empleados_especie, profesionales, facturas); PgMng.FillUp(); ShowReport(report); } break; case EModelo.Modelo347: { decimal efectivo = conditions.Modelo.MinEfectivo; conditions.Modelo.MinEfectivo = 0; ModeloList f_emitidas = ModeloList.GetList(Library.Invoice.QueryConditions.ConvertTo(conditions), false); decimal importe = conditions.Modelo.MinImporte; conditions.Modelo.MinImporte = 0; conditions.Modelo.MinEfectivo = efectivo; ModeloList f_emitidas_efectivo = ModeloList.GetList(Library.Invoice.QueryConditions.ConvertTo(conditions), false); PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT); CommonReportMng rptMng = new CommonReportMng(AppContext.ActiveSchema, title, filtro); _t_modelo.MinImporte = importe; _t_modelo.MinEfectivo = efectivo; Modelo347Rpt report = rptMng.GetModelo347Report(f_emitidas, f_emitidas_efectivo, _t_modelo); PgMng.FillUp(); ShowReport(report); } break; } _action_result = DialogResult.Ignore; } catch (Exception ex) { PgMng.FillUp(); MessageBox.Show(iQExceptionHandler.GetAllMessages(ex)); _action_result = DialogResult.Ignore; } }