public FilterVisitor( IMasterDetailRelationship masterDetailRelationship, IMasterDetailRowArguments masterDetailRowArguments, ITypePropertyAccessorCache propertyValueAccessorCache) { _masterDetailRelationship = masterDetailRelationship ?? throw new ArgumentNullException(nameof(masterDetailRelationship)); _masterDetailRowArguments = masterDetailRowArguments ?? throw new ArgumentNullException(nameof(masterDetailRowArguments)); _propertyValueAccessorCache = propertyValueAccessorCache ?? throw new ArgumentNullException(nameof(propertyValueAccessorCache)); }
public LazyLoadingRouteParamVisitor( IMasterDetailRelationship masterDetailRelationship, IMasterDetailRowArguments masterDetailRowArguments, ITypePropertyAccessorCache propertyValueAccessorCache ) { this.masterDetailRelationship = masterDetailRelationship ?? throw new ArgumentNullException(nameof(masterDetailRelationship)); this.masterDetailRowArguments = masterDetailRowArguments ?? throw new ArgumentNullException(nameof(masterDetailRowArguments)); this.propertyValueAccessorCache = propertyValueAccessorCache ?? throw new ArgumentNullException(nameof(propertyValueAccessorCache)); }
public static string DetailGridDeleteUrl(this IMasterDetailRelationship masterDetailRelationship) { var deleteUrl = masterDetailRelationship[GridViewAnnotationNames.DetailDeleteUrl]; if (deleteUrl is NullAnotationValue) { return(string.Empty); } return(deleteUrl.ToString()); }
public static string DetailGridLazyLoadingUrl(this IMasterDetailRelationship masterDetailRelationship) { var lazyLoadingUrl = masterDetailRelationship[GridViewAnnotationNames.DetailLazyLoadingUrl]; if (lazyLoadingUrl is NullAnotationValue) { return(string.Empty); } return(lazyLoadingUrl.ToString()); }
public static string DetailGridViewPageCaption(this IMasterDetailRelationship masterDetailRelationship, ITableDataAdapter tableDataAdapter) { if (tableDataAdapter == null) { throw new ArgumentNullException(nameof(tableDataAdapter)); } var tabCaptionAnnotationValue = masterDetailRelationship[GridViewAnnotationNames.DetailTabPageCaption]; if (tabCaptionAnnotationValue is NullAnotationValue) { return(tableDataAdapter.DefaultTitle()); } return(tabCaptionAnnotationValue.ToString()); }
public static int DetailGridViewPageSize(this IMasterDetailRelationship masterDetailRelationship, ITableDataSet masterTableDataSet) { if (masterTableDataSet == null) { throw new ArgumentNullException(nameof(masterTableDataSet)); } var pageSizeAnnotationValue = masterDetailRelationship[GridViewAnnotationNames.DetailTabPageSize]; if (pageSizeAnnotationValue is NullAnotationValue) { return(masterTableDataSet.PageableOptions.PageSize); } return((int)pageSizeAnnotationValue); }
private void ConfigureMasterDetailRelationShip(IMasterDetailRelationship masterDetailRelationship, PropertyInfo propertyInfo) { var relationShipBuilder = new InternalMasterDetailRelationshipBuilder(masterDetailRelationship as MasterDetailRelationship, InternalModelBuilder); var pageSizeAnnotationValue = masterDetailRelationship[GridViewAnnotationNames.DetailTabPageSize]; var pageCaptionAnnotationValue = masterDetailRelationship[GridViewAnnotationNames.DetailTabPageCaption]; if (pageSizeAnnotationValue is NullAnnotationValue) { relationShipBuilder.HasPageSize(DefaultPageSize); } if (pageCaptionAnnotationValue is NullAnnotationValue) { relationShipBuilder.HasCaption(propertyInfo.Name); } }