コード例 #1
0
        /// <summary>
        /// Get the "locate" boundary definition of the field
        /// </summary>
        /// <param name="Field"></param>
        /// <param name="indexInView"></param>
        /// <returns></returns>
        internal FieldBoundaries GetFieldLocate(IFieldView Field, int indexInView)
        {
            FieldBoundaries boundary = null;

            if (Field.Locate != null)
            {
                boundary        = GetFieldBoundary(Field, indexInView);
                boundary.Locate = Field.Locate;
            }
            return(boundary);
        }
コード例 #2
0
        /// <summary>
        /// Get the "range" boundary definition of the field
        /// </summary>
        /// <param name="Field"></param>
        /// <param name="indexInView"></param>
        /// <returns></returns>
        internal FieldBoundaries GetFieldRange(IFieldView Field, int indexInView)
        {
            FieldBoundaries boundary = null;

            if (Field.Range != null)
            {
                boundary       = GetFieldBoundary(Field, indexInView);
                boundary.Range = Field.Range;
            }
            return(boundary);
        }
コード例 #3
0
 /// <summary>
 /// find time pair for date
 /// </summary>
 /// <param name="dateIsn">  isn of date field in table</param>
 /// <returns> index of time pare of given date. If not found returns null</returns>
 int?FindTimePairIndexInRanges(long dateIsn)
 {
     for (int i = 0; i < runtimeBoundaries.Count; i++)
     {
         FieldBoundaries boundary = runtimeBoundaries[i];
         if (boundary.TimeFieldDbIsn == dateIsn)
         {
             return(i);
         }
     }
     return(null);
 }
コード例 #4
0
        /// <summary>
        /// add field's ranges to the collection
        /// </summary>
        /// <param name="field"></param>
        /// <param name="indexInView"></param>
        internal void AddFieldBoundaries(IFieldView field, int indexInView)
        {
            FieldBoundaries fieldBoundaries = GetFieldRange(field, indexInView);

            if (fieldBoundaries != null)
            {
                runtimeBoundaries.Add(fieldBoundaries);
            }

            fieldBoundaries = GetFieldLocate(field, indexInView);
            if (fieldBoundaries != null)
            {
                runtimeBoundaries.Add(fieldBoundaries);
                HasLocate = true;
            }
        }
コード例 #5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="Field"></param>
        /// <param name="indexInView"></param>
        /// <returns></returns>
        private FieldBoundaries GetFieldBoundary(IFieldView Field, int indexInView)
        {
            FieldBoundaries     boundary        = new FieldBoundaries();
            RuntimeReadOnlyView runtimeRealView = RuntimeViewBase as RuntimeReadOnlyView;

            boundary.IndexInView      = indexInView;
            boundary.IsLink           = Field.IsLink;
            boundary.StorageAttribute = Field.StorageAttribute;

            if (runtimeRealView != null)
            {
                boundary.DBField = runtimeRealView.GetDbField(boundary.IndexInView);
            }

            return(boundary);
        }