|
|
|
@@ -0,0 +1,96 @@
|
|
|
|
|
# 173/174 Popup Contains Filtering Implementation Plan
|
|
|
|
|
|
|
|
|
|
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
|
|
|
|
|
|
|
|
|
**Goal:** Make the DevExpress auto-filter row in 173/174 extended-return result popups use contains matching instead of starts-with matching.
|
|
|
|
|
|
|
|
|
|
**Architecture:** Keep the shared popup and query flow unchanged. Set `GridColumn.OptionsFilter.AutoFilterCondition` when each host dynamically creates result columns, following the existing `AutoFilterCondition.Contains` pattern already used elsewhere in Lskj.Control.
|
|
|
|
|
|
|
|
|
|
**Tech Stack:** C# on .NET Framework 4.0, WinForms, DevExpress GridControl/GridView.
|
|
|
|
|
|
|
|
|
|
## Global Constraints
|
|
|
|
|
|
|
|
|
|
- Work in `E:\lserp_project\lserp_cs_6.0` on `main` and preserve unrelated work.
|
|
|
|
|
- Do not change database search SQL, search-column selection, ResultFields mapping, clear, selection, or display translation behavior.
|
|
|
|
|
- Apply the behavior to both MyControl and GridControlEx 173/174 popup result columns.
|
|
|
|
|
- Do not add dependencies or require a framework newer than .NET Framework 4.0.
|
|
|
|
|
- Do not push unless the user explicitly requests it.
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
### Task 1: Set dynamic popup result columns to contains filtering
|
|
|
|
|
|
|
|
|
|
**Files:**
|
|
|
|
|
- Modify: `插件库/Lskj.Control/AutoGridLookUp/LabelExtendedReturnSearchEdit.cs`
|
|
|
|
|
- Modify: `插件库/Lskj.Control/GridControlEx.ExtendedReturn.cs`
|
|
|
|
|
|
|
|
|
|
**Interfaces:**
|
|
|
|
|
- Consumes: DevExpress `GridColumn.OptionsFilter.AutoFilterCondition` and `DevExpress.XtraGrid.Columns.AutoFilterCondition.Contains`.
|
|
|
|
|
- Produces: Contains-based local auto-filter behavior for every visible and hidden dynamic result column in both popup hosts.
|
|
|
|
|
|
|
|
|
|
- [ ] **Step 1: Run the failing structural contract**
|
|
|
|
|
|
|
|
|
|
Run from the repository root:
|
|
|
|
|
|
|
|
|
|
```powershell
|
|
|
|
|
$formPath = '插件库\Lskj.Control\AutoGridLookUp\LabelExtendedReturnSearchEdit.cs'
|
|
|
|
|
$gridPath = '插件库\Lskj.Control\GridControlEx.ExtendedReturn.cs'
|
|
|
|
|
$form = Get-Content -LiteralPath $formPath -Raw
|
|
|
|
|
$grid = Get-Content -LiteralPath $gridPath -Raw
|
|
|
|
|
$setting = 'column.OptionsFilter.AutoFilterCondition = AutoFilterCondition.Contains;'
|
|
|
|
|
if (-not $form.Contains($setting)) { throw 'MyControl result columns do not use contains filtering.' }
|
|
|
|
|
if (-not $grid.Contains($setting)) { throw 'GridControlEx result columns do not use contains filtering.' }
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Expected: fail on the MyControl assertion because neither dynamic result-column loop currently sets the condition.
|
|
|
|
|
|
|
|
|
|
- [ ] **Step 2: Implement the minimal per-column setting**
|
|
|
|
|
|
|
|
|
|
In `LabelExtendedReturnSearchEdit.ConfigureResultColumns`, immediately after assigning `column.Visible`, add:
|
|
|
|
|
|
|
|
|
|
```csharp
|
|
|
|
|
column.OptionsFilter.AutoFilterCondition = AutoFilterCondition.Contains;
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
In `GridControlEx.ConfigureExtendedReturnViewColumns`, immediately after assigning `column.Visible`, add the identical line:
|
|
|
|
|
|
|
|
|
|
```csharp
|
|
|
|
|
column.OptionsFilter.AutoFilterCondition = AutoFilterCondition.Contains;
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Both files already import `DevExpress.XtraGrid.Columns`, so no new using directive is needed.
|
|
|
|
|
|
|
|
|
|
- [ ] **Step 3: Re-run the structural contract**
|
|
|
|
|
|
|
|
|
|
Run the exact PowerShell contract from Step 1.
|
|
|
|
|
|
|
|
|
|
Expected: exit code `0` with no exception.
|
|
|
|
|
|
|
|
|
|
- [ ] **Step 4: Compile the dependency chain in isolation**
|
|
|
|
|
|
|
|
|
|
Upload `/Users/langsukeji/Documents/MyApps/lserp_project/codex_compile_project.ps1` to `E:\lserp_project\codex_compile_project.ps1`. Create `E:\lserp_project\lserp_cs_6.0\DebugCodexFilterContains`, copy `Debug\*.dll` into it, then invoke the helper for these projects in order, using the temporary directory as both `DebugDirectory` and the output DLL directory:
|
|
|
|
|
|
|
|
|
|
1. `插件库\Lskj.Model\Lskj.Model.csproj`
|
|
|
|
|
2. `插件库\Lskj.Util\Lskj.Util.csproj`
|
|
|
|
|
3. `插件库\Lskj.Business\Lskj.Business.csproj`
|
|
|
|
|
4. `插件库\Lskj.Control\Lskj.Control.csproj`
|
|
|
|
|
|
|
|
|
|
Expected: all compiler exits are `0`; the existing `CS2023 /noconfig` warning is acceptable.
|
|
|
|
|
|
|
|
|
|
Delete the uploaded helper and `DebugCodexFilterContains` after compilation.
|
|
|
|
|
|
|
|
|
|
- [ ] **Step 5: Inspect and commit only the two source files**
|
|
|
|
|
|
|
|
|
|
```bat
|
|
|
|
|
git diff --check
|
|
|
|
|
git add -- "插件库/Lskj.Control/AutoGridLookUp/LabelExtendedReturnSearchEdit.cs" "插件库/Lskj.Control/GridControlEx.ExtendedReturn.cs"
|
|
|
|
|
git diff --cached --check
|
|
|
|
|
git commit -m "fix(control): use contains filtering in extended lookup"
|
|
|
|
|
git status --short
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Expected: commit succeeds and the working tree is clean.
|
|
|
|
|
|
|
|
|
|
- [ ] **Step 6: Hand off runtime verification**
|
|
|
|
|
|
|
|
|
|
Ask the user to verify both MyControl and GridControlEx 173/174 popups by entering a middle substring such as `板` into the auto-filter row for a value such as `钢板/Q235B`. Do not push automatically.
|