protected void _OnNavigating(object entity) { if (Navigating != null) { Navigating(entity); } else { var options = new NavigateOptions(); bool isReadOnly = (ReadonlyEntity ?? Common.GetIsReadOnly(this)); if (isReadOnly) { options.ReadOnly = isReadOnly; } Navigator.NavigateUntyped(entity, options); } }
private object _OnViewing(object entity, bool creating) { if (Viewing != null) { return(Viewing(entity)); } var options = new ViewOptions { PropertyRoute = CleanType.IsEmbeddedEntity() ? GetEntityPropertyRoute() : null, }; bool isReadOnly = (ReadonlyEntity ?? Common.GetIsReadOnly(this)) && !creating; if (isReadOnly) { options.ReadOnly = isReadOnly; } return(Navigator.ViewUntyped(entity, options)); }
protected override bool CanRemove() { return(Remove && !Common.GetIsReadOnly(this)); }
protected virtual bool CanCreate() { return(Entity == null && Create && !Common.GetIsReadOnly(this)); }
protected virtual bool CanRemove() { return(Entity != null && Remove && !Common.GetIsReadOnly(this)); }
protected virtual bool CanFind() { return(Entity == null && Find && !Common.GetIsReadOnly(this)); }
public bool CanAutocomplete() { return(!Common.GetIsReadOnly(this) && Autocomplete); }
protected virtual bool CanMove() { return(Move && !Common.GetIsReadOnly(this)); }
protected override bool CanCreate() { return(Create && !Common.GetIsReadOnly(this)); }
protected override bool CanFind() { return(Find && !Common.GetIsReadOnly(this)); }
protected bool CanAutocomplete() { return(Autocomplete && !Common.GetIsReadOnly(this)); }