コード例 #1
0
 /// <summary>
 /// Constructor for building a new simple object with the POCO class
 /// </summary>
 public OrganizationTypeSimple(OrganizationType organizationType)
     : this()
 {
     OrganizationTypeID           = organizationType.OrganizationTypeID;
     OrganizationTypeName         = organizationType.OrganizationTypeName;
     OrganizationTypeAbbreviation = organizationType.OrganizationTypeAbbreviation;
     LegendColor = organizationType.LegendColor;
 }
コード例 #2
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public Organization(string organizationName, bool isActive, OrganizationType organizationType) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.OrganizationID     = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.OrganizationName   = organizationName;
     this.IsActive           = isActive;
     this.OrganizationTypeID = organizationType.OrganizationTypeID;
     this.OrganizationType   = organizationType;
     organizationType.Organizations.Add(this);
 }
コード例 #3
0
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static Organization CreateNewBlank(OrganizationType organizationType)
 {
     return(new Organization(default(string), default(bool), organizationType));
 }
コード例 #4
0
 public static void DeleteOrganizationType(this IQueryable <OrganizationType> organizationTypes, OrganizationType organizationTypeToDelete)
 {
     DeleteOrganizationType(organizationTypes, new List <OrganizationType> {
         organizationTypeToDelete
     });
 }