Beispiel #1
0
 /// <summary>
 /// Enum types are equal by primary key
 /// </summary>
 public bool Equals(InvoiceMatchAmountType other)
 {
     if (other == null)
     {
         return(false);
     }
     return(other.InvoiceMatchAmountTypeID == InvoiceMatchAmountTypeID);
 }
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static Invoice CreateNewBlank(Person preparedByPerson, InvoiceApprovalStatus invoiceApprovalStatus, InvoiceMatchAmountType invoiceMatchAmountType, InvoiceStatus invoiceStatus)
 {
     return(new Invoice(default(string), default(DateTime), preparedByPerson, invoiceApprovalStatus, default(bool), invoiceMatchAmountType, invoiceStatus));
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public Invoice(string requestorName, DateTime invoiceDate, Person preparedByPerson, InvoiceApprovalStatus invoiceApprovalStatus, bool purchaseAuthorityIsLandownerCostShareAgreement, InvoiceMatchAmountType invoiceMatchAmountType, InvoiceStatus invoiceStatus) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.InvoiceID          = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.RequestorName      = requestorName;
     this.InvoiceDate        = invoiceDate;
     this.PreparedByPersonID = preparedByPerson.PersonID;
     this.PreparedByPerson   = preparedByPerson;
     preparedByPerson.InvoicesWhereYouAreThePreparedByPerson.Add(this);
     this.InvoiceApprovalStatusID = invoiceApprovalStatus.InvoiceApprovalStatusID;
     this.PurchaseAuthorityIsLandownerCostShareAgreement = purchaseAuthorityIsLandownerCostShareAgreement;
     this.InvoiceMatchAmountTypeID = invoiceMatchAmountType.InvoiceMatchAmountTypeID;
     this.InvoiceStatusID          = invoiceStatus.InvoiceStatusID;
 }