yangle
2022-08-16 1cbc6c9bee7048d3546adebe87d96715630e7d59
DBUtility/ÒµÎñµ¥¾Ý/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>
        /// ç”»ç½‘格下线