Ejemplo n.º 1
0
 /// <summary>
 /// Enum types are equal by primary key
 /// </summary>
 public bool Equals(ObligationRequestStatus other)
 {
     if (other == null)
     {
         return(false);
     }
     return(other.ObligationRequestStatusID == ObligationRequestStatusID);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public ObligationRequest(bool isModification, ContractType contractType, ObligationRequestStatus obligationRequestStatus, string descriptionOfNeed, DateTime createDate, Person createPerson) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.ObligationRequestID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.IsModification      = isModification;
     this.ContractTypeID      = contractType.ContractTypeID;
     this.ContractType        = contractType;
     contractType.ObligationRequests.Add(this);
     this.ObligationRequestStatusID = obligationRequestStatus.ObligationRequestStatusID;
     this.DescriptionOfNeed         = descriptionOfNeed;
     this.CreateDate     = createDate;
     this.CreatePersonID = createPerson.PersonID;
     this.CreatePerson   = createPerson;
     createPerson.ObligationRequestsWhereYouAreTheCreatePerson.Add(this);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static ObligationRequest CreateNewBlank(ContractType contractType, ObligationRequestStatus obligationRequestStatus, Person createPerson)
 {
     return(new ObligationRequest(default(bool), contractType, obligationRequestStatus, default(string), default(DateTime), createPerson));
 }