/// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static Classification CreateNewBlank(ClassificationSystem classificationSystem)
 {
     return(new Classification(default(string), default(string), default(string), classificationSystem));
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public Classification(string classificationDescription, string themeColor, string displayName, ClassificationSystem classificationSystem) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.ClassificationID          = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.ClassificationDescription = classificationDescription;
     this.ThemeColor             = themeColor;
     this.DisplayName            = displayName;
     this.ClassificationSystemID = classificationSystem.ClassificationSystemID;
     this.ClassificationSystem   = classificationSystem;
     classificationSystem.Classifications.Add(this);
 }
 public static void DeleteClassificationSystem(this IQueryable <ClassificationSystem> classificationSystems, ClassificationSystem classificationSystemToDelete)
 {
     DeleteClassificationSystem(classificationSystems, new List <ClassificationSystem> {
         classificationSystemToDelete
     });
 }
Пример #4
0
 public static string GetEditProjectClassificationsUrl(this ClassificationSystem classificationSystem, Project project)
 {
     return(SitkaRoute <ProjectClassificationController> .BuildUrlFromExpression(t => t.EditProjectClassificationsForProject(project, classificationSystem)));
 }
 public static string GetClassificationSystemNamePluralized(ClassificationSystem classificationSystem) =>
 FieldDefinitionModelExtensions.PluralizationService.Pluralize(classificationSystem.ClassificationSystemName);
 public static string GetContentUrl(this ClassificationSystem classificationSystem)
 {
     return(SitkaRoute <FieldDefinitionController> .BuildUrlFromExpression(x =>
                                                                           x.FieldDefinitionDetailsForClassificationSystem(classificationSystem.ClassificationSystemID)));
 }