public static string GetDisplayName(this GrantModificationStatus grantModificationStatus)
 {
     return(grantModificationStatus != null ? grantModificationStatus.GrantModificationStatusName : string.Empty);
 }
Exemple #2
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public GrantModification(string grantModificationName, Grant grant, DateTime grantModificationStartDate, DateTime grantModificationEndDate, GrantModificationStatus grantModificationStatus, decimal grantModificationAmount) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.GrantModificationID   = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.GrantModificationName = grantModificationName;
     this.GrantID = grant.GrantID;
     this.Grant   = grant;
     grant.GrantModifications.Add(this);
     this.GrantModificationStartDate = grantModificationStartDate;
     this.GrantModificationEndDate   = grantModificationEndDate;
     this.GrantModificationStatusID  = grantModificationStatus.GrantModificationStatusID;
     this.GrantModificationStatus    = grantModificationStatus;
     grantModificationStatus.GrantModifications.Add(this);
     this.GrantModificationAmount = grantModificationAmount;
 }
Exemple #3
0
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static GrantModification CreateNewBlank(Grant grant, GrantModificationStatus grantModificationStatus)
 {
     return(new GrantModification(default(string), grant, default(DateTime), default(DateTime), grantModificationStatus, default(decimal)));
 }
 public static void DeleteGrantModificationStatus(this IQueryable <GrantModificationStatus> grantModificationStatuses, GrantModificationStatus grantModificationStatusToDelete)
 {
     DeleteGrantModificationStatus(grantModificationStatuses, new List <GrantModificationStatus> {
         grantModificationStatusToDelete
     });
 }