Пример #1
0
        /// <summary>
        /// return view that own this field
        /// </summary>
        /// <param name="field"></param>
        /// <returns></returns>
        RuntimeViewBase GetView(IFieldView field)
        {
            RuntimeViewBase view = null;

            if (field.IsVirtual)
            {
                view = VirtualView;
            }
            else
            {
                int linkId = field.DataviewHeaderId;
                if (ViewMain != null && ((IDataviewHeader)ViewMain.DataSourceViewDefinition).Id == linkId)
                {
                    view = ViewMain;
                }
                else if (LinkViews.ContainsKey(linkId))
                {
                    view = LinkViews[linkId];
                }
                else
                {
                    view = RemoteRuntimeView;
                }
            }
            return(view);
        }
Пример #2
0
 /// <summary>
 /// map all fields to the views they belong to
 /// </summary>
 internal void MapRecordFields()
 {
     for (int i = 0; i < Fields.Count; i++)
     {
         IFieldView      field = Fields[i];
         RuntimeViewBase view  = GetView(field);
         view.MapFieldDefinition(field, i);
     }
 }