SVN-Revision: r606
This commit is contained in:
tdx
2025-05-19 04:15:08 +00:00
parent 53d0dda482
commit fbd52f7749
2 changed files with 47 additions and 20 deletions
+16 -6
View File
@@ -305,14 +305,24 @@ namespace Lskj.Control
if (condition.Contains("COLUMN_NAME"))
{
// 解析期望的列名
string expectedColumnName = condition.Split('=').Last().Trim('\'');
// 构建直接的列名比较
cond = $"'{e.Column.Name}'='{expectedColumnName}'";
}
else
string pattern = @"('{?COLUMN_NAME}'?\s*=\s*'[^']*')";
var matches = Regex.Matches(condition, pattern, RegexOptions.IgnoreCase);
var results = new List<string>();
foreach (Match match in matches)
{
cond = ReplaceHelper.ReplaceRowParam(gridRow, item["condition"] + "").ReplaceColumnParam(e.Column.Name, e.Column.Caption, e.CellValue + "");
results.Add(match.Value);
}
string expectedColumnName = "";
if (results.Count > 0)
{
expectedColumnName = results[0].Split('=').Last().Trim('\'');
}
if (!expectedColumnName.Equals(e.Column.Name, StringComparison.OrdinalIgnoreCase))
{
continue;
}
}
cond = ReplaceHelper.ReplaceRowParam(gridRow, item["condition"] + "").ReplaceColumnParam(e.Column.Name, e.Column.Caption, e.CellValue + "");
try
{
if (!string.IsNullOrWhiteSpace(cond) && ReplaceHelper.EvalCond(cond) && (!string.IsNullOrEmpty(e.CellValue + "") || isLaterDatePresent))
+22 -5
View File
@@ -100,6 +100,7 @@ namespace Lskj.Control
//this.gcMain.OptionsBehavior.EnableFiltering = true;
//this.gcMain.OptionsFind.AlwaysVisible = true;
}
void gcMain_SelectionChanged(object sender, EventArgs e)
{
//try
@@ -305,7 +306,7 @@ namespace Lskj.Control
TreeListNode treeListNode1 = this.gcMain.Nodes.TreeList.FindNodeByID(treeListNode.Id);
if (treeListNode1 != null) treeListNode1.Expanded = true;
}
this.TreeListObj.FocusedNode = this.TreeListObj.GetNodeByVisibleIndex(lastNodeIndex);
if ((Expansion + "").Equals("1"))
{
this.gcMain.ExpandAll();
@@ -314,7 +315,10 @@ namespace Lskj.Control
{
this.gcMain.ExpandToLevel(0);
}
this.TreeListObj.FocusedNode = this.TreeListObj.GetNodeByVisibleIndex(lastNodeIndex);
else if ((Expansion + "").Equals("3"))
{
this.gcMain.CollapseAll();
}
//if (selectRowHandler)
//{
// this.TreeListObj.FocusedNode = this.TreeListObj.GetNodeByVisibleIndex(lastNodeIndex);
@@ -2203,8 +2207,18 @@ namespace Lskj.Control
GetTreeExpanded();
this.gcMain.DataSource = dataSet.Tables[0];
if ((Expansion + "").Equals("1"))
{
this.gcMain.ExpandAll();
}
else if ((Expansion + "").Equals("2"))
{
this.gcMain.ExpandToLevel(0);
}
else if ((Expansion + "").Equals("3"))
{
this.gcMain.CollapseAll();
}
return dataSet.Tables[0] != null ? dataSet.Tables[0].Rows.Count : 0;
}
/// <summary>
@@ -3043,12 +3057,15 @@ namespace Lskj.Control
}
this.SetGridViewDataSource(table);
}
if ((Expansion + "").Equals("1"))
{
this.gcMain.ExpandAll();
}
else if ((Expansion + "").Equals("2"))
{
this.gcMain.ExpandToLevel(0);
}
else if ((Expansion + "").Equals("3"))
{
this.gcMain.CollapseAll();
}