From da09eba67bf5fcbf6e2c8419458094b0feddaf7d Mon Sep 17 00:00:00 2001 From: wyf Date: Thu, 19 Jun 2025 13:44:12 +0000 Subject: [PATCH] SVN r764 SVN-Revision: r764 --- 插件库/Lskj.Control/GridControlEx.cs | 34 ++++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/插件库/Lskj.Control/GridControlEx.cs b/插件库/Lskj.Control/GridControlEx.cs index 3d5456c..5df4d85 100644 --- a/插件库/Lskj.Control/GridControlEx.cs +++ b/插件库/Lskj.Control/GridControlEx.cs @@ -3364,7 +3364,7 @@ namespace Lskj.Control timeEdit.DisplayFormat.FormatString = timeEdit.EditFormat.FormatString = timeEdit.Mask.EditMask = DateFormat.Format(fieldType); timeEdit.DisplayFormat.FormatType = timeEdit.EditFormat.FormatType = DevExpress.Utils.FormatType.Custom; - + gridControl.RepositoryItems.Add(timeEdit); gridColumn.ColumnEdit = timeEdit; @@ -4185,16 +4185,16 @@ namespace Lskj.Control { // 获取当前选中的行和列 - int rowHandle = this.gridView.FocusedRowHandle; - string rightid = this.gridView.GetRowCellValue(rowHandle, unionright)+""; + //int rowHandle = this.gridView.FocusedRowHandle; + //string rightid = this.gridView.GetRowCellValue(rowHandle, unionright) + ""; - if (!string.IsNullOrEmpty(rightid)) + if (!string.IsNullOrEmpty(unionright)) { if (OnAfterLinkCilk != null) { - this.OnAfterLinkCilk(rightid, null);//直接调用新增行方法,添加关联数据 + this.OnAfterLinkCilk(unionright, null);//直接调用新增行方法,添加关联数据 } - + } } } @@ -4208,7 +4208,7 @@ namespace Lskj.Control { // 获取对应的 RepositoryItem RepositoryItemHyperLinkEdit repositoryItem = linkEdit.Properties as RepositoryItemHyperLinkEdit; - if (repositoryItem != null) + if (repositoryItem != null) { GridColumnModel model = repositoryItem.Tag as GridColumnModel; urlName = model.ValueMember; @@ -5952,7 +5952,7 @@ namespace Lskj.Control { this.lblTotal.Text = string.Format(ResourceKeys.GridTotalDisplayText, count, string.Format("{0:" + dataFormat + "}", Convert.ToDecimal(sum)), string.Format("{0:" + dataFormat + "}", Convert.ToDecimal(avg)), string.Format("{0:" + dataFormat + "}", Convert.ToDecimal(max)), string.Format("{0:" + dataFormat + "}", Convert.ToDecimal(min))); } - + } } @@ -7853,7 +7853,7 @@ namespace Lskj.Control /// /// 修改字段 /// 必填字段 - public virtual void SetFieldStatus(string ModifyFields, string RequiredFields,DataTable AuthorityTable=null) + public virtual void SetFieldStatus(string ModifyFields, string RequiredFields, DataTable AuthorityTable = null) { GridColumnCollection gc = this.GridView.Columns; @@ -7878,7 +7878,7 @@ namespace Lskj.Control //修改 if (Modify && ModifyFields.IndexOf(item.FieldName + ",", StringComparison.OrdinalIgnoreCase) != -1) { - if (!string.IsNullOrWhiteSpace(model.PrivilegeOper)&& AuthorityTable!=null) + if (!string.IsNullOrWhiteSpace(model.PrivilegeOper) && AuthorityTable != null) { List targetPrivTypeIds = new List(); foreach (string permission in model.PrivilegeOper.Split(',')) @@ -7892,7 +7892,7 @@ namespace Lskj.Control .Where(value => value != null) .ToList()); if (!userString.Split(',').Contains(ERPInfo.Instance.UserName)) continue; - + } @@ -8479,7 +8479,7 @@ namespace Lskj.Control /// 新建汇总 /// /// - public void AddHeadquarters(DataRow dataRow=null) + public void AddHeadquarters(DataRow dataRow = null) { try { @@ -8487,14 +8487,14 @@ namespace Lskj.Control this.gridView.CellValueChanged -= onCellValueChanged;//生成计划颜色判断事件 foreach (GridColumn gridColumn in this.gridView.Columns) { - + if (gridColumn.Summary.ActiveCount > 0) { if (gridColumn.Summary.ActiveCount == 1 && dataRow == null) { jhrowitem = null; continue; - } + } GridColumnSummaryItem sumItem = new GridColumnSummaryItem(); if (gridColumn.Summary.ActiveCount == 1) { @@ -8507,7 +8507,7 @@ namespace Lskj.Control //清空所有汇总 gridColumn.Summary.Clear(); //新建汇总 - if (dataRow != null) + if (dataRow != null) { GridColumnSummaryItem sumItemNew = new GridColumnSummaryItem(); sumItemNew.SummaryType = DevExpress.Data.SummaryItemType.Max; @@ -8517,10 +8517,10 @@ namespace Lskj.Control gridColumn.Summary.Add(sumItemNew); } gridColumn.Summary.Add(sumItem); - } + } } jhrowitem = dataRow; - if(jhrowitem!=null) + if (jhrowitem != null) { this.gridView.CellValueChanged += onCellValueChanged;//生成计划颜色判断事件 }