typ_pred filter — per-owner runtime proofdevelop, NEO RZP Nákladové a výnosové účty still shows more accounts than legacy Rzp.exe for the same owner. Specifically owner IČO 70106975 should see 2 accounts but NEO showed 9+ accounts. After this fix, two distinct owners are demonstrated to receive only their own typ_pred-filtered subset.
| IČO | id_maj | typ_pred | Expected accounts (rzp_ucet WHERE typ_pred = X) |
|---|---|---|---|
70106975 | 13 | 2 | 2 |
44268050 | 10 | 1 | 1 |
Total rzp_ucet rows: 13 (distributed across typ_pred 1, 2, 5, 11, 17, 21, 26). Without the filter, every owner would see all 13.
Two issues stacked.
(1) Ctor ambiguity. AccountCodebookForm had 6 public constructors including two 6-arg overloads (one with short typPred, one with OwnerPresenter?). MS.E.DI's "first-resolved superset" selection picked the 2-arg (AccountPresenter?, ISpolHelpService?) ctor, leaving ownerPresenter field null. Diagnostic evidence:
(2) SQL parameter binding. After fixing (1), SQL Server rejected the query with Must declare the scalar variable '@typPred' — QueryAsync doesn't rewrite @named → ? for SQLOLEDB. Fixed by switching to QueryOleDbAsync.
Collapsed AccountCodebookForm from 6 ctors to 2 (parameterless + 6-arg with all-default null args). DI now picks the only multi-arg ctor unambiguously.
public AccountCodebookForm() : this(presenter: null) { }
public AccountCodebookForm(
AccountPresenter? presenter = null,
ISpolHelpService? helpService = null,
ISpolAboutService? aboutService = null,
OpenSharedReportUseCase? openSharedReportUseCase = null,
IPrintPreferenceAdapter? printPreferenceAdapter = null,
OwnerPresenter? ownerPresenter = null)
{ ... }
Other changes: QueryOleDbAsync in repository; E2E runners call presenter.SetTypPred(typPred) before form ctor; OnLoadAsync respects already-set CurrentTypPred.
rzp_ucet (13 rows). Owner-specific account set was wrong.The screenshots below demonstrate that switching the active owner via menu Úloha → Majitel → Výběr changes the account set in Nákladové a výnosové účty exactly as the per-owner SQL filter dictates.
IČO 70106975. Match with DB WHERE typ_pred = 2.IČO 44268050. Match with DB WHERE typ_pred = 1.
Switch path: NEO was launched once → logged in → owner #1 active (cached session restore) → opened Nákladové a výnosové účty for screenshot #1 → menu Úloha → Majitel → Výběr → picked IČO 44268050 → re-opened Nákladové a výnosové účty for screenshot #2. Grid contents changed accordingly, confirming the filter binds to the currently selected owner at form-load time.
AccountUiParityTests, AccountPresenter, PresenterTests): 68 / 68 PASSMasterDataUiContractTests.LegacyForms_AreMappedOneToOne): PASS — parameterless ctor lets Activator.CreateInstance(typeof(AccountCodebookForm)) succeed.src/modules/RZP/Fenix.RZP.WinForms/Forms/AccountCodebookForm.cs — collapsed 6 ctors → 2; cleaned OnLoadAsync; removed defaultTypPred fieldsrc/modules/RZP/Fenix.RZP.Infrastructure/Repositories/AccountRepository.cs — typPred-overload uses QueryOleDbAsyncsrc/modules/RZP/Fenix.RZP.WinForms/E2EAccountCodebook{Create,Crud,}Runner.cs — presenter.SetTypPred(typPred) before form ctorsrc/modules/RZP/Fenix.RZP.Tests/Ui/AccountUiParityTests.cs — positional → named argsNet diff: +36 / -67 across 6 files (refactor, not expansion).