duhe
2023-10-30 662b935c9c27fb7f104ce49e5297d34e4bf8895c
委外加工单:打印只显示表格最后一行数据问题解决
2个文件已修改
28 ■■■■ 已修改文件
BLL/系统公用CLS/GridppReport.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WorkM/车间管理/WW_EntrustWorkOrderBill.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BLL/ϵͳ¹«ÓÃCLS/GridppReport.cs
@@ -326,12 +326,25 @@
            grd2.RowCount = 1;
            grd2.ColumnCount = 0;
            int iCol = 0;
            //记录grd中的非空行数,并用于设置grd2的行数
            int grd2RowCount = 0;
            int grd2RowIndex = 0;           //作为xiang
            for (int j = 0; j < grd.RowCount; j++) //循环网格1,
            {
                if (DBUtility.ClsPub.isStrNull(grd.Rows[j].Cells[FindCol].Value) != "")//是否空行
                {
                    grd2RowCount = grd2RowCount + 1;
                }
            }
            grd2.RowCount = grd2RowCount;
            for (int j = 0; j < grd.RowCount; j++) //循环网格1,
            {
                iCol = 0;
                if (DBUtility.ClsPub.isStrNull(grd.Rows[j].Cells[FindCol].Value) != "")//是否空行
                {
                    grd2.RowCount = grd2.RowCount + 1;
                    for (int i = FixCols; i < grd.Columns.Count; ++i)
                    {
                        foreach (IGRField fld in Report.DetailGrid.Recordset.Fields) //从记录集中找到 ç›¸åŒå­—段名
@@ -345,11 +358,14 @@
                                    grd2.Columns[grd2.Columns.Count - 1].HeaderText = fld.Name;
                                }
                                if (DBUtility.ClsPub.isStrNull(grd.Rows[j].Cells[i + FixCols].Value) != "")
                                    grd2.Rows[j].Cells[iCol - 1].Value = DBUtility.ClsPub.isStrNull(grd.Rows[j].Cells[i + FixCols].Value);
                                {
                                    grd2.Rows[grd2RowIndex].Cells[iCol - 1].Value = DBUtility.ClsPub.isStrNull(grd.Rows[j].Cells[i + FixCols].Value);
                            }
                        }
                    }
                }
                    grd2RowIndex = grd2RowIndex + 1;
                }
            }
            //将grd2的数据写入 è®°å½•集
            for (int i = FixCols; i < grd2.Columns.Count; ++i)
WorkM/³µ¼ä¹ÜÀí/WW_EntrustWorkOrderBill.cs
@@ -1454,9 +1454,11 @@
        {
            Report.FieldByName("单据号").AsString = txtHBillNo.Text;
            Report.FieldByName("日期").AsString = dtpHDate.Value.ToString();
            Report.FieldByName("部门").AsString = txtHDeptID.Text;
            Report.FieldByName("业务员").AsString = txtHSupID.Text;
            Report.FieldByName("表头备注").AsString = txtHRemark.Text;
            Report.FieldByName("申请部门").AsString = txtHDeptID.Text;
            Report.FieldByName("外协供应商").AsString = txtHSupID.Text;
            Report.FieldByName("订单跟踪号").AsString = txtHOrderProcNO.Text;
            Report.FieldByName("审核人").AsString = txtHChecker.Text;
            Report.FieldByName("制单人").AsString = txtHMaker.Text;
        }
        //赋值表体
        private void ReportFetchRecordByDataTable()