From 1cbc6c9bee7048d3546adebe87d96715630e7d59 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期二, 16 八月 2022 18:21:40 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- DBUtility/业务单据/Xt_BaseBillFun.cs | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 57 insertions(+), 1 deletions(-) diff --git "a/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/Xt_BaseBillFun.cs" "b/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/Xt_BaseBillFun.cs" index 12d414a..82acb8b 100644 --- "a/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/Xt_BaseBillFun.cs" +++ "b/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/Xt_BaseBillFun.cs" @@ -517,7 +517,50 @@ } } - + + + public static void GraphLine_XB(DataGridView grdMain, int MainIDCol, int SubIDCol, string s, ref long n) + { + long HMainID = 0; + bool b = false; + //循环所有行 + for (int i = 0; i < grdMain.RowCount; i++) + { + if (HMainID == 0) + { + HMainID = ClsPub.isLong(grdMain.Rows[i].Cells[MainIDCol].Value); + n++; + } + else + { + if (HMainID == ClsPub.isLong(grdMain.Rows[i].Cells[MainIDCol].Value)) + { + if (s == "否") + { + //区域性清空 + SetDataGrid(grdMain, i, MainIDCol + 1, i, SubIDCol - 1, ""); + + } + } + else + { + HMainID = ClsPub.isLong(grdMain.Rows[i].Cells[MainIDCol].Value); + b = !b; + n++; + } + } + if (b) + { + grdMain.Rows[i].DefaultCellStyle.BackColor = Color.Black; + } + else + { + grdMain.Rows[i].DefaultCellStyle.BackColor = Color.Black; + } + } + } + + //设置网格 public static void SetDataGrid(DataGridView grdMain, int BRow, int BCol, int ERow, int ECol, string sText) { @@ -531,6 +574,19 @@ } + //设置网格 + public static void SetDataGrid_XB(DataGridView grdMain, int BRow, int BCol, int ERow, int ECol, string sText) + { + for (int i = BRow; i <= ERow; i++) + { + for (int j = BCol; j <= ECol; j++) + { + grdMain.Rows[i].Cells[j].Value = DBNull.Value; + } + } + + } + //画网格下线 /// <summary> /// 画网格下线 -- Gitblit v1.9.1