瀏覽代碼

修改首页分页方式视图

callm 5 年之前
父節點
當前提交
a5a0374905

+ 9 - 2
UAS-出货标签管理(贸易版)/ExportExcel.cs

@@ -166,9 +166,16 @@ namespace UAS_LabelMachine
                 {
                     es_field += SQL_.Rows[i]["es_filed"].ToString() + ",";
                 }
-                //首页信息的DataTable
                 sql.Clear();
-                sql.Append("select " + es_field.Substring(0, es_field.Length - 1) + "  from FIRSTPAGE_BATCH_VIEW where pi_inoutno='" + inoutno + "'");
+                //首页信息的DataTable
+                if (BoxCode.Checked)
+                {
+                    sql.Append("select " + es_field.Substring(0, es_field.Length - 1) + "  from FIRSTPAGE_Box_VIEW where pi_inoutno='" + inoutno + "'");
+                }
+                else
+                {
+                    sql.Append("select " + es_field.Substring(0, es_field.Length - 1) + "  from FIRSTPAGE_BATCH_VIEW where pi_inoutno='" + inoutno + "'");
+                }
                 DataTable dt1 = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
                 for (int i = 0; i < dt1.Columns.Count; i++)
                 {

+ 1 - 1
UAS-出货标签管理(贸易版)/PublicMethod/ExcelHandler.cs

@@ -3481,7 +3481,7 @@ namespace UAS_LabelMachine
                             PageNum = 0;
                         }
                         //每次到了页数开始分页
-                        if (LastBatchCode == "" || (LastBatchCode != "" && LastBatchCode != DataTable.Rows[i]["ch_splitbatch"].ToString()) || i == rowNum - 1)
+                        if (LastBatchCode == "" || (LastBatchCode != "" && LastBatchCode != DataTable.Rows[i]["ch_splitbatch"].ToString()) || (i == rowNum - 1 && (LastBatchCode != "" && LastBatchCode != DataTable.Rows[i]["ch_splitbatch"].ToString())))
                         {
                             LastBatchCode = DataTable.Rows[i]["ch_splitbatch"].ToString();
                             //第一行添加客户信息