Beispiel #1
0
        public override void PrintList()
        {
            PgMng.Reset(3, 1, Face.Resources.Messages.LOADING_DATA, this);

            ProveedorReportMng reportMng = new ProveedorReportMng(AppContext.ActiveSchema);

            PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT);
            ProveedorListRpt report = reportMng.GetListReport(ProveedorList.GetList((IList <ProveedorInfo>)Datos.List));

            PgMng.FillUp();

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

            Library.Store.QueryConditions conditions = new Library.Store.QueryConditions();

            conditions.Proveedor      = TodosProveedor_CkB.Checked ? null : _proveedor;
            conditions.Producto       = TodosProducto_CkB.Checked ? null : _producto;
            conditions.Serie          = TodosSerie_CkB.Checked ? null : _serie;
            conditions.Expedient      = TodosExpediente_CkB.Checked ? null : _expediente;
            conditions.TipoExpediente = !TodosExpediente_CkB.Checked ? moleQule.Store.Structs.ETipoExpediente.Todos : (moleQule.Store.Structs.ETipoExpediente)(long) TipoExpediente_CB.SelectedValue;
            conditions.FechaIni       = FInicial_DTP.Checked ? FInicial_DTP.Value : DateTime.MinValue;
            conditions.FechaFin       = FFinal_DTP.Checked ? FFinal_DTP.Value : DateTime.MaxValue;

            string filtro = GetFilterValues();

            if (Proveedor_RB.Checked)
            {
                ComprasList list = ComprasList.GetListByProveedor(conditions);
                PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT);

                ProveedorReportMng reportMng = new ProveedorReportMng(AppContext.ActiveSchema, string.Empty, filtro);
                InformeComprasRpt  rpt       = reportMng.GetComprasReport(list);
                PgMng.FillUp();

                ShowReport(rpt);
            }
            else
            {
                ComprasList list = ComprasList.GetListByProducto(conditions);
                PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT);

                ProductReportMng           reportMng = new ProductReportMng(AppContext.ActiveSchema, string.Empty, filtro);
                InformeComprasProductosRpt rpt       = reportMng.GetComprasProductosReport(list);
                PgMng.FillUp();

                ShowReport(rpt);
            }

            _action_result = DialogResult.Ignore;
        }