public void LoadData(Budget budget) { BudgetCalculatorEvaluator.Budget = budget; LoadValueTypes(); LoadOperatorTypes(); Budget = budget; if (Database.Count <BudgetCalculatorEquation>() > 0) { LastEquationPosition = Database.ExecuteScalar <int>("SELECT MAX(Position) FROM [BudgetCalculatorEquation]"); } var equations = CachedService.GetAllEquations(); equations.ForEach(x => { BudgetCalculatorEvaluator.Refresh(x); }); Equations.IsNotifying = false; Equations.Clear(); Equations.AddRange(equations); Equations.IsNotifying = true; Equations.Refresh(); }
/// <summary> /// Initializes a new instance of the <see cref="LinearEquationSystem" /> class. /// </summary> /// <param name="equations"> /// The <see cref="LinearEquation" />s that this <see cref="LinearEquationSystem" /> should /// contain. /// </param> public LinearEquationSystem(params LinearEquation[] equations) { Equations.AddRange(equations); }
/// <summary> /// Initializes a new instance of the <see cref="LinearEquationSystem" /> class. /// </summary> /// <param name="equations"> /// The <see cref="LinearEquation" />s that this <see cref="LinearEquationSystem" /> should /// contain. /// </param> public LinearEquationSystem(IEnumerable <LinearEquation> equations) { Equations.AddRange(equations); }