|
@@ -268,7 +268,7 @@ namespace UAS_LabelMachine
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
/// <param name="DataTable"></param>
|
|
/// <param name="DataTable"></param>
|
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
|
- public MemoryStream DataTableToExcel1(DataTable FirstDT, DataTable DataTable, string Type,string Inoutno, int PageSize, List<CheckBox> conditionbox)
|
|
|
|
|
|
|
+ public MemoryStream DataTableToExcel1(DataTable FirstDT, DataTable DataTable, string Type, string Inoutno, int PageSize, List<CheckBox> conditionbox)
|
|
|
{
|
|
{
|
|
|
//转换为序列
|
|
//转换为序列
|
|
|
CheckBox[] box = conditionbox.ToArray();
|
|
CheckBox[] box = conditionbox.ToArray();
|
|
@@ -364,7 +364,7 @@ namespace UAS_LabelMachine
|
|
|
IRow row = sheet.CreateRow(0);
|
|
IRow row = sheet.CreateRow(0);
|
|
|
//冻结第一行
|
|
//冻结第一行
|
|
|
sheet.CreateFreezePane(0, 1, 0, 1);
|
|
sheet.CreateFreezePane(0, 1, 0, 1);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
row.HeightInPoints = RowHeight;
|
|
row.HeightInPoints = RowHeight;
|
|
|
//固定第一行
|
|
//固定第一行
|
|
|
//row.RowStyle.IsLocked=true;
|
|
//row.RowStyle.IsLocked=true;
|
|
@@ -439,7 +439,7 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
{
|
|
|
row1.Cells[j].SetCellValue("小计");
|
|
row1.Cells[j].SetCellValue("小计");
|
|
|
}
|
|
}
|
|
|
- else if (DataTable.Columns[j].ColumnName=="io_qty")
|
|
|
|
|
|
|
+ else if (DataTable.Columns[j].ColumnName == "io_qty")
|
|
|
{
|
|
{
|
|
|
row1.Cells[NumIndex - 4].SetCellValue(sumCount);
|
|
row1.Cells[NumIndex - 4].SetCellValue(sumCount);
|
|
|
}
|
|
}
|
|
@@ -447,7 +447,7 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
}
|
|
|
sumCount = 0;
|
|
sumCount = 0;
|
|
|
row1 = sheet.CreateRow(PaintIndex);
|
|
row1 = sheet.CreateRow(PaintIndex);
|
|
|
- sheet.SetRowBreak(PaintIndex-1);
|
|
|
|
|
|
|
+ sheet.SetRowBreak(PaintIndex - 1);
|
|
|
PaintIndex = PaintIndex + 1;
|
|
PaintIndex = PaintIndex + 1;
|
|
|
}
|
|
}
|
|
|
//每次到了页数开始分页
|
|
//每次到了页数开始分页
|
|
@@ -487,7 +487,7 @@ namespace UAS_LabelMachine
|
|
|
if (j == 0)
|
|
if (j == 0)
|
|
|
{
|
|
{
|
|
|
row1.CreateCell(j);
|
|
row1.CreateCell(j);
|
|
|
- row1.Cells[j].SetCellValue(DataTable.Rows[i]["pr_orispeccode"].ToString()+ DataTable.Rows[i]["me_desc"].ToString() + DataTable.Rows[i]["pr_size"].ToString());
|
|
|
|
|
|
|
+ row1.Cells[j].SetCellValue(DataTable.Rows[i]["pr_orispeccode"].ToString() + DataTable.Rows[i]["me_desc"].ToString() + DataTable.Rows[i]["pr_size"].ToString());
|
|
|
}
|
|
}
|
|
|
else if (columnNum > 5 && j == columnNum - 5)
|
|
else if (columnNum > 5 && j == columnNum - 5)
|
|
|
{
|
|
{
|
|
@@ -529,7 +529,7 @@ namespace UAS_LabelMachine
|
|
|
NumIndex = j;
|
|
NumIndex = j;
|
|
|
}
|
|
}
|
|
|
//如果chw_itemname1的值为空,则值为100和0,其中一列不显示,不显示
|
|
//如果chw_itemname1的值为空,则值为100和0,其中一列不显示,不显示
|
|
|
- if (DataTable.Columns[j].ColumnName.ToLower().Contains("chw_itemname") || DataTable.Columns[j].ColumnName.ToLower().Contains("pr_orispeccode") || DataTable.Columns[j].ColumnName.ToLower().Contains("pd_ordercode") || DataTable.Columns[j].ColumnName.ToLower().Contains("pr_size") || DataTable.Columns[j].ColumnName.ToLower().Contains("me_desc")||(!ShowChcode && DataTable.Columns[j].ColumnName.ToLower().Contains("ch_code")))
|
|
|
|
|
|
|
+ if (DataTable.Columns[j].ColumnName.ToLower().Contains("chw_itemname") || DataTable.Columns[j].ColumnName.ToLower().Contains("pr_orispeccode") || DataTable.Columns[j].ColumnName.ToLower().Contains("pd_ordercode") || DataTable.Columns[j].ColumnName.ToLower().Contains("pr_size") || DataTable.Columns[j].ColumnName.ToLower().Contains("me_desc") || (!ShowChcode && DataTable.Columns[j].ColumnName.ToLower().Contains("ch_code")))
|
|
|
{
|
|
{
|
|
|
sheet.SetColumnHidden(j - 4, true);
|
|
sheet.SetColumnHidden(j - 4, true);
|
|
|
}
|
|
}
|
|
@@ -579,7 +579,7 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
{
|
|
|
row1.Cells[j].SetCellValue("小计");
|
|
row1.Cells[j].SetCellValue("小计");
|
|
|
}
|
|
}
|
|
|
- else if (DataTable.Columns[j].ColumnName=="io_qty")
|
|
|
|
|
|
|
+ else if (DataTable.Columns[j].ColumnName == "io_qty")
|
|
|
{
|
|
{
|
|
|
row1.Cells[j - 4].SetCellValue(sumCount);
|
|
row1.Cells[j - 4].SetCellValue(sumCount);
|
|
|
}
|
|
}
|
|
@@ -967,7 +967,7 @@ namespace UAS_LabelMachine
|
|
|
row1.Cells[j].CellStyle = styleborder;
|
|
row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
}
|
|
|
row1 = sheet.CreateRow(PaintIndex);
|
|
row1 = sheet.CreateRow(PaintIndex);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
for (int j = 0; j < columnNum - 3; j++)
|
|
for (int j = 0; j < columnNum - 3; j++)
|
|
|
{
|
|
{
|
|
|
if (j == 0)
|
|
if (j == 0)
|
|
@@ -1019,7 +1019,10 @@ namespace UAS_LabelMachine
|
|
|
default:
|
|
default:
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
- dh.BatchInsert("update prodiobarcode set pib_outboxcode1=:pib_outboxcode1 where pib_inoutno='"+ Inoutno + "' and pib_custbarcode=:pib_custbarcode",new string[] { "pib_outboxcode1", "pib_custbarcode" },pib_outboxcode1.ToArray(), ch_code.ToArray());
|
|
|
|
|
|
|
+ dh.BatchInsert("update prodiobarcode set pib_outboxcode1=:pib_outboxcode1 where pib_inoutno='" + Inoutno + "' and pib_custbarcode=:pib_custbarcode", new string[] { "pib_outboxcode1", "pib_custbarcode" }, pib_outboxcode1.ToArray(), ch_code.ToArray());
|
|
|
|
|
+ //删除下载链接再重新插入
|
|
|
|
|
+ dh.ExecuteSql("delete from ProdDownLink where pl_inoutno='" + Inoutno + "'", "delete");
|
|
|
|
|
+ dh.ExecuteSql("insert into ProdDownLink(pl_inoutno,pl_outboxcode) select distinct '" + Inoutno + "',pib_outboxcode1 from prodiobarcode where pib_inoutno='" + Inoutno + "'", "insert");
|
|
|
//填充首页
|
|
//填充首页
|
|
|
sumCount = 0;
|
|
sumCount = 0;
|
|
|
totalCount = 0;
|
|
totalCount = 0;
|