protected override void PrintMermaAction()
        {
            if (Stock_DGW.CurrentRow == null)
            {
                return;
            }
            if (Stock_DGW.CurrentRow.Index < 0)
            {
                return;
            }
            if (Stock_DGW.CurrentRow.DataBoundItem == null)
            {
                return;
            }

            Stock s = (Stock)Stock_DGW.CurrentRow.DataBoundItem;

            if (s.ETipoStock != ETipoStock.Merma)
            {
                return;
            }
            ReportFormat format = new ReportFormat();

            format.Vista = EReportVista.Detallado;

            ExpedientReportMng reportMng = new ExpedientReportMng(AppContext.ActiveSchema);
            MermaStockRpt      rpt       = reportMng.GetMermaDetailReport(s.GetInfo());

            ShowReport(rpt);
        }
Exemplo n.º 2
0
        public override void PrintList()
        {
            ExpedientReportMng reportMng = new ExpedientReportMng(AppContext.ActiveSchema, this.Text, string.Empty);

            LineaFomentoListRpt report = reportMng.GetLineaFomentoListReport(List);

            ShowReport(report);
        }
        protected override void PrintAction()
        {
            PgMng.Reset(4, 1, Face.Resources.Messages.RETRIEVING_DATA, this);

            try
            {
                PgMng.Grow();

                Library.Store.QueryConditions conditions = new Library.Store.QueryConditions
                {
                    TipoExpediente = (ETipoExpediente)(long)TipoExpediente_CB.SelectedValue,
                    FechaIni       = (FInicial_DTP.Checked) ? FInicial_DTP.Value : DateTime.MinValue,
                    FechaFin       = (FFinal_DTP.Checked) ? FFinal_DTP.Value : DateTime.MaxValue,
                    FechaAuxIni    = (PagoInicial_DTP.Checked) ? PagoInicial_DTP.Value : DateTime.MinValue,
                    FechaAuxFin    = (PagoFinal_DTP.Checked) ? PagoFinal_DTP.Value : DateTime.MaxValue,
                };

                switch (TipoCobro_CB.SelectedItem.ToString())
                {
                default:
                case "Todos los expedientes":
                    conditions.Estado = EEstado.Todos;
                    break;

                case "Solo expedientes cobrados":
                    conditions.Estado = EEstado.Pagado;
                    break;

                case "Solo expedientes pendientes de cobro":
                    conditions.Estado = EEstado.Pendiente;
                    break;
                }

                ReportFormat _format = new ReportFormat();

                _format.CampoOrdenacion = Ordenar_CB.SelectedItem.ToString();
                _format.Orden           = (Ascendente_RB.Checked) ? CrystalDecisions.Shared.SortDirection.AscendingOrder
                                                                                                                                        : CrystalDecisions.Shared.SortDirection.DescendingOrder;

                ExpedienteREAList expedientes = ExpedienteREAList.GetListByREA(conditions, false);
                PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT);

                ExpedientReportMng         reportMng = new ExpedientReportMng(AppContext.ActiveSchema, this.Text, GetFilterValues());
                InformeControlCobrosREARpt report    = reportMng.GetControlCobrosREAReport(expedientes, _format);
                PgMng.FillUp();

                ShowReport(report);

                _action_result = DialogResult.Ignore;
            }
            catch (Exception ex)
            {
                PgMng.FillUp();
                throw ex;
            }
        }
        public override void PrintList()
        {
            PgMng.Reset(3, 1, Face.Resources.Messages.LOADING_DATA, this);
            ExpedientReportMng reportMng = new ExpedientReportMng(AppContext.ActiveSchema, this.Text, FilterValues);

            PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT);
            ExpedienteAlListRpt report = reportMng.GetAlListReport(ExpedienteList.GetList((IList <ExpedientInfo>)Datos.List));

            PgMng.FillUp();
            ShowReport(report);
        }
Exemplo n.º 5
0
        public override void PrintList()
        {
            PgMng.Reset(3, 1, Face.Resources.Messages.LOADING_DATA, this);
            ExpedientReportMng reportMng = new ExpedientReportMng(AppContext.ActiveSchema, this.Text, FilterValues);

            PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT);
            PartidaListRpt report = reportMng.GetPartidaListReport(BatchList.GetList(Datos.DataSource as IList <BatchInfo>));

            PgMng.FillUp();
            ShowReport(report);
        }
        protected void ShowStandardReport(Library.Store.QueryConditions conditions)
        {
            ExpedientInfo expediente_ini = Rango_RB.Checked ? _expediente_ini : null;
            ExpedientInfo expediente_fin = Rango_RB.Checked ? _expediente_fin : null;

            ExpedientReportMng reportMng = new ExpedientReportMng(AppContext.ActiveSchema, this.Text, GetFilterValues());

            if (PorExpediente_RB.Checked)
            {
                MovimientosStockListPorExpedienteRpt rpt = null;

                if (TodosExpediente_RB.Checked)
                {
                    rpt = reportMng.GetMovimientosStockListAgrupado(ExpedienteList.GetList(conditions.TipoExpediente, false), conditions.Producto, SerieInfo.New(conditions.Serie.Oid), _report_filter, _report_format);
                }
                else if (Seleccion_RB.Checked)
                {
                    rpt = reportMng.GetMovimientosStockListAgrupado(ExpedientInfo.Get(conditions.Expedient.Oid, false), conditions.Producto, SerieInfo.New(conditions.Serie.Oid), _report_filter, _report_format, false);
                }
                else if (Rango_RB.Checked)
                {
                    rpt = reportMng.GetMovimientosStockListAgrupado(ExpedienteList.GetListByRango(expediente_ini, expediente_fin, false), conditions.Producto, SerieInfo.New(conditions.Serie.Oid), _report_filter, _report_format);
                }

                PgMng.FillUp();

                ShowReport(rpt);
            }
            else if (PorProducto_RB.Checked)
            {
                StockList stocks = null;

                if (TodosExpediente_RB.Checked)
                {
                    stocks = StockList.GetReportList(conditions, null, null, _report_filter.SoloStock, false);
                }
                else if (Seleccion_RB.Checked)
                {
                    stocks = StockList.GetReportList(conditions, null, null, _report_filter.SoloStock, false);
                }
                else if (Rango_RB.Checked)
                {
                    stocks = StockList.GetReportList(conditions, expediente_ini, expediente_fin, _report_filter.SoloStock, false);
                }

                StockLineListRpt rpt = reportMng.GetStockLineList(stocks, _report_filter, _report_format);

                PgMng.FillUp();

                ShowReport(rpt);
            }
        }
