/// <summary> /// Creates a "blank" object of this type and populates primitives with defaults /// </summary> public static BudgetObjectCode CreateNewBlank(BudgetObjectCodeGroup budgetObjectCodeGroup) { return(new BudgetObjectCode(default(string), default(string), default(int), budgetObjectCodeGroup, default(bool))); }
public static void DeleteBudgetObjectCodeGroup(this IQueryable <BudgetObjectCodeGroup> budgetObjectCodeGroups, BudgetObjectCodeGroup budgetObjectCodeGroupToDelete) { DeleteBudgetObjectCodeGroup(budgetObjectCodeGroups, new List <BudgetObjectCodeGroup> { budgetObjectCodeGroupToDelete }); }
/// <summary> /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible /// </summary> public BudgetObjectCode(string budgetObjectCodeName, string budgetObjectCodeItemDescription, int fbmsYear, BudgetObjectCodeGroup budgetObjectCodeGroup, bool isExpiredOrDeleted) : this() { // Mark this as a new object by setting primary key with special value this.BudgetObjectCodeID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue(); this.BudgetObjectCodeName = budgetObjectCodeName; this.BudgetObjectCodeItemDescription = budgetObjectCodeItemDescription; this.FbmsYear = fbmsYear; this.BudgetObjectCodeGroupID = budgetObjectCodeGroup.BudgetObjectCodeGroupID; this.BudgetObjectCodeGroup = budgetObjectCodeGroup; budgetObjectCodeGroup.BudgetObjectCodes.Add(this); this.IsExpiredOrDeleted = isExpiredOrDeleted; }