/// <summary> /// Enum types are equal by primary key /// </summary> public bool Equals(LandownerCostShareLineItemStatus other) { if (other == null) { return(false); } return(other.LandownerCostShareLineItemStatusID == LandownerCostShareLineItemStatusID); }
/// <summary> /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible /// </summary> public GrantAllocationAwardLandownerCostShareLineItem(Project project, LandownerCostShareLineItemStatus landownerCostShareLineItemStatus, decimal grantAllocationAwardLandownerCostShareLineItemAllocatedAmount, decimal grantAllocationAwardLandownerCostShareLineItemTotalCost) : this() { // Mark this as a new object by setting primary key with special value this.GrantAllocationAwardLandownerCostShareLineItemID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue(); this.ProjectID = project.ProjectID; this.Project = project; project.GrantAllocationAwardLandownerCostShareLineItems.Add(this); this.LandownerCostShareLineItemStatusID = landownerCostShareLineItemStatus.LandownerCostShareLineItemStatusID; this.GrantAllocationAwardLandownerCostShareLineItemAllocatedAmount = grantAllocationAwardLandownerCostShareLineItemAllocatedAmount; this.GrantAllocationAwardLandownerCostShareLineItemTotalCost = grantAllocationAwardLandownerCostShareLineItemTotalCost; }
/// <summary> /// Creates a "blank" object of this type and populates primitives with defaults /// </summary> public static GrantAllocationAwardLandownerCostShareLineItem CreateNewBlank(Project project, LandownerCostShareLineItemStatus landownerCostShareLineItemStatus) { return(new GrantAllocationAwardLandownerCostShareLineItem(project, landownerCostShareLineItemStatus, default(decimal), default(decimal))); }