예제 #1
0
 /// <summary>
 /// Enum types are equal by primary key
 /// </summary>
 public bool Equals(ReportTemplateModel other)
 {
     if (other == null)
     {
         return(false);
     }
     return(other.ReportTemplateModelID == ReportTemplateModelID);
 }
예제 #2
0
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static ReportTemplate CreateNewBlank(FileResourceInfo fileResourceInfo, ReportTemplateModelType reportTemplateModelType, ReportTemplateModel reportTemplateModel)
 {
     return(new ReportTemplate(fileResourceInfo, default(string), reportTemplateModelType, reportTemplateModel));
 }
예제 #3
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public ReportTemplate(FileResourceInfo fileResourceInfo, string displayName, ReportTemplateModelType reportTemplateModelType, ReportTemplateModel reportTemplateModel) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.ReportTemplateID   = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.FileResourceInfoID = fileResourceInfo.FileResourceInfoID;
     this.FileResourceInfo   = fileResourceInfo;
     fileResourceInfo.ReportTemplates.Add(this);
     this.DisplayName = displayName;
     this.ReportTemplateModelTypeID = reportTemplateModelType.ReportTemplateModelTypeID;
     this.ReportTemplateModelID     = reportTemplateModel.ReportTemplateModelID;
 }