Exemplo n.º 7
0
        protected override void PrintStockAction()
        {
            Library.Store.ReportFilter filter = new Library.Store.ReportFilter();
            ReportFormat format = new ReportFormat();

            format.Vista      = EReportVista.Detallado;
            filter.FechaIni   = DateTime.MinValue;
            filter.FechaFin   = DateTime.MaxValue;
            filter.SoloMermas = false;
            filter.SoloStock  = false;

            ExpedientReportMng reportMng             = new ExpedientReportMng(AppContext.ActiveSchema);
            MovimientosStockListPorExpedienteRpt rpt = reportMng.GetMovimientosStockListAgrupado(_entity, null, null, filter, format, false);

            ShowReport(rpt);
        }
        protected virtual void PrintPendienteAction()
        {
            if (Pendientes_DGW.CurrentRow == null)
            {
                return;
            }

            LineaFomentoInfo linea = Pendientes_DGW.CurrentRow.DataBoundItem as LineaFomentoInfo;

            PgMng.Reset(6, 1, Face.Resources.Messages.RETRIEVING_DATA, this);

            ExpedientReportMng reportMng = new ExpedientReportMng(AppContext.ActiveSchema, this.Text, string.Empty);

            ReportClass report = reportMng.GetLineaFomentoListReport(Datos_LineasPendientes.DataSource as LineaFomentoList);

            PgMng.FillUp();

            ShowReport(report);
        }
        protected virtual void PrintPendienteAction()
        {
            if (Pendientes_DGW.CurrentRow == null)
            {
                return;
            }

            FacREAInfo factura = Pendientes_DGW.CurrentRow.DataBoundItem as FacREAInfo;

            PgMng.Reset(6, 1, Face.Resources.Messages.RETRIEVING_DATA, this);

            ExpedientReportMng reportMng = new ExpedientReportMng(AppContext.ActiveSchema, this.Text, string.Empty);

            ReportClass report = reportMng.GetExpedienteREAListReport(ExpedienteREAList.GetList());

            PgMng.FillUp();

            ShowReport(report);
        }
        protected void ShowStoreFileReport(Library.Store.QueryConditions conditions)
        {
            ExpedientInfo expediente_ini = Rango_RB.Checked ? _expediente_ini : null;
            ExpedientInfo expediente_fin = Rango_RB.Checked ? _expediente_fin : null;

            if (PorExpediente_RB.Checked)
            {
                ExpedientReportMng reportMng = new ExpedientReportMng(AppContext.ActiveSchema, this.Text, GetFilterValues());

                MovimientosStockListPorExpedienteRpt rpt = null;

                if (TodosExpediente_RB.Checked)
                {
                    rpt = reportMng.GetMovimientosStockListAgrupado(ExpedienteList.GetList(conditions.TipoExpediente, false), conditions.Producto, SerieInfo.New(conditions.Serie.Oid), _report_filter, _report_format);
                }
                else if (Seleccion_RB.Checked)
                {
                    rpt = reportMng.GetMovimientosStockListAgrupado(ExpedientInfo.Get(conditions.Expedient.Oid, false), conditions.Producto, SerieInfo.New(conditions.Serie.Oid), _report_filter, _report_format, false);
                }
                else if (Rango_RB.Checked)
                {
                    rpt = reportMng.GetMovimientosStockListAgrupado(ExpedienteList.GetListByRango(expediente_ini, expediente_fin, false), conditions.Producto, SerieInfo.New(conditions.Serie.Oid), _report_filter, _report_format);
                }

                PgMng.FillUp();

                ShowReport(rpt);
            }
            else if (PorProducto_RB.Checked)
            {
                StoreReportMng reportMng = new StoreReportMng(AppContext.ActiveSchema, this.Text, GetFilterValues());

                StockList stocks = null;

                if (TodosExpediente_RB.Checked)
                {
                    stocks = StockList.GetReportList(conditions, null, null, _report_filter.SoloStock, false);
                }
                else if (Seleccion_RB.Checked)
                {
                    stocks = StockList.GetReportList(conditions, null, null, _report_filter.SoloStock, false);
                }
                else if (Rango_RB.Checked)
                {
                    stocks = StockList.GetReportList(conditions, expediente_ini, expediente_fin, _report_filter.SoloStock, false);
                }

                stocks.FillPurchasePrices();

                string stock_purchase_price_type = string.Empty;

                if (LastPurchasePrice_RB.Checked)
                {
                    stock_purchase_price_type = "Last";
                }
                else if (AveragePrice_RB.Checked)
                {
                    stock_purchase_price_type = "Average";
                }

                StoreFileRpt rpt = reportMng.GetStoreFile(stocks
                                                          , _report_filter
                                                          , _report_format
                                                          , StoreFileKg_RB.Checked
                                                          , stock_purchase_price_type);

                PgMng.FillUp();

                ShowReport(rpt);
            }
        }