|
@@ -1311,6 +1311,13 @@ namespace UAS_LabelMachine
|
|
|
FirstDT.Columns.RemoveAt(i);
|
|
|
}
|
|
|
}
|
|
|
+ if (box[j].Name == "FirstPage_BOXCODE" && !box[j].Checked)
|
|
|
+ {
|
|
|
+ if (FirstDT.Columns[i].ColumnName.ToLower().Contains("ch_pbcode"))
|
|
|
+ {
|
|
|
+ FirstDT.Columns.RemoveAt(i);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
columnNum = FirstDT.Columns.Count;
|
|
@@ -1392,6 +1399,7 @@ namespace UAS_LabelMachine
|
|
|
row1.GetCell(j - 4).CellStyle = styleborder;
|
|
|
if (FirstDT.Columns[j].ColumnName == "num")
|
|
|
{
|
|
|
+ row1.Cells[j - 4].SetCellValue(int.Parse(Data));
|
|
|
sumCount += int.Parse(Data);
|
|
|
}
|
|
|
if (FirstDT.Columns[j].ColumnName == "io_qty")
|
|
@@ -2454,6 +2462,13 @@ namespace UAS_LabelMachine
|
|
|
FirstDT.Columns.RemoveAt(i);
|
|
|
}
|
|
|
}
|
|
|
+ if (box[j].Name == "FirstPage_BOXCODE" && !box[j].Checked)
|
|
|
+ {
|
|
|
+ if (FirstDT.Columns[i].ColumnName.ToLower().Contains("ch_pbcode"))
|
|
|
+ {
|
|
|
+ FirstDT.Columns.RemoveAt(i);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
columnNum = FirstDT.Columns.Count;
|
|
@@ -2536,6 +2551,7 @@ namespace UAS_LabelMachine
|
|
|
row1.GetCell(j - 4).CellStyle = styleborder;
|
|
|
if (FirstDT.Columns[j].ColumnName == "num")
|
|
|
{
|
|
|
+ row1.Cells[j - 4].SetCellValue(int.Parse(Data));
|
|
|
sumCount += int.Parse(Data);
|
|
|
}
|
|
|
if (FirstDT.Columns[j].ColumnName == "io_qty")
|
|
@@ -2603,6 +2619,8 @@ namespace UAS_LabelMachine
|
|
|
string 片 = "";
|
|
|
string companyname = "";
|
|
|
int ShowBoxIndex = 0;
|
|
|
+
|
|
|
+ string LastBox = "";
|
|
|
if (dh.getFieldDataByCondition("ProdInout", "pi_exporttype", "pi_inoutno='" + Inoutno + "'").ToString() == "Chinese")
|
|
|
{
|
|
|
小计 = "小计";
|
|
@@ -2840,7 +2858,7 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
else if (j == ShowBoxIndex - 4)
|
|
|
{
|
|
|
- row1.Cells[j].SetCellValue(DataTable.Rows[i - 1]["ch_pbcode"].ToString());
|
|
|
+ row1.Cells[j].SetCellValue(LastBox);
|
|
|
row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
row1.Cells[j].CellStyle = styleborder;
|
|
@@ -2864,7 +2882,7 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
else if (j == ShowBoxIndex - 4)
|
|
|
{
|
|
|
- row1.Cells[j].SetCellValue(DataTable.Rows[i - 1]["ch_pbcode"].ToString());
|
|
|
+ row1.Cells[j].SetCellValue(LastBox);
|
|
|
row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
row1.Cells[j].CellStyle = styleborder;
|
|
@@ -3013,6 +3031,10 @@ namespace UAS_LabelMachine
|
|
|
sheet.AutoSizeColumn(j - 4);
|
|
|
sheet.SetColumnWidth(j - 4, sheet.GetColumnWidth(j - 4) + 1000);
|
|
|
}
|
|
|
+ if (DataTable.Columns[j].ColumnName.ToLower() == "ch_pbcode")
|
|
|
+ {
|
|
|
+ LastBox = Data;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (i == rowNum - 1)
|
|
@@ -3045,7 +3067,7 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
else if (j == ShowBoxIndex - 4)
|
|
|
{
|
|
|
- row1.Cells[j].SetCellValue(DataTable.Rows[i - 1]["ch_pbcode"].ToString());
|
|
|
+ row1.Cells[j].SetCellValue(LastBox);
|
|
|
row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
else if (j == ShowCountIndex)
|
|
@@ -3071,7 +3093,7 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
else if (j == ShowBoxIndex - 4)
|
|
|
{
|
|
|
- row1.Cells[j].SetCellValue(DataTable.Rows[i - 1]["ch_pbcode"].ToString());
|
|
|
+ row1.Cells[j].SetCellValue(LastBox);
|
|
|
row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
else if (j == ShowCountIndex)
|
|
@@ -3146,7 +3168,7 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
else if (j == ShowBoxIndex - 4)
|
|
|
{
|
|
|
- row1.Cells[j].SetCellValue(DataTable.Rows[i - 1]["ch_pbcode"].ToString());
|
|
|
+ row1.Cells[j].SetCellValue(LastBox);
|
|
|
row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
else
|
|
@@ -3176,7 +3198,7 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
else if (j == ShowBoxIndex - 4)
|
|
|
{
|
|
|
- row1.Cells[j].SetCellValue(DataTable.Rows[i - 1]["ch_pbcode"].ToString());
|
|
|
+ row1.Cells[j].SetCellValue(LastBox);
|
|
|
row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
else
|
|
@@ -3329,6 +3351,10 @@ namespace UAS_LabelMachine
|
|
|
sheet.AutoSizeColumn(j - 4);
|
|
|
sheet.SetColumnWidth(j - 4, sheet.GetColumnWidth(j - 4) + 1000);
|
|
|
}
|
|
|
+ if (DataTable.Columns[j].ColumnName.ToLower() == "ch_pbcode")
|
|
|
+ {
|
|
|
+ LastBox = Data;
|
|
|
+ }
|
|
|
}
|
|
|
if (i == rowNum - 1)
|
|
|
{
|
|
@@ -3450,7 +3476,7 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
else if (j == ShowBoxIndex - 4)
|
|
|
{
|
|
|
- row1.Cells[j].SetCellValue(DataTable.Rows[i - 1]["ch_pbcode"].ToString());
|
|
|
+ row1.Cells[j].SetCellValue(LastBox);
|
|
|
row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
else
|
|
@@ -3480,7 +3506,7 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
else if (j == ShowBoxIndex - 4)
|
|
|
{
|
|
|
- row1.Cells[j].SetCellValue(DataTable.Rows[i - 1]["ch_pbcode"].ToString());
|
|
|
+ row1.Cells[j].SetCellValue(LastBox);
|
|
|
row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
else
|
|
@@ -3632,6 +3658,10 @@ namespace UAS_LabelMachine
|
|
|
sheet.AutoSizeColumn(j - 4);
|
|
|
sheet.SetColumnWidth(j - 4, sheet.GetColumnWidth(j - 4) + 1000);
|
|
|
}
|
|
|
+ if (DataTable.Columns[j].ColumnName.ToLower() == "ch_pbcode")
|
|
|
+ {
|
|
|
+ LastBox = Data;
|
|
|
+ }
|
|
|
}
|
|
|
if (i == rowNum - 1)
|
|
|
{
|
|
@@ -3658,7 +3688,7 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
else if (j == ShowBoxIndex - 4)
|
|
|
{
|
|
|
- row1.Cells[j].SetCellValue(DataTable.Rows[i - 1]["ch_pbcode"].ToString());
|
|
|
+ row1.Cells[j].SetCellValue(LastBox);
|
|
|
row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
else
|
|
@@ -3688,7 +3718,7 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
else if (j == ShowBoxIndex - 4)
|
|
|
{
|
|
|
- row1.Cells[j].SetCellValue(DataTable.Rows[i - 1]["ch_pbcode"].ToString());
|
|
|
+ row1.Cells[j].SetCellValue(LastBox);
|
|
|
row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
else
|
|
@@ -3773,6 +3803,13 @@ namespace UAS_LabelMachine
|
|
|
FirstDT.Columns.RemoveAt(i);
|
|
|
}
|
|
|
}
|
|
|
+ if (box[j].Name == "FirstPage_BOXCODE" && !box[j].Checked)
|
|
|
+ {
|
|
|
+ if (FirstDT.Columns[i].ColumnName.ToLower().Contains("ch_pbcode"))
|
|
|
+ {
|
|
|
+ FirstDT.Columns.RemoveAt(i);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
columnNum = FirstDT.Columns.Count;
|
|
@@ -3854,6 +3891,7 @@ namespace UAS_LabelMachine
|
|
|
row1.GetCell(j - 4).CellStyle = styleborder;
|
|
|
if (FirstDT.Columns[j].ColumnName == "num")
|
|
|
{
|
|
|
+ row1.Cells[j - 4].SetCellValue(int.Parse(Data));
|
|
|
sumCount += int.Parse(Data);
|
|
|
}
|
|
|
if (FirstDT.Columns[j].ColumnName == "io_qty")
|