/// <summary> /// Replaces the record template. /// </summary> /// <param name="recordTemplate"> /// The record template. /// </param> /// <param name="ownership"> /// if set to <c>true</c> [ownership]. /// </param> private void ReplaceRecordTemplate(RecordTemplate recordTemplate, bool ownership) { this.RecordTemplate = recordTemplate; if (this.RecordTemplate != null) { this.valueCount = recordTemplate.FieldIdCount + recordTemplate.LinkFieldNameCount; } }
/// <summary> /// Initializes a new instance of the <see cref="RecordTemplate"/> class. /// </summary> /// <param name="source"> /// The source. /// </param> public RecordTemplate(RecordTemplate source) : this( source.Database, source.InfoAreaId, source.FieldIdCount, source.fieldIds, source.LinkFieldNameCount, source.linkFieldNames) { this.isSync = source.isSync; this.IncludeLookupForNew = source.IncludeLookupForNew; this.IncludeLookupForUpdate = source.IncludeLookupForUpdate; }
/// <summary> /// Sets the template weak. /// </summary> /// <param name="recordTemplate"> /// The record template. /// </param> public void SetTemplateWeak(RecordTemplate recordTemplate) { this.ReplaceRecordTemplate(recordTemplate, false); }
/// <summary> /// Sets the template. /// </summary> /// <param name="recordTemplate"> /// The record template. /// </param> public void SetTemplate(RecordTemplate recordTemplate) { this.ReplaceRecordTemplate(recordTemplate, true); }
/// <summary> /// Trees the item from record template. /// </summary> /// <param name="recordTemplate"> /// The record template. /// </param> /// <returns> /// The <see cref="QueryTreeItem"/>. /// </returns> public QueryTreeItem TreeItemFromRecordTemplate(RecordTemplate recordTemplate) { return(this.RootTreeItem?.TreeItemFromRecordTemplate(recordTemplate)); }