SVN r606
SVN-Revision: r606
This commit is contained in:
@@ -305,14 +305,24 @@ namespace Lskj.Control
|
|||||||
if (condition.Contains("COLUMN_NAME"))
|
if (condition.Contains("COLUMN_NAME"))
|
||||||
{
|
{
|
||||||
// 解析期望的列名
|
// 解析期望的列名
|
||||||
string expectedColumnName = condition.Split('=').Last().Trim('\'');
|
string pattern = @"('{?COLUMN_NAME}'?\s*=\s*'[^']*')";
|
||||||
// 构建直接的列名比较
|
var matches = Regex.Matches(condition, pattern, RegexOptions.IgnoreCase);
|
||||||
cond = $"'{e.Column.Name}'='{expectedColumnName}'";
|
var results = new List<string>();
|
||||||
}
|
foreach (Match match in matches)
|
||||||
else
|
|
||||||
{
|
{
|
||||||
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
|
try
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrWhiteSpace(cond) && ReplaceHelper.EvalCond(cond) && (!string.IsNullOrEmpty(e.CellValue + "") || isLaterDatePresent))
|
if (!string.IsNullOrWhiteSpace(cond) && ReplaceHelper.EvalCond(cond) && (!string.IsNullOrEmpty(e.CellValue + "") || isLaterDatePresent))
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ namespace Lskj.Control
|
|||||||
//this.gcMain.OptionsBehavior.EnableFiltering = true;
|
//this.gcMain.OptionsBehavior.EnableFiltering = true;
|
||||||
//this.gcMain.OptionsFind.AlwaysVisible = true;
|
//this.gcMain.OptionsFind.AlwaysVisible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gcMain_SelectionChanged(object sender, EventArgs e)
|
void gcMain_SelectionChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
//try
|
//try
|
||||||
@@ -305,7 +306,7 @@ namespace Lskj.Control
|
|||||||
TreeListNode treeListNode1 = this.gcMain.Nodes.TreeList.FindNodeByID(treeListNode.Id);
|
TreeListNode treeListNode1 = this.gcMain.Nodes.TreeList.FindNodeByID(treeListNode.Id);
|
||||||
if (treeListNode1 != null) treeListNode1.Expanded = true;
|
if (treeListNode1 != null) treeListNode1.Expanded = true;
|
||||||
}
|
}
|
||||||
|
this.TreeListObj.FocusedNode = this.TreeListObj.GetNodeByVisibleIndex(lastNodeIndex);
|
||||||
if ((Expansion + "").Equals("1"))
|
if ((Expansion + "").Equals("1"))
|
||||||
{
|
{
|
||||||
this.gcMain.ExpandAll();
|
this.gcMain.ExpandAll();
|
||||||
@@ -314,7 +315,10 @@ namespace Lskj.Control
|
|||||||
{
|
{
|
||||||
this.gcMain.ExpandToLevel(0);
|
this.gcMain.ExpandToLevel(0);
|
||||||
}
|
}
|
||||||
this.TreeListObj.FocusedNode = this.TreeListObj.GetNodeByVisibleIndex(lastNodeIndex);
|
else if ((Expansion + "").Equals("3"))
|
||||||
|
{
|
||||||
|
this.gcMain.CollapseAll();
|
||||||
|
}
|
||||||
//if (selectRowHandler)
|
//if (selectRowHandler)
|
||||||
//{
|
//{
|
||||||
// this.TreeListObj.FocusedNode = this.TreeListObj.GetNodeByVisibleIndex(lastNodeIndex);
|
// this.TreeListObj.FocusedNode = this.TreeListObj.GetNodeByVisibleIndex(lastNodeIndex);
|
||||||
@@ -2203,8 +2207,18 @@ namespace Lskj.Control
|
|||||||
|
|
||||||
GetTreeExpanded();
|
GetTreeExpanded();
|
||||||
this.gcMain.DataSource = dataSet.Tables[0];
|
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;
|
return dataSet.Tables[0] != null ? dataSet.Tables[0].Rows.Count : 0;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -3043,12 +3057,15 @@ namespace Lskj.Control
|
|||||||
}
|
}
|
||||||
this.SetGridViewDataSource(table);
|
this.SetGridViewDataSource(table);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Expansion + "").Equals("1"))
|
if ((Expansion + "").Equals("1"))
|
||||||
{
|
{
|
||||||
this.gcMain.ExpandAll();
|
this.gcMain.ExpandAll();
|
||||||
}
|
}
|
||||||
else if ((Expansion + "").Equals("2"))
|
else if ((Expansion + "").Equals("2"))
|
||||||
|
{
|
||||||
|
this.gcMain.ExpandToLevel(0);
|
||||||
|
}
|
||||||
|
else if ((Expansion + "").Equals("3"))
|
||||||
{
|
{
|
||||||
this.gcMain.CollapseAll();
|
this.gcMain.CollapseAll();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user