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,17 +2404,17 @@ 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
|
||||
{
|
||||
|
||||
|
||||
BandedGridView gridView = (BandedGridView)sender;
|
||||
|
||||
|
||||
string actStr = this.bandedGridView.ActiveFilterString;//获取筛选条件
|
||||
string[] actStr_list = actStr.Split(new string[] { "And" }, StringSplitOptions.None);
|
||||
DataTable datatable = new DataTable();
|
||||
|
||||
|
||||
|
||||
if ((!actStr_list[0].Contains(e.Column.FieldName) || (this.bandedGridView.OptionsView.ShowAutoFilterRow && e.Column.FilterInfo.Type == ColumnFilterType.AutoFilter)) && actStr != "")
|
||||
{
|
||||
@@ -2514,9 +2524,9 @@ namespace Lskj.Control
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (!SystemInfo.Instance.DisableFilteringQuantity)
|
||||
|
||||
if (!SystemInfo.Instance.DisableFilteringQuantity)
|
||||
{
|
||||
DataTable filterTable = gridView.GetGridViewFilteredAndSortedDataToDataTable();
|
||||
DataRow[] dataRowArray = filterTable.Select();
|
||||
@@ -2543,7 +2553,7 @@ namespace Lskj.Control
|
||||
}
|
||||
//多表头在使用自带的搜索功能时(ctrl+f),筛选框无法过滤搜索后的内容,根据判断是否有搜索值去手动过滤
|
||||
bool isSearch = !string.IsNullOrWhiteSpace(gridView.FindFilterText);
|
||||
if (isSearch)
|
||||
if (isSearch)
|
||||
{
|
||||
e.CheckedComboBox.Items.Clear();
|
||||
for (int i = 0; i < _Items.Count; i++)
|
||||
@@ -2554,7 +2564,7 @@ namespace Lskj.Control
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -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