diff --git a/TradingSystem/OybabReport/Model/ReportPrinter.cs b/TradingSystem/OybabReport/Model/ReportPrinter.cs index b40ea20..eecfd07 100644 --- a/TradingSystem/OybabReport/Model/ReportPrinter.cs +++ b/TradingSystem/OybabReport/Model/ReportPrinter.cs @@ -14,8 +14,8 @@ public void PrintReport(object xtraReport, ReportModel reportModel, string Print XtraReport report = xtraReport as XtraReport; - - report.PageHeight = reportModel.PageHeight; + if (reportModel.PageHeight != 0) + report.PageHeight = reportModel.PageHeight; if (reportModel.IsEAN13Generator) { @@ -60,9 +60,14 @@ public void PrintReport(object xtraReport, ReportModel reportModel, string Print if (null != PrinterDeviceName) + { tool.Print(PrinterDeviceName); + } else - tool.Print(); + { + tool.PrintDialog(); + } + } } diff --git a/TradingSystem/OybabRes/Reports/Print.cs b/TradingSystem/OybabRes/Reports/Print.cs index b853830..89d9e01 100644 --- a/TradingSystem/OybabRes/Reports/Print.cs +++ b/TradingSystem/OybabRes/Reports/Print.cs @@ -28,7 +28,7 @@ private Print() { } /// /// /// - public void PrintBarcode(List models, int sizeMode) + public void PrintBarcode(List models, int sizeMode, int langIndex) { object report = null; if (sizeMode == 0) //4cmX3cm @@ -45,7 +45,7 @@ public void PrintBarcode(List models, int sizeMode) reportModel.DataSource = models; - ReportSettings(-1, reportModel, null); + ReportSettings(langIndex, reportModel, null); if (models.FirstOrDefault().BarcodeNo.Length > 8) diff --git a/TradingSystem/OybabServicePC/DialogWindow/PrintBarcodeWindow.cs b/TradingSystem/OybabServicePC/DialogWindow/PrintBarcodeWindow.cs index 5f01226..5b7aa20 100644 --- a/TradingSystem/OybabServicePC/DialogWindow/PrintBarcodeWindow.cs +++ b/TradingSystem/OybabServicePC/DialogWindow/PrintBarcodeWindow.cs @@ -103,7 +103,7 @@ private void krpbChange_Click(object sender, EventArgs e) } - Print.Instance.PrintBarcode(models, krpcSize.SelectedIndex); + Print.Instance.PrintBarcode(models, krpcSize.SelectedIndex, krpcLanguage.SelectedIndex); Resources.GetRes().DefaultPrintLang = krpcLanguage.SelectedIndex; Resources.GetRes().DefaultBarcodePrintSize = krpcSize.SelectedIndex;