public AddLawForm(Budget Budget) : this() { this.set_Text("Добавление закона"); this.budget = Budget; this.law = new Law(); this.law.Id = -1L; this.law.BudgetId = this.budget.Id; }
public static Budget AddBudget(DataTransferObject budgetDTO) { Budget budget = new Budget(); budget.SaveChanges(budgetDTO); if (Budgets.FindById(budget.Id) == null) { Budgets.Add(budget); } return budget; }