# QueryInst

Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 14328) END FROM WidgetInst WHERE WidgetInstId = 14328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14337;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 14285) END FROM WidgetInst WHERE WidgetInstId = 14285) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14326) END FROM WidgetInst WHERE WidgetInstId = 14326)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14338;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 14328) END FROM WidgetInst WHERE WidgetInstId = 14328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14341;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 14328) END FROM WidgetInst WHERE WidgetInstId = 14328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14342;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14344) END FROM WidgetInst WHERE WidgetInstId = 14344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14345;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 14328) END FROM WidgetInst WHERE WidgetInstId = 14328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14347;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 14328) END FROM WidgetInst WHERE WidgetInstId = 14328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14348;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 14344) END FROM WidgetInst WHERE WidgetInstId = 14344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14349;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 14328) END FROM WidgetInst WHERE WidgetInstId = 14328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14351;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 14328) END FROM WidgetInst WHERE WidgetInstId = 14328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14352;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 14285) END FROM WidgetInst WHERE WidgetInstId = 14285) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14353;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 14285) END FROM WidgetInst WHERE WidgetInstId = 14285) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14356;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14389) END FROM WidgetInst WHERE WidgetInstId = 14389) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14390;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14389) END FROM WidgetInst WHERE WidgetInstId = 14389) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14392;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14389) END FROM WidgetInst WHERE WidgetInstId = 14389) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14394;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 14285) END FROM WidgetInst WHERE WidgetInstId = 14285) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14396;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14405) END FROM WidgetInst WHERE WidgetInstId = 14405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14406;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14405) END FROM WidgetInst WHERE WidgetInstId = 14405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14408;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14405) END FROM WidgetInst WHERE WidgetInstId = 14405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14410;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 14285) END FROM WidgetInst WHERE WidgetInstId = 14285) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14412;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14425) END FROM WidgetInst WHERE WidgetInstId = 14425) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14426;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14425) END FROM WidgetInst WHERE WidgetInstId = 14425) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14425) END FROM WidgetInst WHERE WidgetInstId = 14425) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14430;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 14285) END FROM WidgetInst WHERE WidgetInstId = 14285) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 14445) END FROM WidgetInst WHERE WidgetInstId = 14445) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14446;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 14445) END FROM WidgetInst WHERE WidgetInstId = 14445) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14448;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 14445) END FROM WidgetInst WHERE WidgetInstId = 14445) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14450;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14451) END FROM WidgetInst WHERE WidgetInstId = 14451) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 14445) END FROM WidgetInst WHERE WidgetInstId = 14445)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14452;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14451) END FROM WidgetInst WHERE WidgetInstId = 14451) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 14445) END FROM WidgetInst WHERE WidgetInstId = 14445)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14454;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14451) END FROM WidgetInst WHERE WidgetInstId = 14451) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 14445) END FROM WidgetInst WHERE WidgetInstId = 14445)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14456;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 14285) END FROM WidgetInst WHERE WidgetInstId = 14285) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14458;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 14460) END FROM WidgetInst WHERE WidgetInstId = 14460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14461;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14460) END FROM WidgetInst WHERE WidgetInstId = 14460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14464;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 14460) END FROM WidgetInst WHERE WidgetInstId = 14460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14467;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 14460) END FROM WidgetInst WHERE WidgetInstId = 14460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14478;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 14285) END FROM WidgetInst WHERE WidgetInstId = 14285) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14481;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 14484) END FROM WidgetInst WHERE WidgetInstId = 14484) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14485;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14484) END FROM WidgetInst WHERE WidgetInstId = 14484) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14488;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 14484) END FROM WidgetInst WHERE WidgetInstId = 14484) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14491;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 14484) END FROM WidgetInst WHERE WidgetInstId = 14484) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14502;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 14506) END FROM WidgetInst WHERE WidgetInstId = 14506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14507;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 14506) END FROM WidgetInst WHERE WidgetInstId = 14506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14509;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 14506) END FROM WidgetInst WHERE WidgetInstId = 14506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14511;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 14506) END FROM WidgetInst WHERE WidgetInstId = 14506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14513;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 14506) END FROM WidgetInst WHERE WidgetInstId = 14506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14515;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 14506) END FROM WidgetInst WHERE WidgetInstId = 14506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14517;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 14285) END FROM WidgetInst WHERE WidgetInstId = 14285) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 12938) END FROM WidgetInst WHERE WidgetInstId = 12938)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14519;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 14521) END FROM WidgetInst WHERE WidgetInstId = 14521) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14522;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 14526;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 14526;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 14526;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 14526;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 14526;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 14526;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 14526) END FROM WidgetInst WHERE WidgetInstId = 14526) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14527;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 14529) END FROM WidgetInst WHERE WidgetInstId = 14529) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14530;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 14526) END FROM WidgetInst WHERE WidgetInstId = 14526) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14532;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 12935) END FROM WidgetInst WHERE WidgetInstId = 12935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14538;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 12935) END FROM WidgetInst WHERE WidgetInstId = 12935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14541;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 14526) END FROM WidgetInst WHERE WidgetInstId = 14526) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14544;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 14546) END FROM WidgetInst WHERE WidgetInstId = 14546) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14547;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14546) END FROM WidgetInst WHERE WidgetInstId = 14546) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14550;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 14526) END FROM WidgetInst WHERE WidgetInstId = 14526) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14553;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 14555) END FROM WidgetInst WHERE WidgetInstId = 14555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14556;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14555) END FROM WidgetInst WHERE WidgetInstId = 14555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14559;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 14555) END FROM WidgetInst WHERE WidgetInstId = 14555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14562;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 14526) END FROM WidgetInst WHERE WidgetInstId = 14526) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14565;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 14526) END FROM WidgetInst WHERE WidgetInstId = 14526) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 14567) END FROM WidgetInst WHERE WidgetInstId = 14567)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14570;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 14569) END FROM WidgetInst WHERE WidgetInstId = 14569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14573;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 14569) END FROM WidgetInst WHERE WidgetInstId = 14569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14574;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 14569) END FROM WidgetInst WHERE WidgetInstId = 14569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14577;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 14569) END FROM WidgetInst WHERE WidgetInstId = 14569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14578;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 14526) END FROM WidgetInst WHERE WidgetInstId = 14526) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14567) END FROM WidgetInst WHERE WidgetInstId = 14567)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14579;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 14569) END FROM WidgetInst WHERE WidgetInstId = 14569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14582;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 14569) END FROM WidgetInst WHERE WidgetInstId = 14569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14583;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14585) END FROM WidgetInst WHERE WidgetInstId = 14585) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14586;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 14569) END FROM WidgetInst WHERE WidgetInstId = 14569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14588;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 14569) END FROM WidgetInst WHERE WidgetInstId = 14569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14589;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 14585) END FROM WidgetInst WHERE WidgetInstId = 14585) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14590;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 14569) END FROM WidgetInst WHERE WidgetInstId = 14569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14592;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 14569) END FROM WidgetInst WHERE WidgetInstId = 14569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14593;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 14526) END FROM WidgetInst WHERE WidgetInstId = 14526) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14594;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 14526) END FROM WidgetInst WHERE WidgetInstId = 14526) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14597;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14630) END FROM WidgetInst WHERE WidgetInstId = 14630) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14631;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14630) END FROM WidgetInst WHERE WidgetInstId = 14630) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14633;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14630) END FROM WidgetInst WHERE WidgetInstId = 14630) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14635;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 14526) END FROM WidgetInst WHERE WidgetInstId = 14526) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14637;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14646) END FROM WidgetInst WHERE WidgetInstId = 14646) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14647;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14646) END FROM WidgetInst WHERE WidgetInstId = 14646) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14649;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14646) END FROM WidgetInst WHERE WidgetInstId = 14646) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14651;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 14526) END FROM WidgetInst WHERE WidgetInstId = 14526) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14653;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14666) END FROM WidgetInst WHERE WidgetInstId = 14666) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14667;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14666) END FROM WidgetInst WHERE WidgetInstId = 14666) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14669;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14666) END FROM WidgetInst WHERE WidgetInstId = 14666) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14671;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 14526) END FROM WidgetInst WHERE WidgetInstId = 14526) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14673;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 14686) END FROM WidgetInst WHERE WidgetInstId = 14686) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14687;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 14686) END FROM WidgetInst WHERE WidgetInstId = 14686) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14689;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 14686) END FROM WidgetInst WHERE WidgetInstId = 14686) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14691;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14692) END FROM WidgetInst WHERE WidgetInstId = 14692) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 14686) END FROM WidgetInst WHERE WidgetInstId = 14686)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14693;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14692) END FROM WidgetInst WHERE WidgetInstId = 14692) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 14686) END FROM WidgetInst WHERE WidgetInstId = 14686)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14695;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14692) END FROM WidgetInst WHERE WidgetInstId = 14692) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 14686) END FROM WidgetInst WHERE WidgetInstId = 14686)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14697;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 14526) END FROM WidgetInst WHERE WidgetInstId = 14526) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14699;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 14701) END FROM WidgetInst WHERE WidgetInstId = 14701) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14702;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14701) END FROM WidgetInst WHERE WidgetInstId = 14701) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14705;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 14701) END FROM WidgetInst WHERE WidgetInstId = 14701) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14708;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 14701) END FROM WidgetInst WHERE WidgetInstId = 14701) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14719;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 14526) END FROM WidgetInst WHERE WidgetInstId = 14526) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14722;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 14725) END FROM WidgetInst WHERE WidgetInstId = 14725) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14726;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14725) END FROM WidgetInst WHERE WidgetInstId = 14725) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14729;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 14725) END FROM WidgetInst WHERE WidgetInstId = 14725) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14732;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 14725) END FROM WidgetInst WHERE WidgetInstId = 14725) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14743;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 14747) END FROM WidgetInst WHERE WidgetInstId = 14747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14748;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 14747) END FROM WidgetInst WHERE WidgetInstId = 14747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14750;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 14747) END FROM WidgetInst WHERE WidgetInstId = 14747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14752;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 14747) END FROM WidgetInst WHERE WidgetInstId = 14747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14754;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 14747) END FROM WidgetInst WHERE WidgetInstId = 14747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14756;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 14747) END FROM WidgetInst WHERE WidgetInstId = 14747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14758;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 14526) END FROM WidgetInst WHERE WidgetInstId = 14526) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 12938) END FROM WidgetInst WHERE WidgetInstId = 12938)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14760;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 14762) END FROM WidgetInst WHERE WidgetInstId = 14762) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14763;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 14767;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 14767;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 14767;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 14767;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 14767;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 14767;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 14767) END FROM WidgetInst WHERE WidgetInstId = 14767) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14768;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 14770) END FROM WidgetInst WHERE WidgetInstId = 14770) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14771;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 14767) END FROM WidgetInst WHERE WidgetInstId = 14767) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14773;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 12935) END FROM WidgetInst WHERE WidgetInstId = 12935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14783;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 12935) END FROM WidgetInst WHERE WidgetInstId = 12935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14786;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 14767) END FROM WidgetInst WHERE WidgetInstId = 14767) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14789;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 14791) END FROM WidgetInst WHERE WidgetInstId = 14791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14792;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14791) END FROM WidgetInst WHERE WidgetInstId = 14791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14795;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 14767) END FROM WidgetInst WHERE WidgetInstId = 14767) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14798;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 14800) END FROM WidgetInst WHERE WidgetInstId = 14800) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14801;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14800) END FROM WidgetInst WHERE WidgetInstId = 14800) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14804;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 14800) END FROM WidgetInst WHERE WidgetInstId = 14800) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14807;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 14767) END FROM WidgetInst WHERE WidgetInstId = 14767) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14810;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 14767) END FROM WidgetInst WHERE WidgetInstId = 14767) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 14812) END FROM WidgetInst WHERE WidgetInstId = 14812)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14815;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 14814) END FROM WidgetInst WHERE WidgetInstId = 14814) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14818;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 14814) END FROM WidgetInst WHERE WidgetInstId = 14814) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14819;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 14814) END FROM WidgetInst WHERE WidgetInstId = 14814) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14822;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 14814) END FROM WidgetInst WHERE WidgetInstId = 14814) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14823;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 14767) END FROM WidgetInst WHERE WidgetInstId = 14767) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14812) END FROM WidgetInst WHERE WidgetInstId = 14812)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14824;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 14814) END FROM WidgetInst WHERE WidgetInstId = 14814) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14827;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 14814) END FROM WidgetInst WHERE WidgetInstId = 14814) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14828;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14830) END FROM WidgetInst WHERE WidgetInstId = 14830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14831;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 14814) END FROM WidgetInst WHERE WidgetInstId = 14814) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14833;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 14814) END FROM WidgetInst WHERE WidgetInstId = 14814) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14834;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 14830) END FROM WidgetInst WHERE WidgetInstId = 14830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14835;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 14814) END FROM WidgetInst WHERE WidgetInstId = 14814) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14837;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 14814) END FROM WidgetInst WHERE WidgetInstId = 14814) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14838;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 14767) END FROM WidgetInst WHERE WidgetInstId = 14767) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14839;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 14767) END FROM WidgetInst WHERE WidgetInstId = 14767) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14842;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14879) END FROM WidgetInst WHERE WidgetInstId = 14879) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14880;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14879) END FROM WidgetInst WHERE WidgetInstId = 14879) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14882;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14879) END FROM WidgetInst WHERE WidgetInstId = 14879) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14884;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 14767) END FROM WidgetInst WHERE WidgetInstId = 14767) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14886;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14899) END FROM WidgetInst WHERE WidgetInstId = 14899) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14900;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14899) END FROM WidgetInst WHERE WidgetInstId = 14899) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14902;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14899) END FROM WidgetInst WHERE WidgetInstId = 14899) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14904;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 14767) END FROM WidgetInst WHERE WidgetInstId = 14767) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14906;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14923) END FROM WidgetInst WHERE WidgetInstId = 14923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14924;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14923) END FROM WidgetInst WHERE WidgetInstId = 14923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14926;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14923) END FROM WidgetInst WHERE WidgetInstId = 14923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14928;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 14767) END FROM WidgetInst WHERE WidgetInstId = 14767) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14930;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 14947) END FROM WidgetInst WHERE WidgetInstId = 14947) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14948;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 14947) END FROM WidgetInst WHERE WidgetInstId = 14947) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14950;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 14947) END FROM WidgetInst WHERE WidgetInstId = 14947) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14952;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14953) END FROM WidgetInst WHERE WidgetInstId = 14953) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 14947) END FROM WidgetInst WHERE WidgetInstId = 14947)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14954;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14953) END FROM WidgetInst WHERE WidgetInstId = 14953) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 14947) END FROM WidgetInst WHERE WidgetInstId = 14947)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14956;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14953) END FROM WidgetInst WHERE WidgetInstId = 14953) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 14947) END FROM WidgetInst WHERE WidgetInstId = 14947)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14958;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 14767) END FROM WidgetInst WHERE WidgetInstId = 14767) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14960;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 14962) END FROM WidgetInst WHERE WidgetInstId = 14962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14963;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14962) END FROM WidgetInst WHERE WidgetInstId = 14962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14966;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 14962) END FROM WidgetInst WHERE WidgetInstId = 14962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14969;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 14962) END FROM WidgetInst WHERE WidgetInstId = 14962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14980;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 14767) END FROM WidgetInst WHERE WidgetInstId = 14767) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14983;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 14990) END FROM WidgetInst WHERE WidgetInstId = 14990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14991;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14990) END FROM WidgetInst WHERE WidgetInstId = 14990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14994;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 14990) END FROM WidgetInst WHERE WidgetInstId = 14990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14997;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 14990) END FROM WidgetInst WHERE WidgetInstId = 14990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15008;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 15012) END FROM WidgetInst WHERE WidgetInstId = 15012) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15013;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 15012) END FROM WidgetInst WHERE WidgetInstId = 15012) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15015;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 15012) END FROM WidgetInst WHERE WidgetInstId = 15012) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15017;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 15012) END FROM WidgetInst WHERE WidgetInstId = 15012) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15019;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 15012) END FROM WidgetInst WHERE WidgetInstId = 15012) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15021;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 15012) END FROM WidgetInst WHERE WidgetInstId = 15012) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15023;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 14767) END FROM WidgetInst WHERE WidgetInstId = 14767) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 12938) END FROM WidgetInst WHERE WidgetInstId = 12938)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15025;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 15027) END FROM WidgetInst WHERE WidgetInstId = 15027) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15028;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 15032;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 15032;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 15032;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 15032;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 15032;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 15032;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 15032) END FROM WidgetInst WHERE WidgetInstId = 15032) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15033;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 15035) END FROM WidgetInst WHERE WidgetInstId = 15035) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15036;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 15032) END FROM WidgetInst WHERE WidgetInstId = 15032) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15038;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 12935) END FROM WidgetInst WHERE WidgetInstId = 12935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15048;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 12935) END FROM WidgetInst WHERE WidgetInstId = 12935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15051;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 15032) END FROM WidgetInst WHERE WidgetInstId = 15032) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15054;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15056) END FROM WidgetInst WHERE WidgetInstId = 15056) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15057;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15056) END FROM WidgetInst WHERE WidgetInstId = 15056) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15060;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 15032) END FROM WidgetInst WHERE WidgetInstId = 15032) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15063;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15065) END FROM WidgetInst WHERE WidgetInstId = 15065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15066;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15065) END FROM WidgetInst WHERE WidgetInstId = 15065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15069;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 15065) END FROM WidgetInst WHERE WidgetInstId = 15065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15072;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15032) END FROM WidgetInst WHERE WidgetInstId = 15032) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15075;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15032) END FROM WidgetInst WHERE WidgetInstId = 15032) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15077) END FROM WidgetInst WHERE WidgetInstId = 15077)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15080;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 15079) END FROM WidgetInst WHERE WidgetInstId = 15079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15083;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 15079) END FROM WidgetInst WHERE WidgetInstId = 15079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15084;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 15079) END FROM WidgetInst WHERE WidgetInstId = 15079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15087;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 15079) END FROM WidgetInst WHERE WidgetInstId = 15079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15088;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15032) END FROM WidgetInst WHERE WidgetInstId = 15032) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15077) END FROM WidgetInst WHERE WidgetInstId = 15077)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15089;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 15079) END FROM WidgetInst WHERE WidgetInstId = 15079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15092;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 15079) END FROM WidgetInst WHERE WidgetInstId = 15079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15093;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15095) END FROM WidgetInst WHERE WidgetInstId = 15095) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15096;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 15079) END FROM WidgetInst WHERE WidgetInstId = 15079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15098;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 15079) END FROM WidgetInst WHERE WidgetInstId = 15079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15099;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 15095) END FROM WidgetInst WHERE WidgetInstId = 15095) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15100;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 15079) END FROM WidgetInst WHERE WidgetInstId = 15079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15102;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 15079) END FROM WidgetInst WHERE WidgetInstId = 15079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15103;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 15032) END FROM WidgetInst WHERE WidgetInstId = 15032) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15104;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 15032) END FROM WidgetInst WHERE WidgetInstId = 15032) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15107;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15144) END FROM WidgetInst WHERE WidgetInstId = 15144) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15145;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15144) END FROM WidgetInst WHERE WidgetInstId = 15144) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15147;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15144) END FROM WidgetInst WHERE WidgetInstId = 15144) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15149;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 15032) END FROM WidgetInst WHERE WidgetInstId = 15032) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15151;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15164) END FROM WidgetInst WHERE WidgetInstId = 15164) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15165;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15164) END FROM WidgetInst WHERE WidgetInstId = 15164) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15167;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15164) END FROM WidgetInst WHERE WidgetInstId = 15164) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15169;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 15032) END FROM WidgetInst WHERE WidgetInstId = 15032) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15171;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15188) END FROM WidgetInst WHERE WidgetInstId = 15188) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15189;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15188) END FROM WidgetInst WHERE WidgetInstId = 15188) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15191;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15188) END FROM WidgetInst WHERE WidgetInstId = 15188) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15193;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 15032) END FROM WidgetInst WHERE WidgetInstId = 15032) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15195;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 15212) END FROM WidgetInst WHERE WidgetInstId = 15212) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15213;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 15212) END FROM WidgetInst WHERE WidgetInstId = 15212) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15215;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 15212) END FROM WidgetInst WHERE WidgetInstId = 15212) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15217;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15218) END FROM WidgetInst WHERE WidgetInstId = 15218) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 15212) END FROM WidgetInst WHERE WidgetInstId = 15212)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15219;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15218) END FROM WidgetInst WHERE WidgetInstId = 15218) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 15212) END FROM WidgetInst WHERE WidgetInstId = 15212)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15221;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15218) END FROM WidgetInst WHERE WidgetInstId = 15218) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 15212) END FROM WidgetInst WHERE WidgetInstId = 15212)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15223;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 15032) END FROM WidgetInst WHERE WidgetInstId = 15032) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15225;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15227) END FROM WidgetInst WHERE WidgetInstId = 15227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15228;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15227) END FROM WidgetInst WHERE WidgetInstId = 15227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15231;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 15227) END FROM WidgetInst WHERE WidgetInstId = 15227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15234;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 15227) END FROM WidgetInst WHERE WidgetInstId = 15227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15245;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 15032) END FROM WidgetInst WHERE WidgetInstId = 15032) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15248;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15255) END FROM WidgetInst WHERE WidgetInstId = 15255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15256;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15255) END FROM WidgetInst WHERE WidgetInstId = 15255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15259;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 15255) END FROM WidgetInst WHERE WidgetInstId = 15255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15262;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 15255) END FROM WidgetInst WHERE WidgetInstId = 15255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15273;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 15277) END FROM WidgetInst WHERE WidgetInstId = 15277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15278;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 15277) END FROM WidgetInst WHERE WidgetInstId = 15277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15280;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 15277) END FROM WidgetInst WHERE WidgetInstId = 15277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15282;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 15277) END FROM WidgetInst WHERE WidgetInstId = 15277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15284;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 15277) END FROM WidgetInst WHERE WidgetInstId = 15277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15286;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 15277) END FROM WidgetInst WHERE WidgetInstId = 15277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15288;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 15032) END FROM WidgetInst WHERE WidgetInstId = 15032) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 12938) END FROM WidgetInst WHERE WidgetInstId = 12938)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15290;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 15292) END FROM WidgetInst WHERE WidgetInstId = 15292) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15293;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 15305) END FROM WidgetInst WHERE WidgetInstId = 15305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15306;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 15305) END FROM WidgetInst WHERE WidgetInstId = 15305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15308;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = 15313) END FROM WidgetInst WHERE WidgetInstId = 15313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15314;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 15313) END FROM WidgetInst WHERE WidgetInstId = 15313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15322;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 15318) END FROM WidgetInst WHERE WidgetInstId = 15318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15324;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 15320) END FROM WidgetInst WHERE WidgetInstId = 15320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15326;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 15313) END FROM WidgetInst WHERE WidgetInstId = 15313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15328;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 15318) END FROM WidgetInst WHERE WidgetInstId = 15318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15330;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 15320) END FROM WidgetInst WHERE WidgetInstId = 15320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15332;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 15313) END FROM WidgetInst WHERE WidgetInstId = 15313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15334;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 15318) END FROM WidgetInst WHERE WidgetInstId = 15318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15336;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 15320) END FROM WidgetInst WHERE WidgetInstId = 15320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15338;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 15313) END FROM WidgetInst WHERE WidgetInstId = 15313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15340;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 15318) END FROM WidgetInst WHERE WidgetInstId = 15318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15342;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 15320) END FROM WidgetInst WHERE WidgetInstId = 15320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15344;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 15313) END FROM WidgetInst WHERE WidgetInstId = 15313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15346;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 15318) END FROM WidgetInst WHERE WidgetInstId = 15318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15348;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 15320) END FROM WidgetInst WHERE WidgetInstId = 15320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15350;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 15313) END FROM WidgetInst WHERE WidgetInstId = 15313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15352;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 15318) END FROM WidgetInst WHERE WidgetInstId = 15318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15354;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 15320) END FROM WidgetInst WHERE WidgetInstId = 15320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15356;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 15313) END FROM WidgetInst WHERE WidgetInstId = 15313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15358;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 15318) END FROM WidgetInst WHERE WidgetInstId = 15318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15360;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 15320) END FROM WidgetInst WHERE WidgetInstId = 15320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15362;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 15313) END FROM WidgetInst WHERE WidgetInstId = 15313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15364;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 15313) END FROM WidgetInst WHERE WidgetInstId = 15313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15366;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 15313) END FROM WidgetInst WHERE WidgetInstId = 15313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15368;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = 15313) END FROM WidgetInst WHERE WidgetInstId = 15313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15370;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = 15313) END FROM WidgetInst WHERE WidgetInstId = 15313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15372;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 15313) END FROM WidgetInst WHERE WidgetInstId = 15313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15374;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 15313) END FROM WidgetInst WHERE WidgetInstId = 15313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15376;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 15313) END FROM WidgetInst WHERE WidgetInstId = 15313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15378;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 15313) END FROM WidgetInst WHERE WidgetInstId = 15313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15380;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 15313) END FROM WidgetInst WHERE WidgetInstId = 15313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15382;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 15313) END FROM WidgetInst WHERE WidgetInstId = 15313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15384;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 15397) END FROM WidgetInst WHERE WidgetInstId = 15397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15398;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 15407) END FROM WidgetInst WHERE WidgetInstId = 15407) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15408;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 15410) END FROM WidgetInst WHERE WidgetInstId = 15410) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15411;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 15415) END FROM WidgetInst WHERE WidgetInstId = 15415) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15416;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = 15415) END FROM WidgetInst WHERE WidgetInstId = 15415) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15418;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 15407) END FROM WidgetInst WHERE WidgetInstId = 15407) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15433;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 15447;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 15447;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 15447;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 15447;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 15447;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 15447;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 15447) END FROM WidgetInst WHERE WidgetInstId = 15447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15448;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 15450) END FROM WidgetInst WHERE WidgetInstId = 15450) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15451;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 15447) END FROM WidgetInst WHERE WidgetInstId = 15447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15453;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 44) END FROM WidgetInst WHERE WidgetInstId = 44) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15459;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 44) END FROM WidgetInst WHERE WidgetInstId = 44) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15462;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 15447) END FROM WidgetInst WHERE WidgetInstId = 15447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15465;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15467) END FROM WidgetInst WHERE WidgetInstId = 15467) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15468;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15467) END FROM WidgetInst WHERE WidgetInstId = 15467) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15471;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 15447) END FROM WidgetInst WHERE WidgetInstId = 15447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15474;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15476) END FROM WidgetInst WHERE WidgetInstId = 15476) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15477;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15476) END FROM WidgetInst WHERE WidgetInstId = 15476) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15480;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 15476) END FROM WidgetInst WHERE WidgetInstId = 15476) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15483;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15447) END FROM WidgetInst WHERE WidgetInstId = 15447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15486;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15447) END FROM WidgetInst WHERE WidgetInstId = 15447) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15488) END FROM WidgetInst WHERE WidgetInstId = 15488)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15491;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 15490) END FROM WidgetInst WHERE WidgetInstId = 15490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15494;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 15490) END FROM WidgetInst WHERE WidgetInstId = 15490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15495;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 15490) END FROM WidgetInst WHERE WidgetInstId = 15490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15498;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 15490) END FROM WidgetInst WHERE WidgetInstId = 15490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15499;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15447) END FROM WidgetInst WHERE WidgetInstId = 15447) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15488) END FROM WidgetInst WHERE WidgetInstId = 15488)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15500;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 15490) END FROM WidgetInst WHERE WidgetInstId = 15490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15503;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 15490) END FROM WidgetInst WHERE WidgetInstId = 15490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15504;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15506) END FROM WidgetInst WHERE WidgetInstId = 15506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15507;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 15490) END FROM WidgetInst WHERE WidgetInstId = 15490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15509;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 15490) END FROM WidgetInst WHERE WidgetInstId = 15490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15510;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 15506) END FROM WidgetInst WHERE WidgetInstId = 15506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15511;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 15490) END FROM WidgetInst WHERE WidgetInstId = 15490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15513;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 15490) END FROM WidgetInst WHERE WidgetInstId = 15490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15514;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 15447) END FROM WidgetInst WHERE WidgetInstId = 15447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15515;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 15447) END FROM WidgetInst WHERE WidgetInstId = 15447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15518;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15551) END FROM WidgetInst WHERE WidgetInstId = 15551) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15552;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15551) END FROM WidgetInst WHERE WidgetInstId = 15551) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15551) END FROM WidgetInst WHERE WidgetInstId = 15551) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15556;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 15447) END FROM WidgetInst WHERE WidgetInstId = 15447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15558;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15567) END FROM WidgetInst WHERE WidgetInstId = 15567) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15568;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15567) END FROM WidgetInst WHERE WidgetInstId = 15567) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15570;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15567) END FROM WidgetInst WHERE WidgetInstId = 15567) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15572;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 15447) END FROM WidgetInst WHERE WidgetInstId = 15447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15574;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15587) END FROM WidgetInst WHERE WidgetInstId = 15587) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15588;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15587) END FROM WidgetInst WHERE WidgetInstId = 15587) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15590;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15587) END FROM WidgetInst WHERE WidgetInstId = 15587) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15592;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 15447) END FROM WidgetInst WHERE WidgetInstId = 15447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15594;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 15607) END FROM WidgetInst WHERE WidgetInstId = 15607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15608;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 15607) END FROM WidgetInst WHERE WidgetInstId = 15607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15610;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 15607) END FROM WidgetInst WHERE WidgetInstId = 15607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15612;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15613) END FROM WidgetInst WHERE WidgetInstId = 15613) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 15607) END FROM WidgetInst WHERE WidgetInstId = 15607)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15614;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15613) END FROM WidgetInst WHERE WidgetInstId = 15613) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 15607) END FROM WidgetInst WHERE WidgetInstId = 15607)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15616;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15613) END FROM WidgetInst WHERE WidgetInstId = 15613) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 15607) END FROM WidgetInst WHERE WidgetInstId = 15607)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15618;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 15447) END FROM WidgetInst WHERE WidgetInstId = 15447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15620;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15622) END FROM WidgetInst WHERE WidgetInstId = 15622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15623;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15622) END FROM WidgetInst WHERE WidgetInstId = 15622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15626;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 15622) END FROM WidgetInst WHERE WidgetInstId = 15622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15629;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 15622) END FROM WidgetInst WHERE WidgetInstId = 15622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15640;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 15447) END FROM WidgetInst WHERE WidgetInstId = 15447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15643;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15646) END FROM WidgetInst WHERE WidgetInstId = 15646) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15647;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15646) END FROM WidgetInst WHERE WidgetInstId = 15646) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15650;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 15646) END FROM WidgetInst WHERE WidgetInstId = 15646) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15653;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 15646) END FROM WidgetInst WHERE WidgetInstId = 15646) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15664;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 15668) END FROM WidgetInst WHERE WidgetInstId = 15668) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15669;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 15668) END FROM WidgetInst WHERE WidgetInstId = 15668) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15671;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 15668) END FROM WidgetInst WHERE WidgetInstId = 15668) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15673;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 15668) END FROM WidgetInst WHERE WidgetInstId = 15668) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15675;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 15668) END FROM WidgetInst WHERE WidgetInstId = 15668) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15677;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 15668) END FROM WidgetInst WHERE WidgetInstId = 15668) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15679;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 189) END FROM WidgetInst WHERE WidgetInstId = 189) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 47) END FROM WidgetInst WHERE WidgetInstId = 47)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15681;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 15683) END FROM WidgetInst WHERE WidgetInstId = 15683) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15684;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 15688;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 15688;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 15688;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 15688;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 15688;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 15688;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 15688) END FROM WidgetInst WHERE WidgetInstId = 15688) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15689;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 15691) END FROM WidgetInst WHERE WidgetInstId = 15691) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15692;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 15688) END FROM WidgetInst WHERE WidgetInstId = 15688) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15694;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 15302) END FROM WidgetInst WHERE WidgetInstId = 15302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15700;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 15302) END FROM WidgetInst WHERE WidgetInstId = 15302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15703;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 15688) END FROM WidgetInst WHERE WidgetInstId = 15688) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15706;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15708) END FROM WidgetInst WHERE WidgetInstId = 15708) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15709;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15708) END FROM WidgetInst WHERE WidgetInstId = 15708) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15712;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 15688) END FROM WidgetInst WHERE WidgetInstId = 15688) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15715;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15717) END FROM WidgetInst WHERE WidgetInstId = 15717) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15718;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15717) END FROM WidgetInst WHERE WidgetInstId = 15717) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15721;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 15717) END FROM WidgetInst WHERE WidgetInstId = 15717) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15724;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15688) END FROM WidgetInst WHERE WidgetInstId = 15688) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15727;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15688) END FROM WidgetInst WHERE WidgetInstId = 15688) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15729) END FROM WidgetInst WHERE WidgetInstId = 15729)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15732;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 15731) END FROM WidgetInst WHERE WidgetInstId = 15731) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15735;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 15731) END FROM WidgetInst WHERE WidgetInstId = 15731) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15736;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 15731) END FROM WidgetInst WHERE WidgetInstId = 15731) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15739;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 15731) END FROM WidgetInst WHERE WidgetInstId = 15731) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15740;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15688) END FROM WidgetInst WHERE WidgetInstId = 15688) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15729) END FROM WidgetInst WHERE WidgetInstId = 15729)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15741;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 15731) END FROM WidgetInst WHERE WidgetInstId = 15731) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15744;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 15731) END FROM WidgetInst WHERE WidgetInstId = 15731) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15745;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15747) END FROM WidgetInst WHERE WidgetInstId = 15747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15748;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 15731) END FROM WidgetInst WHERE WidgetInstId = 15731) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15750;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 15731) END FROM WidgetInst WHERE WidgetInstId = 15731) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15751;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 15747) END FROM WidgetInst WHERE WidgetInstId = 15747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15752;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 15731) END FROM WidgetInst WHERE WidgetInstId = 15731) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15754;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 15731) END FROM WidgetInst WHERE WidgetInstId = 15731) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15755;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 15688) END FROM WidgetInst WHERE WidgetInstId = 15688) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15756;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 15688) END FROM WidgetInst WHERE WidgetInstId = 15688) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15759;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15792) END FROM WidgetInst WHERE WidgetInstId = 15792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15793;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15792) END FROM WidgetInst WHERE WidgetInstId = 15792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15795;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15792) END FROM WidgetInst WHERE WidgetInstId = 15792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15797;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 15688) END FROM WidgetInst WHERE WidgetInstId = 15688) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15799;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15808) END FROM WidgetInst WHERE WidgetInstId = 15808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15809;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15808) END FROM WidgetInst WHERE WidgetInstId = 15808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15811;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15808) END FROM WidgetInst WHERE WidgetInstId = 15808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15813;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 15688) END FROM WidgetInst WHERE WidgetInstId = 15688) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15815;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15828) END FROM WidgetInst WHERE WidgetInstId = 15828) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15829;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15828) END FROM WidgetInst WHERE WidgetInstId = 15828) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15831;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15828) END FROM WidgetInst WHERE WidgetInstId = 15828) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15833;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 15688) END FROM WidgetInst WHERE WidgetInstId = 15688) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15835;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 15848) END FROM WidgetInst WHERE WidgetInstId = 15848) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15849;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 15848) END FROM WidgetInst WHERE WidgetInstId = 15848) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15851;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 15848) END FROM WidgetInst WHERE WidgetInstId = 15848) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15853;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15854) END FROM WidgetInst WHERE WidgetInstId = 15854) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 15848) END FROM WidgetInst WHERE WidgetInstId = 15848)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15855;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15854) END FROM WidgetInst WHERE WidgetInstId = 15854) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 15848) END FROM WidgetInst WHERE WidgetInstId = 15848)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15857;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 15854) END FROM WidgetInst WHERE WidgetInstId = 15854) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 15848) END FROM WidgetInst WHERE WidgetInstId = 15848)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15859;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 15688) END FROM WidgetInst WHERE WidgetInstId = 15688) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15861;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15863) END FROM WidgetInst WHERE WidgetInstId = 15863) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15864;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15863) END FROM WidgetInst WHERE WidgetInstId = 15863) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15867;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 15863) END FROM WidgetInst WHERE WidgetInstId = 15863) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15870;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 15863) END FROM WidgetInst WHERE WidgetInstId = 15863) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15881;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 15688) END FROM WidgetInst WHERE WidgetInstId = 15688) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15884;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15887) END FROM WidgetInst WHERE WidgetInstId = 15887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15888;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15887) END FROM WidgetInst WHERE WidgetInstId = 15887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15891;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 15887) END FROM WidgetInst WHERE WidgetInstId = 15887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15894;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 15887) END FROM WidgetInst WHERE WidgetInstId = 15887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15905;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 15909) END FROM WidgetInst WHERE WidgetInstId = 15909) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15910;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 15909) END FROM WidgetInst WHERE WidgetInstId = 15909) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15912;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 15909) END FROM WidgetInst WHERE WidgetInstId = 15909) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15914;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 15909) END FROM WidgetInst WHERE WidgetInstId = 15909) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15916;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 15909) END FROM WidgetInst WHERE WidgetInstId = 15909) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15918;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 15909) END FROM WidgetInst WHERE WidgetInstId = 15909) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15920;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 15688) END FROM WidgetInst WHERE WidgetInstId = 15688) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 15305) END FROM WidgetInst WHERE WidgetInstId = 15305)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15922;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 15924) END FROM WidgetInst WHERE WidgetInstId = 15924) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15925;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 15929;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 15929;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 15929;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 15929;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 15929;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 15929;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 15929) END FROM WidgetInst WHERE WidgetInstId = 15929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15930;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 15932) END FROM WidgetInst WHERE WidgetInstId = 15932) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15933;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 15929) END FROM WidgetInst WHERE WidgetInstId = 15929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15935;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 15302) END FROM WidgetInst WHERE WidgetInstId = 15302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15941;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 15302) END FROM WidgetInst WHERE WidgetInstId = 15302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15944;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 15929) END FROM WidgetInst WHERE WidgetInstId = 15929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15947;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15949) END FROM WidgetInst WHERE WidgetInstId = 15949) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15950;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15949) END FROM WidgetInst WHERE WidgetInstId = 15949) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15953;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 15929) END FROM WidgetInst WHERE WidgetInstId = 15929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15956;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15958) END FROM WidgetInst WHERE WidgetInstId = 15958) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15959;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15958) END FROM WidgetInst WHERE WidgetInstId = 15958) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15962;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 15958) END FROM WidgetInst WHERE WidgetInstId = 15958) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15965;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15929) END FROM WidgetInst WHERE WidgetInstId = 15929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15968;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15929) END FROM WidgetInst WHERE WidgetInstId = 15929) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15970) END FROM WidgetInst WHERE WidgetInstId = 15970)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15973;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 15972) END FROM WidgetInst WHERE WidgetInstId = 15972) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15976;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 15972) END FROM WidgetInst WHERE WidgetInstId = 15972) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15977;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 15972) END FROM WidgetInst WHERE WidgetInstId = 15972) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15980;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 15972) END FROM WidgetInst WHERE WidgetInstId = 15972) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15981;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15929) END FROM WidgetInst WHERE WidgetInstId = 15929) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15970) END FROM WidgetInst WHERE WidgetInstId = 15970)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15982;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 15972) END FROM WidgetInst WHERE WidgetInstId = 15972) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15985;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 15972) END FROM WidgetInst WHERE WidgetInstId = 15972) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15986;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15988) END FROM WidgetInst WHERE WidgetInstId = 15988) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15989;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 15972) END FROM WidgetInst WHERE WidgetInstId = 15972) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15991;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 15972) END FROM WidgetInst WHERE WidgetInstId = 15972) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15992;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 15988) END FROM WidgetInst WHERE WidgetInstId = 15988) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15993;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 15972) END FROM WidgetInst WHERE WidgetInstId = 15972) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15995;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 15972) END FROM WidgetInst WHERE WidgetInstId = 15972) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15996;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 15929) END FROM WidgetInst WHERE WidgetInstId = 15929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15997;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 15929) END FROM WidgetInst WHERE WidgetInstId = 15929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16000;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16033) END FROM WidgetInst WHERE WidgetInstId = 16033) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16034;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16033) END FROM WidgetInst WHERE WidgetInstId = 16033) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16036;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16033) END FROM WidgetInst WHERE WidgetInstId = 16033) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16038;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 15929) END FROM WidgetInst WHERE WidgetInstId = 15929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16040;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16049) END FROM WidgetInst WHERE WidgetInstId = 16049) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16050;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16049) END FROM WidgetInst WHERE WidgetInstId = 16049) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16052;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16049) END FROM WidgetInst WHERE WidgetInstId = 16049) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16054;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 15929) END FROM WidgetInst WHERE WidgetInstId = 15929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16056;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16069) END FROM WidgetInst WHERE WidgetInstId = 16069) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16070;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16069) END FROM WidgetInst WHERE WidgetInstId = 16069) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16072;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16069) END FROM WidgetInst WHERE WidgetInstId = 16069) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16074;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 15929) END FROM WidgetInst WHERE WidgetInstId = 15929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16076;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16089) END FROM WidgetInst WHERE WidgetInstId = 16089) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16090;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16089) END FROM WidgetInst WHERE WidgetInstId = 16089) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16092;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16089) END FROM WidgetInst WHERE WidgetInstId = 16089) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16094;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16095) END FROM WidgetInst WHERE WidgetInstId = 16095) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16089) END FROM WidgetInst WHERE WidgetInstId = 16089)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16096;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16095) END FROM WidgetInst WHERE WidgetInstId = 16095) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16089) END FROM WidgetInst WHERE WidgetInstId = 16089)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16098;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16095) END FROM WidgetInst WHERE WidgetInstId = 16095) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16089) END FROM WidgetInst WHERE WidgetInstId = 16089)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16100;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 15929) END FROM WidgetInst WHERE WidgetInstId = 15929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16102;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16104) END FROM WidgetInst WHERE WidgetInstId = 16104) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16105;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16104) END FROM WidgetInst WHERE WidgetInstId = 16104) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16108;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 16104) END FROM WidgetInst WHERE WidgetInstId = 16104) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16111;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 16104) END FROM WidgetInst WHERE WidgetInstId = 16104) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16122;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 15929) END FROM WidgetInst WHERE WidgetInstId = 15929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16125;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16128) END FROM WidgetInst WHERE WidgetInstId = 16128) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16129;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16128) END FROM WidgetInst WHERE WidgetInstId = 16128) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16132;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 16128) END FROM WidgetInst WHERE WidgetInstId = 16128) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16135;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 16128) END FROM WidgetInst WHERE WidgetInstId = 16128) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16146;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 16150) END FROM WidgetInst WHERE WidgetInstId = 16150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16151;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 16150) END FROM WidgetInst WHERE WidgetInstId = 16150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16153;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 16150) END FROM WidgetInst WHERE WidgetInstId = 16150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16155;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 16150) END FROM WidgetInst WHERE WidgetInstId = 16150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16157;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 16150) END FROM WidgetInst WHERE WidgetInstId = 16150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16159;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 16150) END FROM WidgetInst WHERE WidgetInstId = 16150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16161;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 15929) END FROM WidgetInst WHERE WidgetInstId = 15929) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 15305) END FROM WidgetInst WHERE WidgetInstId = 15305)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16163;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 16165) END FROM WidgetInst WHERE WidgetInstId = 16165) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16166;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 16170;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 16170;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 16170;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 16170;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 16170;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 16170;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 16170) END FROM WidgetInst WHERE WidgetInstId = 16170) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16171;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 16173) END FROM WidgetInst WHERE WidgetInstId = 16173) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16174;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 16170) END FROM WidgetInst WHERE WidgetInstId = 16170) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16176;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 15302) END FROM WidgetInst WHERE WidgetInstId = 15302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16182;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 15302) END FROM WidgetInst WHERE WidgetInstId = 15302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16185;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 16170) END FROM WidgetInst WHERE WidgetInstId = 16170) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16188;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16190) END FROM WidgetInst WHERE WidgetInstId = 16190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16191;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16190) END FROM WidgetInst WHERE WidgetInstId = 16190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16194;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 16170) END FROM WidgetInst WHERE WidgetInstId = 16170) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16197;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16199) END FROM WidgetInst WHERE WidgetInstId = 16199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16200;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16199) END FROM WidgetInst WHERE WidgetInstId = 16199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16203;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 16199) END FROM WidgetInst WHERE WidgetInstId = 16199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16206;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 16170) END FROM WidgetInst WHERE WidgetInstId = 16170) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16209;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 16170) END FROM WidgetInst WHERE WidgetInstId = 16170) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16211) END FROM WidgetInst WHERE WidgetInstId = 16211)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16214;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16213) END FROM WidgetInst WHERE WidgetInstId = 16213) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16217;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16213) END FROM WidgetInst WHERE WidgetInstId = 16213) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16218;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16213) END FROM WidgetInst WHERE WidgetInstId = 16213) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16221;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16213) END FROM WidgetInst WHERE WidgetInstId = 16213) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16222;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 16170) END FROM WidgetInst WHERE WidgetInstId = 16170) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16211) END FROM WidgetInst WHERE WidgetInstId = 16211)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16223;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16213) END FROM WidgetInst WHERE WidgetInstId = 16213) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16226;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16213) END FROM WidgetInst WHERE WidgetInstId = 16213) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16227;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16229) END FROM WidgetInst WHERE WidgetInstId = 16229) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16230;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16213) END FROM WidgetInst WHERE WidgetInstId = 16213) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16232;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16213) END FROM WidgetInst WHERE WidgetInstId = 16213) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16233;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 16229) END FROM WidgetInst WHERE WidgetInstId = 16229) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16234;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16213) END FROM WidgetInst WHERE WidgetInstId = 16213) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16236;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16213) END FROM WidgetInst WHERE WidgetInstId = 16213) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16237;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 16170) END FROM WidgetInst WHERE WidgetInstId = 16170) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16238;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 16170) END FROM WidgetInst WHERE WidgetInstId = 16170) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16241;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16274) END FROM WidgetInst WHERE WidgetInstId = 16274) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16275;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16274) END FROM WidgetInst WHERE WidgetInstId = 16274) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16277;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16274) END FROM WidgetInst WHERE WidgetInstId = 16274) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16279;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 16170) END FROM WidgetInst WHERE WidgetInstId = 16170) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16290) END FROM WidgetInst WHERE WidgetInstId = 16290) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16291;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16290) END FROM WidgetInst WHERE WidgetInstId = 16290) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16293;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16290) END FROM WidgetInst WHERE WidgetInstId = 16290) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16295;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 16170) END FROM WidgetInst WHERE WidgetInstId = 16170) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16297;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16310) END FROM WidgetInst WHERE WidgetInstId = 16310) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16311;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16310) END FROM WidgetInst WHERE WidgetInstId = 16310) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16313;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16310) END FROM WidgetInst WHERE WidgetInstId = 16310) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16315;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 16170) END FROM WidgetInst WHERE WidgetInstId = 16170) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16317;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16330) END FROM WidgetInst WHERE WidgetInstId = 16330) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16331;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16330) END FROM WidgetInst WHERE WidgetInstId = 16330) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16333;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16330) END FROM WidgetInst WHERE WidgetInstId = 16330) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16335;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16336) END FROM WidgetInst WHERE WidgetInstId = 16336) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16330) END FROM WidgetInst WHERE WidgetInstId = 16330)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16337;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16336) END FROM WidgetInst WHERE WidgetInstId = 16336) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16330) END FROM WidgetInst WHERE WidgetInstId = 16330)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16339;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16336) END FROM WidgetInst WHERE WidgetInstId = 16336) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16330) END FROM WidgetInst WHERE WidgetInstId = 16330)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16341;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 16170) END FROM WidgetInst WHERE WidgetInstId = 16170) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16343;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16345) END FROM WidgetInst WHERE WidgetInstId = 16345) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16346;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16345) END FROM WidgetInst WHERE WidgetInstId = 16345) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16349;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 16345) END FROM WidgetInst WHERE WidgetInstId = 16345) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16352;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 16345) END FROM WidgetInst WHERE WidgetInstId = 16345) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16363;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 16170) END FROM WidgetInst WHERE WidgetInstId = 16170) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16366;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16369) END FROM WidgetInst WHERE WidgetInstId = 16369) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16370;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16369) END FROM WidgetInst WHERE WidgetInstId = 16369) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16373;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 16369) END FROM WidgetInst WHERE WidgetInstId = 16369) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16376;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 16369) END FROM WidgetInst WHERE WidgetInstId = 16369) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16387;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 16391) END FROM WidgetInst WHERE WidgetInstId = 16391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16392;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 16391) END FROM WidgetInst WHERE WidgetInstId = 16391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16394;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 16391) END FROM WidgetInst WHERE WidgetInstId = 16391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16396;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 16391) END FROM WidgetInst WHERE WidgetInstId = 16391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16398;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 16391) END FROM WidgetInst WHERE WidgetInstId = 16391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16400;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 16391) END FROM WidgetInst WHERE WidgetInstId = 16391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 16170) END FROM WidgetInst WHERE WidgetInstId = 16170) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 15305) END FROM WidgetInst WHERE WidgetInstId = 15305)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16404;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 16406) END FROM WidgetInst WHERE WidgetInstId = 16406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16407;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 16411;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 16411;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 16411;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 16411;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 16411;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 16411;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 16411) END FROM WidgetInst WHERE WidgetInstId = 16411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16412;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 16414) END FROM WidgetInst WHERE WidgetInstId = 16414) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16415;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 16411) END FROM WidgetInst WHERE WidgetInstId = 16411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16417;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 15302) END FROM WidgetInst WHERE WidgetInstId = 15302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16423;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 15302) END FROM WidgetInst WHERE WidgetInstId = 15302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16426;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 16411) END FROM WidgetInst WHERE WidgetInstId = 16411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16429;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16431) END FROM WidgetInst WHERE WidgetInstId = 16431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16431) END FROM WidgetInst WHERE WidgetInstId = 16431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16435;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 16411) END FROM WidgetInst WHERE WidgetInstId = 16411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16438;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16440) END FROM WidgetInst WHERE WidgetInstId = 16440) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16441;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16440) END FROM WidgetInst WHERE WidgetInstId = 16440) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16444;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 16440) END FROM WidgetInst WHERE WidgetInstId = 16440) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16447;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 16411) END FROM WidgetInst WHERE WidgetInstId = 16411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16450;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 16411) END FROM WidgetInst WHERE WidgetInstId = 16411) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16452) END FROM WidgetInst WHERE WidgetInstId = 16452)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16455;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16454) END FROM WidgetInst WHERE WidgetInstId = 16454) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16458;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16454) END FROM WidgetInst WHERE WidgetInstId = 16454) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16459;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16454) END FROM WidgetInst WHERE WidgetInstId = 16454) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16462;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16454) END FROM WidgetInst WHERE WidgetInstId = 16454) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16463;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 16411) END FROM WidgetInst WHERE WidgetInstId = 16411) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16452) END FROM WidgetInst WHERE WidgetInstId = 16452)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16464;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16454) END FROM WidgetInst WHERE WidgetInstId = 16454) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16467;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16454) END FROM WidgetInst WHERE WidgetInstId = 16454) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16468;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16470) END FROM WidgetInst WHERE WidgetInstId = 16470) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16471;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16454) END FROM WidgetInst WHERE WidgetInstId = 16454) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16473;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16454) END FROM WidgetInst WHERE WidgetInstId = 16454) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16474;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 16470) END FROM WidgetInst WHERE WidgetInstId = 16470) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16475;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16454) END FROM WidgetInst WHERE WidgetInstId = 16454) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16477;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16454) END FROM WidgetInst WHERE WidgetInstId = 16454) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16478;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 16411) END FROM WidgetInst WHERE WidgetInstId = 16411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16479;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 16411) END FROM WidgetInst WHERE WidgetInstId = 16411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16482;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16515) END FROM WidgetInst WHERE WidgetInstId = 16515) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16516;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16515) END FROM WidgetInst WHERE WidgetInstId = 16515) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16518;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16515) END FROM WidgetInst WHERE WidgetInstId = 16515) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16520;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 16411) END FROM WidgetInst WHERE WidgetInstId = 16411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16522;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16531) END FROM WidgetInst WHERE WidgetInstId = 16531) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16532;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16531) END FROM WidgetInst WHERE WidgetInstId = 16531) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16534;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16531) END FROM WidgetInst WHERE WidgetInstId = 16531) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16536;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 16411) END FROM WidgetInst WHERE WidgetInstId = 16411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16538;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16551) END FROM WidgetInst WHERE WidgetInstId = 16551) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16552;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16551) END FROM WidgetInst WHERE WidgetInstId = 16551) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16551) END FROM WidgetInst WHERE WidgetInstId = 16551) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16556;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 16411) END FROM WidgetInst WHERE WidgetInstId = 16411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16558;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16571) END FROM WidgetInst WHERE WidgetInstId = 16571) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16572;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16571) END FROM WidgetInst WHERE WidgetInstId = 16571) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16574;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16571) END FROM WidgetInst WHERE WidgetInstId = 16571) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16576;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16577) END FROM WidgetInst WHERE WidgetInstId = 16577) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16571) END FROM WidgetInst WHERE WidgetInstId = 16571)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16578;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16577) END FROM WidgetInst WHERE WidgetInstId = 16577) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16571) END FROM WidgetInst WHERE WidgetInstId = 16571)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16580;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16577) END FROM WidgetInst WHERE WidgetInstId = 16577) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16571) END FROM WidgetInst WHERE WidgetInstId = 16571)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16582;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 16411) END FROM WidgetInst WHERE WidgetInstId = 16411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16584;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16586) END FROM WidgetInst WHERE WidgetInstId = 16586) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16587;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16586) END FROM WidgetInst WHERE WidgetInstId = 16586) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16590;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 16586) END FROM WidgetInst WHERE WidgetInstId = 16586) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16593;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 16586) END FROM WidgetInst WHERE WidgetInstId = 16586) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16604;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 16411) END FROM WidgetInst WHERE WidgetInstId = 16411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16607;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16610) END FROM WidgetInst WHERE WidgetInstId = 16610) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16611;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16610) END FROM WidgetInst WHERE WidgetInstId = 16610) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16614;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 16610) END FROM WidgetInst WHERE WidgetInstId = 16610) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16617;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 16610) END FROM WidgetInst WHERE WidgetInstId = 16610) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16628;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 16632) END FROM WidgetInst WHERE WidgetInstId = 16632) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16633;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 16632) END FROM WidgetInst WHERE WidgetInstId = 16632) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16635;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 16632) END FROM WidgetInst WHERE WidgetInstId = 16632) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16637;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 16632) END FROM WidgetInst WHERE WidgetInstId = 16632) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16639;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 16632) END FROM WidgetInst WHERE WidgetInstId = 16632) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16641;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 16632) END FROM WidgetInst WHERE WidgetInstId = 16632) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16643;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 16411) END FROM WidgetInst WHERE WidgetInstId = 16411) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 15305) END FROM WidgetInst WHERE WidgetInstId = 15305)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16645;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 16647) END FROM WidgetInst WHERE WidgetInstId = 16647) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16648;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 16652;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 16652;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 16652;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 16652;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 16652;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 16652;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 16652) END FROM WidgetInst WHERE WidgetInstId = 16652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16653;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 16655) END FROM WidgetInst WHERE WidgetInstId = 16655) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16656;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 16652) END FROM WidgetInst WHERE WidgetInstId = 16652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16658;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 15302) END FROM WidgetInst WHERE WidgetInstId = 15302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16664;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 15302) END FROM WidgetInst WHERE WidgetInstId = 15302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16667;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 16652) END FROM WidgetInst WHERE WidgetInstId = 16652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16670;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16672) END FROM WidgetInst WHERE WidgetInstId = 16672) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16673;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16672) END FROM WidgetInst WHERE WidgetInstId = 16672) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16676;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 16652) END FROM WidgetInst WHERE WidgetInstId = 16652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16679;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16681) END FROM WidgetInst WHERE WidgetInstId = 16681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16682;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16681) END FROM WidgetInst WHERE WidgetInstId = 16681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16685;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 16681) END FROM WidgetInst WHERE WidgetInstId = 16681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16688;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 16652) END FROM WidgetInst WHERE WidgetInstId = 16652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16691;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 16652) END FROM WidgetInst WHERE WidgetInstId = 16652) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16693) END FROM WidgetInst WHERE WidgetInstId = 16693)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16696;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16695) END FROM WidgetInst WHERE WidgetInstId = 16695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16699;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16695) END FROM WidgetInst WHERE WidgetInstId = 16695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16700;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16695) END FROM WidgetInst WHERE WidgetInstId = 16695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16703;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16695) END FROM WidgetInst WHERE WidgetInstId = 16695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16704;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 16652) END FROM WidgetInst WHERE WidgetInstId = 16652) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16693) END FROM WidgetInst WHERE WidgetInstId = 16693)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16705;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16695) END FROM WidgetInst WHERE WidgetInstId = 16695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16708;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16695) END FROM WidgetInst WHERE WidgetInstId = 16695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16709;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16711) END FROM WidgetInst WHERE WidgetInstId = 16711) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16712;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16695) END FROM WidgetInst WHERE WidgetInstId = 16695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16714;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16695) END FROM WidgetInst WHERE WidgetInstId = 16695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16715;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 16711) END FROM WidgetInst WHERE WidgetInstId = 16711) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16716;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16695) END FROM WidgetInst WHERE WidgetInstId = 16695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16718;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16695) END FROM WidgetInst WHERE WidgetInstId = 16695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16719;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 16652) END FROM WidgetInst WHERE WidgetInstId = 16652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16720;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 16652) END FROM WidgetInst WHERE WidgetInstId = 16652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16723;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16756) END FROM WidgetInst WHERE WidgetInstId = 16756) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16757;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16756) END FROM WidgetInst WHERE WidgetInstId = 16756) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16759;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16756) END FROM WidgetInst WHERE WidgetInstId = 16756) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16761;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 16652) END FROM WidgetInst WHERE WidgetInstId = 16652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16763;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16772) END FROM WidgetInst WHERE WidgetInstId = 16772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16773;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16772) END FROM WidgetInst WHERE WidgetInstId = 16772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16775;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16772) END FROM WidgetInst WHERE WidgetInstId = 16772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16777;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 16652) END FROM WidgetInst WHERE WidgetInstId = 16652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16779;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16792) END FROM WidgetInst WHERE WidgetInstId = 16792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16793;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16792) END FROM WidgetInst WHERE WidgetInstId = 16792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16795;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16792) END FROM WidgetInst WHERE WidgetInstId = 16792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16797;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 16652) END FROM WidgetInst WHERE WidgetInstId = 16652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16799;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16812) END FROM WidgetInst WHERE WidgetInstId = 16812) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16813;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16812) END FROM WidgetInst WHERE WidgetInstId = 16812) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16815;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16812) END FROM WidgetInst WHERE WidgetInstId = 16812) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16817;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16818) END FROM WidgetInst WHERE WidgetInstId = 16818) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16812) END FROM WidgetInst WHERE WidgetInstId = 16812)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16819;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16818) END FROM WidgetInst WHERE WidgetInstId = 16818) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16812) END FROM WidgetInst WHERE WidgetInstId = 16812)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16821;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16818) END FROM WidgetInst WHERE WidgetInstId = 16818) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16812) END FROM WidgetInst WHERE WidgetInstId = 16812)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16823;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 16652) END FROM WidgetInst WHERE WidgetInstId = 16652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16825;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16827) END FROM WidgetInst WHERE WidgetInstId = 16827) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16828;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16827) END FROM WidgetInst WHERE WidgetInstId = 16827) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16831;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 16827) END FROM WidgetInst WHERE WidgetInstId = 16827) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16834;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 16827) END FROM WidgetInst WHERE WidgetInstId = 16827) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16845;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 16652) END FROM WidgetInst WHERE WidgetInstId = 16652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16848;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16851) END FROM WidgetInst WHERE WidgetInstId = 16851) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16852;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16851) END FROM WidgetInst WHERE WidgetInstId = 16851) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16855;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 16851) END FROM WidgetInst WHERE WidgetInstId = 16851) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16858;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 16851) END FROM WidgetInst WHERE WidgetInstId = 16851) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16869;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 16873) END FROM WidgetInst WHERE WidgetInstId = 16873) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16874;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 16873) END FROM WidgetInst WHERE WidgetInstId = 16873) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16876;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 16873) END FROM WidgetInst WHERE WidgetInstId = 16873) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16878;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 16873) END FROM WidgetInst WHERE WidgetInstId = 16873) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16880;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 16873) END FROM WidgetInst WHERE WidgetInstId = 16873) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16882;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 16873) END FROM WidgetInst WHERE WidgetInstId = 16873) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16884;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 16652) END FROM WidgetInst WHERE WidgetInstId = 16652) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 15305) END FROM WidgetInst WHERE WidgetInstId = 15305)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16886;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 16888) END FROM WidgetInst WHERE WidgetInstId = 16888) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16889;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 16893;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 16893;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 16893;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 16893;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 16893;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 16893;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 16893) END FROM WidgetInst WHERE WidgetInstId = 16893) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16894;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 16896) END FROM WidgetInst WHERE WidgetInstId = 16896) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16897;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 16893) END FROM WidgetInst WHERE WidgetInstId = 16893) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16899;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 15302) END FROM WidgetInst WHERE WidgetInstId = 15302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16905;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 15302) END FROM WidgetInst WHERE WidgetInstId = 15302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16908;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 16893) END FROM WidgetInst WHERE WidgetInstId = 16893) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16911;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16913) END FROM WidgetInst WHERE WidgetInstId = 16913) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16914;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16913) END FROM WidgetInst WHERE WidgetInstId = 16913) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16917;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 16893) END FROM WidgetInst WHERE WidgetInstId = 16893) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16920;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16922) END FROM WidgetInst WHERE WidgetInstId = 16922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16923;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16922) END FROM WidgetInst WHERE WidgetInstId = 16922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16926;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 16922) END FROM WidgetInst WHERE WidgetInstId = 16922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16929;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 16893) END FROM WidgetInst WHERE WidgetInstId = 16893) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16932;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 16893) END FROM WidgetInst WHERE WidgetInstId = 16893) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16934) END FROM WidgetInst WHERE WidgetInstId = 16934)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16937;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16936) END FROM WidgetInst WHERE WidgetInstId = 16936) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16940;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16936) END FROM WidgetInst WHERE WidgetInstId = 16936) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16941;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16936) END FROM WidgetInst WHERE WidgetInstId = 16936) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16944;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16936) END FROM WidgetInst WHERE WidgetInstId = 16936) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16945;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 16893) END FROM WidgetInst WHERE WidgetInstId = 16893) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16934) END FROM WidgetInst WHERE WidgetInstId = 16934)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16946;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16936) END FROM WidgetInst WHERE WidgetInstId = 16936) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16949;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16936) END FROM WidgetInst WHERE WidgetInstId = 16936) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16950;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16952) END FROM WidgetInst WHERE WidgetInstId = 16952) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16953;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16936) END FROM WidgetInst WHERE WidgetInstId = 16936) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16955;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16936) END FROM WidgetInst WHERE WidgetInstId = 16936) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16956;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 16952) END FROM WidgetInst WHERE WidgetInstId = 16952) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16957;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16936) END FROM WidgetInst WHERE WidgetInstId = 16936) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16959;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16936) END FROM WidgetInst WHERE WidgetInstId = 16936) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16960;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 16893) END FROM WidgetInst WHERE WidgetInstId = 16893) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16961;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 16893) END FROM WidgetInst WHERE WidgetInstId = 16893) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16964;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16997) END FROM WidgetInst WHERE WidgetInstId = 16997) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16998;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16997) END FROM WidgetInst WHERE WidgetInstId = 16997) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17000;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16997) END FROM WidgetInst WHERE WidgetInstId = 16997) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17002;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 16893) END FROM WidgetInst WHERE WidgetInstId = 16893) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17004;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17013) END FROM WidgetInst WHERE WidgetInstId = 17013) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17014;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17013) END FROM WidgetInst WHERE WidgetInstId = 17013) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17016;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17013) END FROM WidgetInst WHERE WidgetInstId = 17013) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17018;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 16893) END FROM WidgetInst WHERE WidgetInstId = 16893) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17020;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17033) END FROM WidgetInst WHERE WidgetInstId = 17033) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17034;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17033) END FROM WidgetInst WHERE WidgetInstId = 17033) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17036;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17033) END FROM WidgetInst WHERE WidgetInstId = 17033) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17038;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 16893) END FROM WidgetInst WHERE WidgetInstId = 16893) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17040;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17053) END FROM WidgetInst WHERE WidgetInstId = 17053) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17054;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17053) END FROM WidgetInst WHERE WidgetInstId = 17053) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17056;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17053) END FROM WidgetInst WHERE WidgetInstId = 17053) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17058;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17059) END FROM WidgetInst WHERE WidgetInstId = 17059) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17053) END FROM WidgetInst WHERE WidgetInstId = 17053)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17060;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17059) END FROM WidgetInst WHERE WidgetInstId = 17059) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17053) END FROM WidgetInst WHERE WidgetInstId = 17053)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17062;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17059) END FROM WidgetInst WHERE WidgetInstId = 17059) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17053) END FROM WidgetInst WHERE WidgetInstId = 17053)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17064;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 16893) END FROM WidgetInst WHERE WidgetInstId = 16893) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17066;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17068) END FROM WidgetInst WHERE WidgetInstId = 17068) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17069;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17068) END FROM WidgetInst WHERE WidgetInstId = 17068) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17072;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17068) END FROM WidgetInst WHERE WidgetInstId = 17068) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17075;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17068) END FROM WidgetInst WHERE WidgetInstId = 17068) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17086;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 16893) END FROM WidgetInst WHERE WidgetInstId = 16893) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17089;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17092) END FROM WidgetInst WHERE WidgetInstId = 17092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17093;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17092) END FROM WidgetInst WHERE WidgetInstId = 17092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17096;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17092) END FROM WidgetInst WHERE WidgetInstId = 17092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17099;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17092) END FROM WidgetInst WHERE WidgetInstId = 17092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17110;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 17114) END FROM WidgetInst WHERE WidgetInstId = 17114) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17115;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17114) END FROM WidgetInst WHERE WidgetInstId = 17114) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17117;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17114) END FROM WidgetInst WHERE WidgetInstId = 17114) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17119;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17114) END FROM WidgetInst WHERE WidgetInstId = 17114) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17121;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17114) END FROM WidgetInst WHERE WidgetInstId = 17114) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17123;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17114) END FROM WidgetInst WHERE WidgetInstId = 17114) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17125;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 16893) END FROM WidgetInst WHERE WidgetInstId = 16893) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 15305) END FROM WidgetInst WHERE WidgetInstId = 15305)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17127;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 17129) END FROM WidgetInst WHERE WidgetInstId = 17129) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17130;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 17134;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 17134;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 17134;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 17134;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 17134;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 17134;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 17134) END FROM WidgetInst WHERE WidgetInstId = 17134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17135;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 17137) END FROM WidgetInst WHERE WidgetInstId = 17137) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17138;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 17134) END FROM WidgetInst WHERE WidgetInstId = 17134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17140;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 15302) END FROM WidgetInst WHERE WidgetInstId = 15302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17146;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 15302) END FROM WidgetInst WHERE WidgetInstId = 15302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17149;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 17134) END FROM WidgetInst WHERE WidgetInstId = 17134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17152;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17154) END FROM WidgetInst WHERE WidgetInstId = 17154) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17155;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17154) END FROM WidgetInst WHERE WidgetInstId = 17154) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17158;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 17134) END FROM WidgetInst WHERE WidgetInstId = 17134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17161;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17163) END FROM WidgetInst WHERE WidgetInstId = 17163) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17164;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17163) END FROM WidgetInst WHERE WidgetInstId = 17163) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17167;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 17163) END FROM WidgetInst WHERE WidgetInstId = 17163) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17170;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 17134) END FROM WidgetInst WHERE WidgetInstId = 17134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17173;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 17134) END FROM WidgetInst WHERE WidgetInstId = 17134) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17175) END FROM WidgetInst WHERE WidgetInstId = 17175)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17178;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17177) END FROM WidgetInst WHERE WidgetInstId = 17177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17181;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17177) END FROM WidgetInst WHERE WidgetInstId = 17177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17182;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17177) END FROM WidgetInst WHERE WidgetInstId = 17177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17185;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17177) END FROM WidgetInst WHERE WidgetInstId = 17177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17186;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 17134) END FROM WidgetInst WHERE WidgetInstId = 17134) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17175) END FROM WidgetInst WHERE WidgetInstId = 17175)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17187;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17177) END FROM WidgetInst WHERE WidgetInstId = 17177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17190;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17177) END FROM WidgetInst WHERE WidgetInstId = 17177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17191;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17193) END FROM WidgetInst WHERE WidgetInstId = 17193) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17194;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17177) END FROM WidgetInst WHERE WidgetInstId = 17177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17196;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17177) END FROM WidgetInst WHERE WidgetInstId = 17177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17197;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 17193) END FROM WidgetInst WHERE WidgetInstId = 17193) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17198;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17177) END FROM WidgetInst WHERE WidgetInstId = 17177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17200;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17177) END FROM WidgetInst WHERE WidgetInstId = 17177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17201;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 17134) END FROM WidgetInst WHERE WidgetInstId = 17134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17202;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 17134) END FROM WidgetInst WHERE WidgetInstId = 17134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17205;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17238) END FROM WidgetInst WHERE WidgetInstId = 17238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17239;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17238) END FROM WidgetInst WHERE WidgetInstId = 17238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17241;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17238) END FROM WidgetInst WHERE WidgetInstId = 17238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17243;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17134) END FROM WidgetInst WHERE WidgetInstId = 17134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17245;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17254) END FROM WidgetInst WHERE WidgetInstId = 17254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17255;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17254) END FROM WidgetInst WHERE WidgetInstId = 17254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17257;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17254) END FROM WidgetInst WHERE WidgetInstId = 17254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17259;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 17134) END FROM WidgetInst WHERE WidgetInstId = 17134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17261;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17274) END FROM WidgetInst WHERE WidgetInstId = 17274) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17275;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17274) END FROM WidgetInst WHERE WidgetInstId = 17274) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17277;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17274) END FROM WidgetInst WHERE WidgetInstId = 17274) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17279;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 17134) END FROM WidgetInst WHERE WidgetInstId = 17134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17294) END FROM WidgetInst WHERE WidgetInstId = 17294) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17295;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17294) END FROM WidgetInst WHERE WidgetInstId = 17294) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17297;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17294) END FROM WidgetInst WHERE WidgetInstId = 17294) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17299;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17300) END FROM WidgetInst WHERE WidgetInstId = 17300) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17294) END FROM WidgetInst WHERE WidgetInstId = 17294)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17301;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17300) END FROM WidgetInst WHERE WidgetInstId = 17300) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17294) END FROM WidgetInst WHERE WidgetInstId = 17294)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17303;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17300) END FROM WidgetInst WHERE WidgetInstId = 17300) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17294) END FROM WidgetInst WHERE WidgetInstId = 17294)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17305;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 17134) END FROM WidgetInst WHERE WidgetInstId = 17134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17307;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17309) END FROM WidgetInst WHERE WidgetInstId = 17309) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17310;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17309) END FROM WidgetInst WHERE WidgetInstId = 17309) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17313;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17309) END FROM WidgetInst WHERE WidgetInstId = 17309) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17316;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17309) END FROM WidgetInst WHERE WidgetInstId = 17309) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17327;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 17134) END FROM WidgetInst WHERE WidgetInstId = 17134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17330;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17333) END FROM WidgetInst WHERE WidgetInstId = 17333) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17334;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17333) END FROM WidgetInst WHERE WidgetInstId = 17333) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17337;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17333) END FROM WidgetInst WHERE WidgetInstId = 17333) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17340;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17333) END FROM WidgetInst WHERE WidgetInstId = 17333) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17351;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 17355) END FROM WidgetInst WHERE WidgetInstId = 17355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17356;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17355) END FROM WidgetInst WHERE WidgetInstId = 17355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17358;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17355) END FROM WidgetInst WHERE WidgetInstId = 17355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17360;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17355) END FROM WidgetInst WHERE WidgetInstId = 17355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17362;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17355) END FROM WidgetInst WHERE WidgetInstId = 17355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17364;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17355) END FROM WidgetInst WHERE WidgetInstId = 17355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17366;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 17134) END FROM WidgetInst WHERE WidgetInstId = 17134) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 15305) END FROM WidgetInst WHERE WidgetInstId = 15305)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17368;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 17370) END FROM WidgetInst WHERE WidgetInstId = 17370) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17371;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 17375;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 17375;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 17375;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 17375;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 17375;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 17375;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 17375) END FROM WidgetInst WHERE WidgetInstId = 17375) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17376;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 17378) END FROM WidgetInst WHERE WidgetInstId = 17378) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17379;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 17375) END FROM WidgetInst WHERE WidgetInstId = 17375) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17381;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 15302) END FROM WidgetInst WHERE WidgetInstId = 15302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17387;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 15302) END FROM WidgetInst WHERE WidgetInstId = 15302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17390;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 17375) END FROM WidgetInst WHERE WidgetInstId = 17375) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17393;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17395) END FROM WidgetInst WHERE WidgetInstId = 17395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17396;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17395) END FROM WidgetInst WHERE WidgetInstId = 17395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17399;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 17375) END FROM WidgetInst WHERE WidgetInstId = 17375) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17404) END FROM WidgetInst WHERE WidgetInstId = 17404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17404) END FROM WidgetInst WHERE WidgetInstId = 17404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17408;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 17404) END FROM WidgetInst WHERE WidgetInstId = 17404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17411;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 17375) END FROM WidgetInst WHERE WidgetInstId = 17375) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17414;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 17375) END FROM WidgetInst WHERE WidgetInstId = 17375) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17416) END FROM WidgetInst WHERE WidgetInstId = 17416)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17419;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17418) END FROM WidgetInst WHERE WidgetInstId = 17418) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17422;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17418) END FROM WidgetInst WHERE WidgetInstId = 17418) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17423;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17418) END FROM WidgetInst WHERE WidgetInstId = 17418) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17426;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17418) END FROM WidgetInst WHERE WidgetInstId = 17418) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17427;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 17375) END FROM WidgetInst WHERE WidgetInstId = 17375) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17416) END FROM WidgetInst WHERE WidgetInstId = 17416)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17418) END FROM WidgetInst WHERE WidgetInstId = 17418) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17431;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17418) END FROM WidgetInst WHERE WidgetInstId = 17418) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17434) END FROM WidgetInst WHERE WidgetInstId = 17434) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17435;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17418) END FROM WidgetInst WHERE WidgetInstId = 17418) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17437;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17418) END FROM WidgetInst WHERE WidgetInstId = 17418) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17438;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 17434) END FROM WidgetInst WHERE WidgetInstId = 17434) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17439;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17418) END FROM WidgetInst WHERE WidgetInstId = 17418) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17441;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17418) END FROM WidgetInst WHERE WidgetInstId = 17418) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17442;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 17375) END FROM WidgetInst WHERE WidgetInstId = 17375) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17443;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 17375) END FROM WidgetInst WHERE WidgetInstId = 17375) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17446;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17479) END FROM WidgetInst WHERE WidgetInstId = 17479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17480;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17479) END FROM WidgetInst WHERE WidgetInstId = 17479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17482;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17479) END FROM WidgetInst WHERE WidgetInstId = 17479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17484;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17375) END FROM WidgetInst WHERE WidgetInstId = 17375) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17486;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17495) END FROM WidgetInst WHERE WidgetInstId = 17495) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17496;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17495) END FROM WidgetInst WHERE WidgetInstId = 17495) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17498;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17495) END FROM WidgetInst WHERE WidgetInstId = 17495) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17500;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 17375) END FROM WidgetInst WHERE WidgetInstId = 17375) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17502;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17515) END FROM WidgetInst WHERE WidgetInstId = 17515) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17516;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17515) END FROM WidgetInst WHERE WidgetInstId = 17515) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17518;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17515) END FROM WidgetInst WHERE WidgetInstId = 17515) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17520;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 17375) END FROM WidgetInst WHERE WidgetInstId = 17375) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17522;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17535) END FROM WidgetInst WHERE WidgetInstId = 17535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17536;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17535) END FROM WidgetInst WHERE WidgetInstId = 17535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17538;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17535) END FROM WidgetInst WHERE WidgetInstId = 17535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17540;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17541) END FROM WidgetInst WHERE WidgetInstId = 17541) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17535) END FROM WidgetInst WHERE WidgetInstId = 17535)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17542;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17541) END FROM WidgetInst WHERE WidgetInstId = 17541) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17535) END FROM WidgetInst WHERE WidgetInstId = 17535)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17544;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17541) END FROM WidgetInst WHERE WidgetInstId = 17541) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17535) END FROM WidgetInst WHERE WidgetInstId = 17535)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17546;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 17375) END FROM WidgetInst WHERE WidgetInstId = 17375) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17548;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17550) END FROM WidgetInst WHERE WidgetInstId = 17550) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17551;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17550) END FROM WidgetInst WHERE WidgetInstId = 17550) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17550) END FROM WidgetInst WHERE WidgetInstId = 17550) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17557;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17550) END FROM WidgetInst WHERE WidgetInstId = 17550) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17568;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 17375) END FROM WidgetInst WHERE WidgetInstId = 17375) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17571;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17574) END FROM WidgetInst WHERE WidgetInstId = 17574) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17575;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17574) END FROM WidgetInst WHERE WidgetInstId = 17574) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17578;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17574) END FROM WidgetInst WHERE WidgetInstId = 17574) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17581;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17574) END FROM WidgetInst WHERE WidgetInstId = 17574) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17592;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 17596) END FROM WidgetInst WHERE WidgetInstId = 17596) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17597;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17596) END FROM WidgetInst WHERE WidgetInstId = 17596) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17599;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17596) END FROM WidgetInst WHERE WidgetInstId = 17596) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17601;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17596) END FROM WidgetInst WHERE WidgetInstId = 17596) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17603;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17596) END FROM WidgetInst WHERE WidgetInstId = 17596) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17605;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17596) END FROM WidgetInst WHERE WidgetInstId = 17596) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17607;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 17375) END FROM WidgetInst WHERE WidgetInstId = 17375) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 15305) END FROM WidgetInst WHERE WidgetInstId = 15305)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17609;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 17611) END FROM WidgetInst WHERE WidgetInstId = 17611) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17612;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 17616;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 17616;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 17616;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 17616;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 17616;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 17616;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 17616) END FROM WidgetInst WHERE WidgetInstId = 17616) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17617;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 17619) END FROM WidgetInst WHERE WidgetInstId = 17619) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17620;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 17616) END FROM WidgetInst WHERE WidgetInstId = 17616) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17622;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 15302) END FROM WidgetInst WHERE WidgetInstId = 15302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17632;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 15302) END FROM WidgetInst WHERE WidgetInstId = 15302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17635;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 17616) END FROM WidgetInst WHERE WidgetInstId = 17616) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17638;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17640) END FROM WidgetInst WHERE WidgetInstId = 17640) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17641;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17640) END FROM WidgetInst WHERE WidgetInstId = 17640) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17644;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 17616) END FROM WidgetInst WHERE WidgetInstId = 17616) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17647;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17649) END FROM WidgetInst WHERE WidgetInstId = 17649) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17650;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17649) END FROM WidgetInst WHERE WidgetInstId = 17649) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17653;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 17649) END FROM WidgetInst WHERE WidgetInstId = 17649) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17656;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 17616) END FROM WidgetInst WHERE WidgetInstId = 17616) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17659;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 17616) END FROM WidgetInst WHERE WidgetInstId = 17616) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17661) END FROM WidgetInst WHERE WidgetInstId = 17661)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17664;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17663) END FROM WidgetInst WHERE WidgetInstId = 17663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17667;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17663) END FROM WidgetInst WHERE WidgetInstId = 17663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17668;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17663) END FROM WidgetInst WHERE WidgetInstId = 17663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17671;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17663) END FROM WidgetInst WHERE WidgetInstId = 17663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17672;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 17616) END FROM WidgetInst WHERE WidgetInstId = 17616) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17661) END FROM WidgetInst WHERE WidgetInstId = 17661)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17673;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17663) END FROM WidgetInst WHERE WidgetInstId = 17663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17676;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17663) END FROM WidgetInst WHERE WidgetInstId = 17663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17677;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17679) END FROM WidgetInst WHERE WidgetInstId = 17679) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17680;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17663) END FROM WidgetInst WHERE WidgetInstId = 17663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17682;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17663) END FROM WidgetInst WHERE WidgetInstId = 17663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17683;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 17679) END FROM WidgetInst WHERE WidgetInstId = 17679) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17684;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17663) END FROM WidgetInst WHERE WidgetInstId = 17663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17686;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17663) END FROM WidgetInst WHERE WidgetInstId = 17663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17687;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 17616) END FROM WidgetInst WHERE WidgetInstId = 17616) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17688;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 17616) END FROM WidgetInst WHERE WidgetInstId = 17616) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17691;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17728) END FROM WidgetInst WHERE WidgetInstId = 17728) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17729;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17728) END FROM WidgetInst WHERE WidgetInstId = 17728) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17731;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17728) END FROM WidgetInst WHERE WidgetInstId = 17728) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17733;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17616) END FROM WidgetInst WHERE WidgetInstId = 17616) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17735;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17748) END FROM WidgetInst WHERE WidgetInstId = 17748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17749;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17748) END FROM WidgetInst WHERE WidgetInstId = 17748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17751;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17748) END FROM WidgetInst WHERE WidgetInstId = 17748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17753;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 17616) END FROM WidgetInst WHERE WidgetInstId = 17616) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17755;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17772) END FROM WidgetInst WHERE WidgetInstId = 17772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17773;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17772) END FROM WidgetInst WHERE WidgetInstId = 17772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17775;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17772) END FROM WidgetInst WHERE WidgetInstId = 17772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17777;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 17616) END FROM WidgetInst WHERE WidgetInstId = 17616) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17779;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17796) END FROM WidgetInst WHERE WidgetInstId = 17796) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17797;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17796) END FROM WidgetInst WHERE WidgetInstId = 17796) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17799;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17796) END FROM WidgetInst WHERE WidgetInstId = 17796) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17801;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17802) END FROM WidgetInst WHERE WidgetInstId = 17802) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17796) END FROM WidgetInst WHERE WidgetInstId = 17796)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17803;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17802) END FROM WidgetInst WHERE WidgetInstId = 17802) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17796) END FROM WidgetInst WHERE WidgetInstId = 17796)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17805;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17802) END FROM WidgetInst WHERE WidgetInstId = 17802) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17796) END FROM WidgetInst WHERE WidgetInstId = 17796)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17807;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 17616) END FROM WidgetInst WHERE WidgetInstId = 17616) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17809;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17811) END FROM WidgetInst WHERE WidgetInstId = 17811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17812;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17811) END FROM WidgetInst WHERE WidgetInstId = 17811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17815;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17811) END FROM WidgetInst WHERE WidgetInstId = 17811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17818;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17811) END FROM WidgetInst WHERE WidgetInstId = 17811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17829;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 17616) END FROM WidgetInst WHERE WidgetInstId = 17616) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17832;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17839) END FROM WidgetInst WHERE WidgetInstId = 17839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17840;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17839) END FROM WidgetInst WHERE WidgetInstId = 17839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17843;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17839) END FROM WidgetInst WHERE WidgetInstId = 17839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17846;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17839) END FROM WidgetInst WHERE WidgetInstId = 17839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17857;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 17861) END FROM WidgetInst WHERE WidgetInstId = 17861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17862;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17861) END FROM WidgetInst WHERE WidgetInstId = 17861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17864;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17861) END FROM WidgetInst WHERE WidgetInstId = 17861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17866;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17861) END FROM WidgetInst WHERE WidgetInstId = 17861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17868;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17861) END FROM WidgetInst WHERE WidgetInstId = 17861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17870;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17861) END FROM WidgetInst WHERE WidgetInstId = 17861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17872;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 17616) END FROM WidgetInst WHERE WidgetInstId = 17616) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 15305) END FROM WidgetInst WHERE WidgetInstId = 15305)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17874;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 17876) END FROM WidgetInst WHERE WidgetInstId = 17876) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17877;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 17881;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 17881;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 17881;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 17881;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 17881;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 17881;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 17881) END FROM WidgetInst WHERE WidgetInstId = 17881) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17882;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 17884) END FROM WidgetInst WHERE WidgetInstId = 17884) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17885;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 17881) END FROM WidgetInst WHERE WidgetInstId = 17881) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17887;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 15302) END FROM WidgetInst WHERE WidgetInstId = 15302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17897;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 15302) END FROM WidgetInst WHERE WidgetInstId = 15302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17900;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 17881) END FROM WidgetInst WHERE WidgetInstId = 17881) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17903;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17905) END FROM WidgetInst WHERE WidgetInstId = 17905) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17906;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17905) END FROM WidgetInst WHERE WidgetInstId = 17905) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17909;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 17881) END FROM WidgetInst WHERE WidgetInstId = 17881) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17912;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17914) END FROM WidgetInst WHERE WidgetInstId = 17914) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17915;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17914) END FROM WidgetInst WHERE WidgetInstId = 17914) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17918;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 17914) END FROM WidgetInst WHERE WidgetInstId = 17914) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17921;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 17881) END FROM WidgetInst WHERE WidgetInstId = 17881) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17924;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 17881) END FROM WidgetInst WHERE WidgetInstId = 17881) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17926) END FROM WidgetInst WHERE WidgetInstId = 17926)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17929;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17928) END FROM WidgetInst WHERE WidgetInstId = 17928) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17932;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17928) END FROM WidgetInst WHERE WidgetInstId = 17928) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17933;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17928) END FROM WidgetInst WHERE WidgetInstId = 17928) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17936;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17928) END FROM WidgetInst WHERE WidgetInstId = 17928) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17937;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 17881) END FROM WidgetInst WHERE WidgetInstId = 17881) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17926) END FROM WidgetInst WHERE WidgetInstId = 17926)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17938;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17928) END FROM WidgetInst WHERE WidgetInstId = 17928) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17941;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17928) END FROM WidgetInst WHERE WidgetInstId = 17928) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17942;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17944) END FROM WidgetInst WHERE WidgetInstId = 17944) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17945;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17928) END FROM WidgetInst WHERE WidgetInstId = 17928) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17947;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17928) END FROM WidgetInst WHERE WidgetInstId = 17928) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17948;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 17944) END FROM WidgetInst WHERE WidgetInstId = 17944) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17949;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17928) END FROM WidgetInst WHERE WidgetInstId = 17928) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17951;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17928) END FROM WidgetInst WHERE WidgetInstId = 17928) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17952;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 17881) END FROM WidgetInst WHERE WidgetInstId = 17881) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17953;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 17881) END FROM WidgetInst WHERE WidgetInstId = 17881) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17956;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17993) END FROM WidgetInst WHERE WidgetInstId = 17993) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17994;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17993) END FROM WidgetInst WHERE WidgetInstId = 17993) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17996;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17993) END FROM WidgetInst WHERE WidgetInstId = 17993) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17998;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17881) END FROM WidgetInst WHERE WidgetInstId = 17881) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18000;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18013) END FROM WidgetInst WHERE WidgetInstId = 18013) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18014;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18013) END FROM WidgetInst WHERE WidgetInstId = 18013) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18016;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18013) END FROM WidgetInst WHERE WidgetInstId = 18013) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18018;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 17881) END FROM WidgetInst WHERE WidgetInstId = 17881) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18020;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18037) END FROM WidgetInst WHERE WidgetInstId = 18037) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18038;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18037) END FROM WidgetInst WHERE WidgetInstId = 18037) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18040;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18037) END FROM WidgetInst WHERE WidgetInstId = 18037) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18042;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 17881) END FROM WidgetInst WHERE WidgetInstId = 17881) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18044;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18061) END FROM WidgetInst WHERE WidgetInstId = 18061) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18062;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18061) END FROM WidgetInst WHERE WidgetInstId = 18061) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18064;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18061) END FROM WidgetInst WHERE WidgetInstId = 18061) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18066;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18067) END FROM WidgetInst WHERE WidgetInstId = 18067) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18061) END FROM WidgetInst WHERE WidgetInstId = 18061)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18068;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18067) END FROM WidgetInst WHERE WidgetInstId = 18067) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18061) END FROM WidgetInst WHERE WidgetInstId = 18061)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18070;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18067) END FROM WidgetInst WHERE WidgetInstId = 18067) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18061) END FROM WidgetInst WHERE WidgetInstId = 18061)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18072;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 17881) END FROM WidgetInst WHERE WidgetInstId = 17881) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18074;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18076) END FROM WidgetInst WHERE WidgetInstId = 18076) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18077;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18076) END FROM WidgetInst WHERE WidgetInstId = 18076) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18080;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 18076) END FROM WidgetInst WHERE WidgetInstId = 18076) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18083;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 18076) END FROM WidgetInst WHERE WidgetInstId = 18076) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18094;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 17881) END FROM WidgetInst WHERE WidgetInstId = 17881) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18097;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18104) END FROM WidgetInst WHERE WidgetInstId = 18104) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18105;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18104) END FROM WidgetInst WHERE WidgetInstId = 18104) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18108;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 18104) END FROM WidgetInst WHERE WidgetInstId = 18104) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18111;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 18104) END FROM WidgetInst WHERE WidgetInstId = 18104) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18122;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 18126) END FROM WidgetInst WHERE WidgetInstId = 18126) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18127;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18126) END FROM WidgetInst WHERE WidgetInstId = 18126) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18129;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18126) END FROM WidgetInst WHERE WidgetInstId = 18126) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18131;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18126) END FROM WidgetInst WHERE WidgetInstId = 18126) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18133;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18126) END FROM WidgetInst WHERE WidgetInstId = 18126) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18135;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18126) END FROM WidgetInst WHERE WidgetInstId = 18126) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18137;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 17881) END FROM WidgetInst WHERE WidgetInstId = 17881) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 15305) END FROM WidgetInst WHERE WidgetInstId = 15305)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18139;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 18141) END FROM WidgetInst WHERE WidgetInstId = 18141) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18142;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 18146;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 18146;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 18146;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 18146;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 18146;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 18146;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 18146) END FROM WidgetInst WHERE WidgetInstId = 18146) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18147;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 18149) END FROM WidgetInst WHERE WidgetInstId = 18149) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18150;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 18146) END FROM WidgetInst WHERE WidgetInstId = 18146) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18152;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 15302) END FROM WidgetInst WHERE WidgetInstId = 15302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18162;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 15302) END FROM WidgetInst WHERE WidgetInstId = 15302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18165;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 18146) END FROM WidgetInst WHERE WidgetInstId = 18146) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18168;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18170) END FROM WidgetInst WHERE WidgetInstId = 18170) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18171;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18170) END FROM WidgetInst WHERE WidgetInstId = 18170) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18174;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 18146) END FROM WidgetInst WHERE WidgetInstId = 18146) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18177;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18179) END FROM WidgetInst WHERE WidgetInstId = 18179) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18180;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18179) END FROM WidgetInst WHERE WidgetInstId = 18179) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18183;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18179) END FROM WidgetInst WHERE WidgetInstId = 18179) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18186;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18146) END FROM WidgetInst WHERE WidgetInstId = 18146) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18189;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18146) END FROM WidgetInst WHERE WidgetInstId = 18146) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18191) END FROM WidgetInst WHERE WidgetInstId = 18191)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18194;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18193) END FROM WidgetInst WHERE WidgetInstId = 18193) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18197;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18193) END FROM WidgetInst WHERE WidgetInstId = 18193) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18198;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18193) END FROM WidgetInst WHERE WidgetInstId = 18193) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18201;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18193) END FROM WidgetInst WHERE WidgetInstId = 18193) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18202;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18146) END FROM WidgetInst WHERE WidgetInstId = 18146) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18191) END FROM WidgetInst WHERE WidgetInstId = 18191)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18203;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18193) END FROM WidgetInst WHERE WidgetInstId = 18193) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18206;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18193) END FROM WidgetInst WHERE WidgetInstId = 18193) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18207;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18209) END FROM WidgetInst WHERE WidgetInstId = 18209) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18210;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18193) END FROM WidgetInst WHERE WidgetInstId = 18193) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18212;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18193) END FROM WidgetInst WHERE WidgetInstId = 18193) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18213;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18209) END FROM WidgetInst WHERE WidgetInstId = 18209) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18214;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18193) END FROM WidgetInst WHERE WidgetInstId = 18193) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18216;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18193) END FROM WidgetInst WHERE WidgetInstId = 18193) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18217;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 18146) END FROM WidgetInst WHERE WidgetInstId = 18146) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18218;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 18146) END FROM WidgetInst WHERE WidgetInstId = 18146) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18221;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18258) END FROM WidgetInst WHERE WidgetInstId = 18258) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18259;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18258) END FROM WidgetInst WHERE WidgetInstId = 18258) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18261;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18258) END FROM WidgetInst WHERE WidgetInstId = 18258) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18263;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 18146) END FROM WidgetInst WHERE WidgetInstId = 18146) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18265;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18278) END FROM WidgetInst WHERE WidgetInstId = 18278) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18279;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18278) END FROM WidgetInst WHERE WidgetInstId = 18278) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18278) END FROM WidgetInst WHERE WidgetInstId = 18278) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18283;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 18146) END FROM WidgetInst WHERE WidgetInstId = 18146) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18285;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18302) END FROM WidgetInst WHERE WidgetInstId = 18302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18303;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18302) END FROM WidgetInst WHERE WidgetInstId = 18302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18305;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18302) END FROM WidgetInst WHERE WidgetInstId = 18302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18307;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 18146) END FROM WidgetInst WHERE WidgetInstId = 18146) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18309;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18326) END FROM WidgetInst WHERE WidgetInstId = 18326) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18327;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18326) END FROM WidgetInst WHERE WidgetInstId = 18326) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18329;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18326) END FROM WidgetInst WHERE WidgetInstId = 18326) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18331;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18332) END FROM WidgetInst WHERE WidgetInstId = 18332) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18326) END FROM WidgetInst WHERE WidgetInstId = 18326)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18333;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18332) END FROM WidgetInst WHERE WidgetInstId = 18332) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18326) END FROM WidgetInst WHERE WidgetInstId = 18326)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18335;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18332) END FROM WidgetInst WHERE WidgetInstId = 18332) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18326) END FROM WidgetInst WHERE WidgetInstId = 18326)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18337;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 18146) END FROM WidgetInst WHERE WidgetInstId = 18146) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18339;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18341) END FROM WidgetInst WHERE WidgetInstId = 18341) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18342;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18341) END FROM WidgetInst WHERE WidgetInstId = 18341) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18345;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 18341) END FROM WidgetInst WHERE WidgetInstId = 18341) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18348;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 18341) END FROM WidgetInst WHERE WidgetInstId = 18341) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18359;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 18146) END FROM WidgetInst WHERE WidgetInstId = 18146) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18362;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18369) END FROM WidgetInst WHERE WidgetInstId = 18369) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18370;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18369) END FROM WidgetInst WHERE WidgetInstId = 18369) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18373;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 18369) END FROM WidgetInst WHERE WidgetInstId = 18369) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18376;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 18369) END FROM WidgetInst WHERE WidgetInstId = 18369) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18387;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 18391) END FROM WidgetInst WHERE WidgetInstId = 18391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18392;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18391) END FROM WidgetInst WHERE WidgetInstId = 18391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18394;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18391) END FROM WidgetInst WHERE WidgetInstId = 18391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18396;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18391) END FROM WidgetInst WHERE WidgetInstId = 18391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18398;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18391) END FROM WidgetInst WHERE WidgetInstId = 18391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18400;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18391) END FROM WidgetInst WHERE WidgetInstId = 18391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 18146) END FROM WidgetInst WHERE WidgetInstId = 18146) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 15305) END FROM WidgetInst WHERE WidgetInstId = 15305)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18404;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 18406) END FROM WidgetInst WHERE WidgetInstId = 18406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18407;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Restart File' AND WidgetInstId = 18462) END FROM WidgetInst WHERE WidgetInstId = 18462) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18463;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 18462) END FROM WidgetInst WHERE WidgetInstId = 18462) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18465;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parabolic' AND WidgetInstId = 18470) END FROM WidgetInst WHERE WidgetInstId = 18470) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18471;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Frequency' AND WidgetInstId = 18479) END FROM WidgetInst WHERE WidgetInstId = 18479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18480;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Times' AND WidgetInstId = 18479) END FROM WidgetInst WHERE WidgetInstId = 18479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18482;


