public bool IsConnectedTo(Model.Entities.ObjectType objectType, int objectK) { if (objectType.Equals(Model.Entities.ObjectType.Brand) && this.K == objectK) return true; if (objectType.Equals(Model.Entities.ObjectType.Group) && this.GroupK == objectK) return true; if (Group.CanBeConnectedToStatic(objectType) && this.Group.IsConnectedTo(objectType, objectK)) return true; return false; }
public static bool CanBeConnectedToStatic(Model.Entities.ObjectType o) { if (o.Equals(Model.Entities.ObjectType.Group)) return true; if (Group.CanBeConnectedToStatic(o)) return true; return false; }
public static bool CanBeConnectedToStatic(Model.Entities.ObjectType o) { if (o.Equals(Model.Entities.ObjectType.Event) || o.Equals(Model.Entities.ObjectType.Article)) return true; if (Event.CanBeConnectedToStatic(o)) return true; if (Article.CanBeConnectedToStatic(o)) return true; return false; }
public bool IsConnectedTo(Model.Entities.ObjectType objectType, int objectK) { if (objectType.Equals(Model.Entities.ObjectType.Photo) && this.K == objectK) return true; if (objectType.Equals(Model.Entities.ObjectType.Gallery) && this.GalleryK == objectK) return true; if (this.EventK > 0) { if (objectType.Equals(Model.Entities.ObjectType.Event) && this.EventK == objectK) return true; if (Event.CanBeConnectedToStatic(objectType) && this.Event.IsConnectedTo(objectType, objectK)) return true; } else if (this.ArticleK > 0) { if (objectType.Equals(Model.Entities.ObjectType.Article) && this.ArticleK == objectK) return true; if (Article.CanBeConnectedToStatic(objectType) && this.Article.IsConnectedTo(objectType, objectK)) return true; } return false; }
public bool IsConnectedTo(Model.Entities.ObjectType objectType, int objectK) { return objectType.Equals(Model.Entities.ObjectType.Country) && this.K == objectK; }
public bool IsConnectedTo(Model.Entities.ObjectType objectType, int objectK) { if (objectType.Equals(Model.Entities.ObjectType.Article) && this.K == objectK) return true; if (this.ParentObject is IConnectedTo) { IConnectedTo parent = (IConnectedTo)this.ParentObject; if (objectType.Equals(this.ParentObjectType) && this.ParentObjectK == objectK) return true; if (parent.CanBeConnectedTo(objectType) && parent.IsConnectedTo(objectType, objectK)) return true; } return false; }
public static bool CanBeConnectedToStatic(Model.Entities.ObjectType o) { if (o.Equals(Model.Entities.ObjectType.Country)) return true; return false; }
public bool IsConnectedTo(Model.Entities.ObjectType objectType, int objectK) { if (objectType.Equals(Model.Entities.ObjectType.Place) && this.K == objectK) return true; if (objectType.Equals(Model.Entities.ObjectType.Country) && this.CountryK == objectK) return true; return false; }
public bool IsConnectedTo(Model.Entities.ObjectType objectType, int objectK) { if (objectType.Equals(Model.Entities.ObjectType.Group) && this.K == objectK) return true; if (objectType.Equals(Model.Entities.ObjectType.Brand) && this.BrandK == objectK) //This is to stop a circular reference return true; if (this.PlaceK > 0) { if (objectType.Equals(Model.Entities.ObjectType.Place) && this.PlaceK == objectK) return true; if (Place.CanBeConnectedToStatic(objectType) && this.Place.IsConnectedTo(objectType, objectK)) return true; } else if (this.CountryK > 0) { if (objectType.Equals(Model.Entities.ObjectType.Country) && this.CountryK == objectK) return true; } return false; }