示例#1
0
        /// <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;
            }
        }
示例#2
0
 /// <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;
 }
示例#3
0
 /// <summary>
 /// Sets the template weak.
 /// </summary>
 /// <param name="recordTemplate">
 /// The record template.
 /// </param>
 public void SetTemplateWeak(RecordTemplate recordTemplate)
 {
     this.ReplaceRecordTemplate(recordTemplate, false);
 }
示例#4
0
 /// <summary>
 /// Sets the template.
 /// </summary>
 /// <param name="recordTemplate">
 /// The record template.
 /// </param>
 public void SetTemplate(RecordTemplate recordTemplate)
 {
     this.ReplaceRecordTemplate(recordTemplate, true);
 }
示例#5
0
 /// <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));
 }