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); } }
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); } }