[feat:] frontend for running sheet details (ZKZ, KNr, AMANr, ...)
This commit is contained in:
@@ -70,6 +70,18 @@ public class PdfExportSettings
|
|||||||
public bool exportRunningSheets { get; set; } = true;
|
public bool exportRunningSheets { get; set; } = true;
|
||||||
public int rsNumGrouped { get; set; } = 25;
|
public int rsNumGrouped { get; set; } = 25;
|
||||||
public int rsPlzStartpoint { get; set; } = 2;
|
public int rsPlzStartpoint { get; set; } = 2;
|
||||||
|
|
||||||
|
public string rsKNrAbs { get; set; } = "";
|
||||||
|
public string rsKNrEmp { get; set; } = "";
|
||||||
|
public string rsZKZ { get; set; } = "";
|
||||||
|
public string rsIntVer { get; set; } = "";
|
||||||
|
public string rsLaufz { get; set; } = "";
|
||||||
|
public string rsEinldat { get; set; } = "";
|
||||||
|
public string rsAMANr { get; set; } = "";
|
||||||
|
public string rsBundGew { get; set; } = "";
|
||||||
|
public int rsPalNr { get; set; } = 1;
|
||||||
|
public int rsBundNrPal { get; set; } = 20;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Global
|
public class Global
|
||||||
|
|||||||
+51
-3
@@ -251,8 +251,9 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid Grid.Row="2" Margin="20" ColumnDefinitions="*,5*,*" IsVisible="False" x:Name="GrdExportMarginOptions">
|
<Grid Grid.Row="2" Margin="20" ColumnDefinitions="*,5*,*" IsVisible="False" x:Name="GrdExportMarginOptions">
|
||||||
<StackPanel Grid.Column="1" Orientation="Vertical" Spacing="20">
|
<ScrollViewer Grid.Column="1">
|
||||||
<Grid ColumnDefinitions="*,*,*" ColumnSpacing="20">
|
<StackPanel Margin="5,5,5,5" Orientation="Vertical" Spacing="20" Background="AliceBlue" >
|
||||||
|
<Grid ColumnDefinitions="*,*,*" ColumnSpacing="20" Margin="10,10,10,0">
|
||||||
<StackPanel Orientation="Vertical" Spacing="10">
|
<StackPanel Orientation="Vertical" Spacing="10">
|
||||||
<Grid ColumnDefinitions="*,*">
|
<Grid ColumnDefinitions="*,*">
|
||||||
<Label Grid.Column="0" Content="Zellenrand oben (mm)"></Label>
|
<Label Grid.Column="0" Content="Zellenrand oben (mm)"></Label>
|
||||||
@@ -319,10 +320,57 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<Grid ColumnDefinitions="*,*" ColumnSpacing="20" Margin="10,10,10,0">
|
||||||
|
<StackPanel Grid.Column="0" Orientation="Vertical" Spacing="10">
|
||||||
|
<Grid ColumnDefinitions="*,2*">
|
||||||
|
<Label Grid.Column="0" Content="Kunden-Nr. Absender" />
|
||||||
|
<TextBox Grid.Column="1" x:Name="TbExpRnsKNrAbs" />
|
||||||
|
</Grid>
|
||||||
|
<Grid ColumnDefinitions="*,2*">
|
||||||
|
<Label Grid.Column="0" Content="Kunden-Nr. Empfänger" />
|
||||||
|
<TextBox Grid.Column="1" x:Name="TbExpRnsKNrEmp" />
|
||||||
|
</Grid>
|
||||||
|
<Grid ColumnDefinitions="*,2*">
|
||||||
|
<Label Grid.Column="0" Content="ZKZ/Titel" />
|
||||||
|
<TextBox Grid.Column="1" x:Name="TbExpRnsZKZ" />
|
||||||
|
</Grid>
|
||||||
|
<Grid ColumnDefinitions="*,2*">
|
||||||
|
<Label Grid.Column="0" Content="Interner Vermerk" />
|
||||||
|
<TextBox Grid.Column="1" x:Name="TbExpRnsIntVer" />
|
||||||
|
</Grid>
|
||||||
|
<Grid ColumnDefinitions="*,2*">
|
||||||
|
<Label Grid.Column="0" Content="Laufzeit" />
|
||||||
|
<TextBox Grid.Column="1" x:Name="TbExpRnsLaufz" />
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Grid.Column="1" Orientation="Vertical" Spacing="10">
|
||||||
|
<Grid ColumnDefinitions="*,2*">
|
||||||
|
<Label Grid.Column="0" Content="Einlieferungsdatum" />
|
||||||
|
<TextBox Grid.Column="1" x:Name="TbExpRnsEinldat" />
|
||||||
|
</Grid>
|
||||||
|
<Grid ColumnDefinitions="*,2*">
|
||||||
|
<Label Grid.Column="0" Content="AM-Auftragsnummer" />
|
||||||
|
<TextBox Grid.Column="1" x:Name="TbExpRnsAMANr" />
|
||||||
|
</Grid>
|
||||||
|
<Grid ColumnDefinitions="*,2*">
|
||||||
|
<Label Grid.Column="0" Content="Bundgewicht" />
|
||||||
|
<TextBox Grid.Column="1" x:Name="TbExpRnsBundGew" />
|
||||||
|
</Grid>
|
||||||
|
<Grid ColumnDefinitions="*,2*">
|
||||||
|
<Label Grid.Column="0" Content="Paletten-Nr. (Start)" />
|
||||||
|
<NumericUpDown Grid.Column="1" Minimum="0" Value="1" x:Name="NudExpRnsPalNr" />
|
||||||
|
</Grid>
|
||||||
|
<Grid ColumnDefinitions="*,2*">
|
||||||
|
<Label Grid.Column="0" Content="Anzahl Bunde auf Palette" />
|
||||||
|
<NumericUpDown Grid.Column="1" Minimum="0" Value="20" x:Name="NudExpRnsBundNrPal" />
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="10,10,10,10">
|
||||||
<Button Content="Start" Click="BtnStartGenerateLabels_OnClick"></Button>
|
<Button Content="Start" Click="BtnStartGenerateLabels_OnClick"></Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
</ScrollViewer>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|||||||
+23
-1
@@ -936,6 +936,17 @@ public partial class MainWindow : Window
|
|||||||
NudExpMargColumnsPerPage.Value = options.columnsPerPage;
|
NudExpMargColumnsPerPage.Value = options.columnsPerPage;
|
||||||
NudExpMargFontSize.Value = (decimal)options.fontSize;
|
NudExpMargFontSize.Value = (decimal)options.fontSize;
|
||||||
NudExpMargSmallFontSize.Value = (decimal)options.smallFontSize;
|
NudExpMargSmallFontSize.Value = (decimal)options.smallFontSize;
|
||||||
|
|
||||||
|
TbExpRnsKNrAbs.Text = options.rsKNrAbs;
|
||||||
|
TbExpRnsKNrEmp.Text = options.rsKNrEmp;
|
||||||
|
TbExpRnsZKZ.Text = options.rsZKZ;
|
||||||
|
TbExpRnsIntVer.Text = options.rsIntVer;
|
||||||
|
TbExpRnsLaufz.Text = options.rsLaufz;
|
||||||
|
TbExpRnsEinldat.Text = options.rsEinldat;
|
||||||
|
TbExpRnsAMANr.Text = options.rsAMANr;
|
||||||
|
TbExpRnsBundGew.Text = options.rsBundGew;
|
||||||
|
NudExpRnsPalNr.Value = options.rsPalNr;
|
||||||
|
NudExpRnsBundNrPal.Value = options.rsBundNrPal;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -959,7 +970,18 @@ public partial class MainWindow : Window
|
|||||||
rowsPerPage = ReadInt(TbExpMargRowsPerPage, 7),
|
rowsPerPage = ReadInt(TbExpMargRowsPerPage, 7),
|
||||||
columnsPerPage = ReadInt(NudExpMargColumnsPerPage, 3),
|
columnsPerPage = ReadInt(NudExpMargColumnsPerPage, 3),
|
||||||
fontSize = ReadDouble(NudExpMargFontSize),
|
fontSize = ReadDouble(NudExpMargFontSize),
|
||||||
smallFontSize = ReadDouble(NudExpMargSmallFontSize)
|
smallFontSize = ReadDouble(NudExpMargSmallFontSize),
|
||||||
|
|
||||||
|
rsKNrAbs = TbExpRnsKNrAbs.Text,
|
||||||
|
rsKNrEmp = TbExpRnsKNrEmp.Text,
|
||||||
|
rsZKZ = TbExpRnsZKZ.Text,
|
||||||
|
rsIntVer = TbExpRnsIntVer.Text,
|
||||||
|
rsLaufz = TbExpRnsLaufz.Text,
|
||||||
|
rsEinldat = TbExpRnsEinldat.Text,
|
||||||
|
rsAMANr = TbExpRnsAMANr.Text,
|
||||||
|
rsBundGew = TbExpRnsBundGew.Text,
|
||||||
|
rsPalNr = ReadInt(NudExpRnsPalNr, 1),
|
||||||
|
rsBundNrPal = ReadInt(NudExpRnsBundNrPal, 20)
|
||||||
};
|
};
|
||||||
|
|
||||||
Settings.Save();
|
Settings.Save();
|
||||||
|
|||||||
+24
-20
@@ -640,6 +640,8 @@ public class PdfBuilder
|
|||||||
string groupNo = result.Item2?.ToString() ?? "[PLZ]";
|
string groupNo = result.Item2?.ToString() ?? "[PLZ]";
|
||||||
string fraction = result.Item1?.ToString() ?? "[Fraktion]";
|
string fraction = result.Item1?.ToString() ?? "[Fraktion]";
|
||||||
|
|
||||||
|
var options = Settings._instance.pdfExport;
|
||||||
|
|
||||||
int total_frac = 0;
|
int total_frac = 0;
|
||||||
foreach (var item in grouped_nums)
|
foreach (var item in grouped_nums)
|
||||||
{
|
{
|
||||||
@@ -704,8 +706,8 @@ public class PdfBuilder
|
|||||||
|
|
||||||
// Values top row
|
// Values top row
|
||||||
gfx.DrawString(sender, fontText, XBrushes.Black, new XRect(x + 5, y + 20, c1 - 10, r1 - 22), XStringFormats.TopLeft);
|
gfx.DrawString(sender, fontText, XBrushes.Black, new XRect(x + 5, y + 20, c1 - 10, r1 - 22), XStringFormats.TopLeft);
|
||||||
gfx.DrawString("[Kunden-Nr. Absender]", fontText, XBrushes.Black, new XRect(x + c1 + 5, y + 20, c2 - 10, r1 - 22), XStringFormats.TopLeft);
|
gfx.DrawString(options.rsKNrAbs, fontText, XBrushes.Black, new XRect(x + c1 + 5, y + 20, c2 - 10, r1 - 22), XStringFormats.TopLeft);
|
||||||
gfx.DrawString("[ZKZ/Titel]", fontText, XBrushes.Black, new XRect(x + c1 + c2 + 5, y + 20, c3 - 10, r1 - 22), XStringFormats.TopLeft);
|
gfx.DrawString(options.rsZKZ, fontText, XBrushes.Black, new XRect(x + c1 + c2 + 5, y + 20, c3 - 10, r1 - 22), XStringFormats.TopLeft);
|
||||||
gfx.DrawString(amount, fontText, XBrushes.Black, new XRect(x + c1 + c2 + c3 + 5, y + 20, c4 - 10, r1 - 22), XStringFormats.TopLeft);
|
gfx.DrawString(amount, fontText, XBrushes.Black, new XRect(x + c1 + c2 + c3 + 5, y + 20, c4 - 10, r1 - 22), XStringFormats.TopLeft);
|
||||||
|
|
||||||
// Second row labels
|
// Second row labels
|
||||||
@@ -716,9 +718,9 @@ public class PdfBuilder
|
|||||||
|
|
||||||
// Second row values
|
// Second row values
|
||||||
gfx.DrawString(customerName, fontText, XBrushes.Black, new XRect(x + 5, y + r1 + 20, c1 - 10, r2 - 22), XStringFormats.TopLeft);
|
gfx.DrawString(customerName, fontText, XBrushes.Black, new XRect(x + 5, y + r1 + 20, c1 - 10, r2 - 22), XStringFormats.TopLeft);
|
||||||
gfx.DrawString("[Kunden-Nr. Einlieferer]", fontText, XBrushes.Black, new XRect(x + c1 + 5, y + r1 + 20, c2 - 10, r2 - 22), XStringFormats.TopLeft);
|
gfx.DrawString(options.rsKNrEmp, fontText, XBrushes.Black, new XRect(x + c1 + 5, y + r1 + 20, c2 - 10, r2 - 22), XStringFormats.TopLeft);
|
||||||
gfx.DrawString("[Interne Vermerke]", fontText, XBrushes.Black, new XRect(x + c1 + c2 + 5, y + r1 + 20, c3 - 10, r2 - 22), XStringFormats.TopLeft);
|
gfx.DrawString(options.rsIntVer, fontText, XBrushes.Black, new XRect(x + c1 + c2 + 5, y + r1 + 20, c3 - 10, r2 - 22), XStringFormats.TopLeft);
|
||||||
gfx.DrawString("[Laufzeit]", fontText, XBrushes.Black, new XRect(x + c1 + c2 + c3 + 5, y + r1 + 20, c4 - 10, r2 - 22), XStringFormats.TopLeft);
|
gfx.DrawString(options.rsLaufz, fontText, XBrushes.Black, new XRect(x + c1 + c2 + c3 + 5, y + r1 + 20, c4 - 10, r2 - 22), XStringFormats.TopLeft);
|
||||||
|
|
||||||
// Middle area
|
// Middle area
|
||||||
gfx.DrawString(groupNo, fontBig, XBrushes.Black,
|
gfx.DrawString(groupNo, fontBig, XBrushes.Black,
|
||||||
@@ -767,23 +769,23 @@ public class PdfBuilder
|
|||||||
double valueX = x + leftBottomW * 0.55;
|
double valueX = x + leftBottomW * 0.55;
|
||||||
double valueW = leftBottomW - (valueX - x) - 5;
|
double valueW = leftBottomW - (valueX - x) - 5;
|
||||||
|
|
||||||
gfx.DrawString("[Einlieferungsdatum]", fontText, XBrushes.Black,
|
gfx.DrawString(options.rsEinldat, fontText, XBrushes.Black,
|
||||||
new XRect(valueX, y + r1 + r2 + r3 + 4, valueW, 14),
|
new XRect(valueX, y + r1 + r2 + r3 + 4, valueW, 14),
|
||||||
XStringFormats.TopRight);
|
XStringFormats.TopRight);
|
||||||
|
|
||||||
gfx.DrawString("[AM-Auftragsnummer]", fontText, XBrushes.Black,
|
gfx.DrawString(options.rsAMANr, fontText, XBrushes.Black,
|
||||||
new XRect(valueX, blY1 + 4, valueW, 14),
|
new XRect(valueX, blY1 + 4, valueW, 14),
|
||||||
XStringFormats.TopRight);
|
XStringFormats.TopRight);
|
||||||
|
|
||||||
gfx.DrawString("[Bundgewicht]", fontText, XBrushes.Black,
|
gfx.DrawString(options.rsBundGew, fontText, XBrushes.Black,
|
||||||
new XRect(valueX, blY2 + 4, valueW, 14),
|
new XRect(valueX, blY2 + 4, valueW, 14),
|
||||||
XStringFormats.TopRight);
|
XStringFormats.TopRight);
|
||||||
|
|
||||||
gfx.DrawString("[Paletten-Nr.]", fontText, XBrushes.Black,
|
gfx.DrawString(options.rsPalNr.ToString(), fontText, XBrushes.Black,
|
||||||
new XRect(valueX, blY3 + 4, valueW, 14),
|
new XRect(valueX, blY3 + 4, valueW, 14),
|
||||||
XStringFormats.TopRight);
|
XStringFormats.TopRight);
|
||||||
|
|
||||||
gfx.DrawString("[Bund-Nr./Bunde auf Palette]", fontText, XBrushes.Black,
|
gfx.DrawString("[Paletten-Nr.]", fontText, XBrushes.Black,
|
||||||
new XRect(valueX, blY4 + 4, valueW, 14),
|
new XRect(valueX, blY4 + 4, valueW, 14),
|
||||||
XStringFormats.TopRight);
|
XStringFormats.TopRight);
|
||||||
|
|
||||||
@@ -978,6 +980,8 @@ public class PdfBuilder
|
|||||||
string groupNo = result.Item2?.ToString() ?? "[PLZ]";
|
string groupNo = result.Item2?.ToString() ?? "[PLZ]";
|
||||||
string fraction = result.Item1?.ToString() ?? "[Fraktion]";
|
string fraction = result.Item1?.ToString() ?? "[Fraktion]";
|
||||||
|
|
||||||
|
var options = Settings._instance.pdfExport;
|
||||||
|
|
||||||
int total_frac = 0;
|
int total_frac = 0;
|
||||||
foreach (var item in grouped_nums)
|
foreach (var item in grouped_nums)
|
||||||
{
|
{
|
||||||
@@ -1042,8 +1046,8 @@ public class PdfBuilder
|
|||||||
|
|
||||||
// Values top row
|
// Values top row
|
||||||
gfx.DrawString(sender, fontText, XBrushes.Black, new XRect(x + 5, y + 20, c1 - 10, r1 - 22), XStringFormats.TopLeft);
|
gfx.DrawString(sender, fontText, XBrushes.Black, new XRect(x + 5, y + 20, c1 - 10, r1 - 22), XStringFormats.TopLeft);
|
||||||
gfx.DrawString("[Kunden-Nr. Absender]", fontText, XBrushes.Black, new XRect(x + c1 + 5, y + 20, c2 - 10, r1 - 22), XStringFormats.TopLeft);
|
gfx.DrawString(options.rsKNrAbs, fontText, XBrushes.Black, new XRect(x + c1 + 5, y + 20, c2 - 10, r1 - 22), XStringFormats.TopLeft);
|
||||||
gfx.DrawString("[ZKZ/Titel]", fontText, XBrushes.Black, new XRect(x + c1 + c2 + 5, y + 20, c3 - 10, r1 - 22), XStringFormats.TopLeft);
|
gfx.DrawString(options.rsZKZ, fontText, XBrushes.Black, new XRect(x + c1 + c2 + 5, y + 20, c3 - 10, r1 - 22), XStringFormats.TopLeft);
|
||||||
gfx.DrawString(amount, fontText, XBrushes.Black, new XRect(x + c1 + c2 + c3 + 5, y + 20, c4 - 10, r1 - 22), XStringFormats.TopLeft);
|
gfx.DrawString(amount, fontText, XBrushes.Black, new XRect(x + c1 + c2 + c3 + 5, y + 20, c4 - 10, r1 - 22), XStringFormats.TopLeft);
|
||||||
|
|
||||||
// Second row labels
|
// Second row labels
|
||||||
@@ -1054,9 +1058,9 @@ public class PdfBuilder
|
|||||||
|
|
||||||
// Second row values
|
// Second row values
|
||||||
gfx.DrawString(customerName, fontText, XBrushes.Black, new XRect(x + 5, y + r1 + 20, c1 - 10, r2 - 22), XStringFormats.TopLeft);
|
gfx.DrawString(customerName, fontText, XBrushes.Black, new XRect(x + 5, y + r1 + 20, c1 - 10, r2 - 22), XStringFormats.TopLeft);
|
||||||
gfx.DrawString("[Kunden-Nr. Einlieferer]", fontText, XBrushes.Black, new XRect(x + c1 + 5, y + r1 + 20, c2 - 10, r2 - 22), XStringFormats.TopLeft);
|
gfx.DrawString(options.rsKNrEmp, fontText, XBrushes.Black, new XRect(x + c1 + 5, y + r1 + 20, c2 - 10, r2 - 22), XStringFormats.TopLeft);
|
||||||
gfx.DrawString("[Interne Vermerke]", fontText, XBrushes.Black, new XRect(x + c1 + c2 + 5, y + r1 + 20, c3 - 10, r2 - 22), XStringFormats.TopLeft);
|
gfx.DrawString(options.rsIntVer, fontText, XBrushes.Black, new XRect(x + c1 + c2 + 5, y + r1 + 20, c3 - 10, r2 - 22), XStringFormats.TopLeft);
|
||||||
gfx.DrawString("[Laufzeit]", fontText, XBrushes.Black, new XRect(x + c1 + c2 + c3 + 5, y + r1 + 20, c4 - 10, r2 - 22), XStringFormats.TopLeft);
|
gfx.DrawString(options.rsLaufz, fontText, XBrushes.Black, new XRect(x + c1 + c2 + c3 + 5, y + r1 + 20, c4 - 10, r2 - 22), XStringFormats.TopLeft);
|
||||||
|
|
||||||
// Middle area
|
// Middle area
|
||||||
gfx.DrawString(groupNo, fontBig, XBrushes.Black,
|
gfx.DrawString(groupNo, fontBig, XBrushes.Black,
|
||||||
@@ -1105,23 +1109,23 @@ public class PdfBuilder
|
|||||||
double valueX = x + leftBottomW * 0.55;
|
double valueX = x + leftBottomW * 0.55;
|
||||||
double valueW = leftBottomW - (valueX - x) - 5;
|
double valueW = leftBottomW - (valueX - x) - 5;
|
||||||
|
|
||||||
gfx.DrawString("[Einlieferungsdatum]", fontText, XBrushes.Black,
|
gfx.DrawString(options.rsEinldat, fontText, XBrushes.Black,
|
||||||
new XRect(valueX, y + r1 + r2 + r3 + 4, valueW, 14),
|
new XRect(valueX, y + r1 + r2 + r3 + 4, valueW, 14),
|
||||||
XStringFormats.TopRight);
|
XStringFormats.TopRight);
|
||||||
|
|
||||||
gfx.DrawString("[AM-Auftragsnummer]", fontText, XBrushes.Black,
|
gfx.DrawString(options.rsAMANr, fontText, XBrushes.Black,
|
||||||
new XRect(valueX, blY1 + 4, valueW, 14),
|
new XRect(valueX, blY1 + 4, valueW, 14),
|
||||||
XStringFormats.TopRight);
|
XStringFormats.TopRight);
|
||||||
|
|
||||||
gfx.DrawString("[Bundgewicht]", fontText, XBrushes.Black,
|
gfx.DrawString(options.rsBundGew, fontText, XBrushes.Black,
|
||||||
new XRect(valueX, blY2 + 4, valueW, 14),
|
new XRect(valueX, blY2 + 4, valueW, 14),
|
||||||
XStringFormats.TopRight);
|
XStringFormats.TopRight);
|
||||||
|
|
||||||
gfx.DrawString("[Paletten-Nr.]", fontText, XBrushes.Black,
|
gfx.DrawString(options.rsPalNr.ToString(), fontText, XBrushes.Black,
|
||||||
new XRect(valueX, blY3 + 4, valueW, 14),
|
new XRect(valueX, blY3 + 4, valueW, 14),
|
||||||
XStringFormats.TopRight);
|
XStringFormats.TopRight);
|
||||||
|
|
||||||
gfx.DrawString("[Bund-Nr./Bunde auf Palette]", fontText, XBrushes.Black,
|
gfx.DrawString("[Paletten-Nr.]", fontText, XBrushes.Black,
|
||||||
new XRect(valueX, blY4 + 4, valueW, 14),
|
new XRect(valueX, blY4 + 4, valueW, 14),
|
||||||
XStringFormats.TopRight);
|
XStringFormats.TopRight);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user