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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user