/// <summary>
 /// Enum types are equal by primary key
 /// </summary>
 public bool Equals(ImpProcessingTableType other)
 {
     if (other == null)
     {
         return(false);
     }
     return(other.ImpProcessingTableTypeID == ImpProcessingTableTypeID);
 }
예제 #2
0
        public static ImpProcessing GetLatestImportProcessingForGivenType(DatabaseEntities databaseEntities, ImpProcessingTableType impProcessingTableType)
        {
            var latestImportProcessingForPnBudget = databaseEntities.ImpProcessings.
                                                    Where(ip => ip.ImpProcessingTableTypeID == impProcessingTableType.ImpProcessingTableTypeID).
                                                    ToList().OrderBy(ip => ip.UploadDate).
                                                    LastOrDefault();

            return(latestImportProcessingForPnBudget);
        }
예제 #3
0
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static ImpProcessing CreateNewBlank(ImpProcessingTableType impProcessingTableType)
 {
     return(new ImpProcessing(impProcessingTableType));
 }
예제 #4
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public ImpProcessing(ImpProcessingTableType impProcessingTableType) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.ImpProcessingID          = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.ImpProcessingTableTypeID = impProcessingTableType.ImpProcessingTableTypeID;
 }