예제 #1
0
        private void btnRefreshBinCard_Click(object sender, EventArgs e)
        {
            if (dxBinCardValidation.Validate())
            {
                // Do bind the bin card
                //int WarehouseID = lkBinCardWarehouse.
                var           dataRow = (DataRowView)lkBinArchivePeriod.GetSelectedDataRow();
                BinCardReport report;
                if (ckBinCardArchive.Checked && dataRow != null)
                {
                    // Do bind the bin card
                    //int WarehouseID = lkBinCardWarehouse.
                    report =
                        ReportingReportFactory.CreateBinCard(Convert.ToInt32(lkBinCardActivity.EditValue), ItemID,
                                                             Convert.ToInt32(lkBinCardUnit.EditValue),
                                                             Convert.ToInt32(lkBinCardWarehouse.EditValue),
                                                             Convert.ToDateTime(dataRow["StartDate"]),
                                                             Convert.ToDateTime(dataRow["EndDate"]));
                }
                else
                {
                    report = ReportingReportFactory.CreateBinCard(Convert.ToInt32(lkBinCardActivity.EditValue), ItemID,
                                                                  Convert.ToInt32(lkBinCardUnit.EditValue),
                                                                  Convert.ToInt32(lkBinCardWarehouse.EditValue));
                }
                printBinCard.PrintingSystem = report.PrintingSystem;

                report.PrintingSystem.ExecCommand(DevExpress.XtraPrinting.PrintingSystemCommand.ZoomToPageWidth, null);
                binCardReport = report;
                // Generate the report's print document.
                report.CreateDocument();
            }
        }
예제 #2
0
        private void lkBinCardWarehouse_EditValueChanged(object sender, EventArgs e)
        {
            if (_UnitID.HasValue && lkBinCardWarehouse.EditValue != null)
            {
                BinCardReport report = ReportingReportFactory.CreateBinCard(_StoreID, _ItemID, _UnitID.Value,
                                                                            Convert.ToInt32(lkBinCardWarehouse.EditValue));
                printBinCard.PrintingSystem = report.PrintingSystem;

                report.PrintingSystem.ExecCommand(DevExpress.XtraPrinting.PrintingSystemCommand.ZoomToPageWidth, null);
                binCardReport = report;
                // Generate the report's print document.
                report.CreateDocument();
            }
        }