/// <summary> /// Enum types are equal by primary key /// </summary> public bool Equals(GrantAllocationAwardTravelLineItemType other) { if (other == null) { return(false); } return(other.GrantAllocationAwardTravelLineItemTypeID == GrantAllocationAwardTravelLineItemTypeID); }
/// <summary> /// Creates a "blank" object of this type and populates primitives with defaults /// </summary> public static GrantAllocationAwardTravelLineItem CreateNewBlank(GrantAllocationAward grantAllocationAward, GrantAllocationAwardTravelLineItemType grantAllocationAwardTravelLineItemType) { return(new GrantAllocationAwardTravelLineItem(grantAllocationAward, default(string), default(DateTime), grantAllocationAwardTravelLineItemType)); }
/// <summary> /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible /// </summary> public GrantAllocationAwardTravelLineItem(GrantAllocationAward grantAllocationAward, string grantAllocationAwardTravelLineItemTarOrMonth, DateTime grantAllocationAwardTravelLineItemDate, GrantAllocationAwardTravelLineItemType grantAllocationAwardTravelLineItemType) : this() { // Mark this as a new object by setting primary key with special value this.GrantAllocationAwardTravelLineItemID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue(); this.GrantAllocationAwardID = grantAllocationAward.GrantAllocationAwardID; this.GrantAllocationAward = grantAllocationAward; grantAllocationAward.GrantAllocationAwardTravelLineItems.Add(this); this.GrantAllocationAwardTravelLineItemTarOrMonth = grantAllocationAwardTravelLineItemTarOrMonth; this.GrantAllocationAwardTravelLineItemDate = grantAllocationAwardTravelLineItemDate; this.GrantAllocationAwardTravelLineItemTypeID = grantAllocationAwardTravelLineItemType.GrantAllocationAwardTravelLineItemTypeID; }