SVN r606
SVN-Revision: r606
This commit is contained in:
@@ -305,14 +305,24 @@ namespace Lskj.Control
|
||||
if (condition.Contains("COLUMN_NAME"))
|
||||
{
|
||||
// 解析期望的列名
|
||||
string expectedColumnName = condition.Split('=').Last().Trim('\'');
|
||||
// 构建直接的列名比较
|
||||
cond = $"'{e.Column.Name}'='{expectedColumnName}'";
|
||||
}
|
||||
else
|
||||
{
|
||||
cond = ReplaceHelper.ReplaceRowParam(gridRow, item["condition"] + "").ReplaceColumnParam(e.Column.Name, e.Column.Caption, e.CellValue + "");
|
||||
string pattern = @"('{?COLUMN_NAME}'?\s*=\s*'[^']*')";
|
||||
var matches = Regex.Matches(condition, pattern, RegexOptions.IgnoreCase);
|
||||
var results = new List<string>();
|
||||
foreach (Match match in matches)
|
||||
{
|
||||
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))
|
||||
@@ -2394,7 +2404,7 @@ namespace Lskj.Control
|
||||
}
|
||||
|
||||
}
|
||||
public void OnShowFilterPopupCheckedListBox(object sender, DevExpress.XtraGrid.Views.Grid.FilterPopupCheckedListBoxEventArgs e)
|
||||
public void OnShowFilterPopupCheckedListBox(object sender, DevExpress.XtraGrid.Views.Grid.FilterPopupCheckedListBoxEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user