public Relation(ViewsManager manager, string name, string description, TableField masterField, TableField detailsField) : this(manager, name, description) { if (null == masterField) { throw new ArgumentNullException("masterField"); } if (null == detailsField) { throw new ArgumentNullException("detailsField"); } this.MasterField = masterField; this.MasterTable = masterField.Table; this.DetailsField = detailsField; this.DetailsTable = detailsField.Table; if (String.IsNullOrEmpty(name)) { this.Name = String.Format("{0}.{1} TO {2}.{3}", this.MasterTable.Name, this.MasterField.Name, this.DetailsTable.Name, this.DetailsField.Name); } this.MasterTable.Relations.Add(this); this.DetailsTable.Relations.Add(this); }
public ViewToken(ViewsManager manager) { if (null == manager) { throw new ArgumentNullException("manager"); } this.ViewsManager = manager; }
public Table(ViewsManager manager, string name) : this(manager) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("table"); } this.Name = name; }
public ComputedField(ViewsManager manager) { if (null == manager) { throw new ArgumentNullException("manager"); } this.Manager = manager; }
public View(ViewsManager manager) { this.Manager = manager; this.Relationship = new RelationsCollection(this.Manager); this.Filters = new FiltersCollection(this.Manager); this.Fields = new FieldsCollection <TableField>(TableField.XML_KEY); this.ComputedFields = new FieldsCollection <ComputedField>(ComputedField.XML_KEY); this.ComputedFields.InitField += new EventHandler <FieldsCollection <ComputedField> .FieldEventArgs>(ComputedFields_InitField); this.Aliases = new Dictionary <Field, string>(); this.OwnParameters = new ParametersCollection(); this.UpdateParameters = new ParametersCollection(); this.Sorting = new ViewSorting(this); this.Subviews = new Dictionary <View, Dictionary <string, Field> >(); }
public View(ViewsManager manager) { this.Manager = manager; this.Relationship = new RelationsCollection(this.Manager); this.Filters = new FiltersCollection(this.Manager); this.Fields = new FieldsCollection<TableField>(TableField.XML_KEY); this.ComputedFields = new FieldsCollection<ComputedField>(ComputedField.XML_KEY); this.ComputedFields.InitField += new EventHandler<FieldsCollection<ComputedField>.FieldEventArgs>(ComputedFields_InitField); this.Aliases = new Dictionary<Field, string>(); this.OwnParameters = new ParametersCollection(); this.UpdateParameters = new ParametersCollection(); this.Sorting = new ViewSorting(this); this.Subviews = new Dictionary<View, Dictionary<string, Field>>(); }
public Relation(ViewsManager manager, string name, string description, TableField masterField, TableField detailsField) : this(manager, name, description) { if (null == masterField) throw new ArgumentNullException("masterField"); if (null == detailsField) throw new ArgumentNullException("detailsField"); this.MasterField = masterField; this.MasterTable = masterField.Table; this.DetailsField = detailsField; this.DetailsTable = detailsField.Table; if (String.IsNullOrEmpty(name)) this.Name = String.Format("{0}.{1} TO {2}.{3}", this.MasterTable.Name, this.MasterField.Name, this.DetailsTable.Name, this.DetailsField.Name); this.MasterTable.Relations.Add(this); this.DetailsTable.Relations.Add(this); }
public IEnumerable <Table> RelatableTables() { ViewsManager vm = this.Manager; if (this.Relationship.Count == 0) { return new Table[] { this.Source } } ; return(vm.Tables .Values .Where(t => { return vm.Relations .Select <Relation, Table>(rel => rel.MasterTable) .Union(vm.Relations .Select <Relation, Table>(rel => rel.DetailsTable)) .Where(tb => { return this.Relationship .Any(r => { return r.DetailsTable == tb || r.MasterTable == tb; }) || vm.Relations .Any(r => { return ((r.MasterTable == tb && r.DetailsTable == this.Source) || (r.DetailsTable == tb && r.MasterTable == this.Source)); }); }) .Contains(t); })); }
public RelationsCollection(ViewsManager manager) { this.Relations = new List <Relation>(); this.Manager = manager; }
public Relation(ViewsManager manager) { this.Manager = manager; }
public Relation(ViewsManager manager, string name, string description) : this(manager) { this.Name = name; this.Description = description; }
public Database(string name, string viewsKey, IStorageAgent agent, IExpressionsManager expressionsManager) { this.Name = name; this.ViewsKey = viewsKey; this.ViewsManager = new ViewsManager(viewsKey, agent, expressionsManager); }
public Table(ViewsManager manager, string name, string description) : this(manager, name) { this.Description = description; }
public Table(ViewsManager manager) { this.Manager = manager; this.Relations = new RelationsCollection(manager); this.Fields = new FieldsCollection <TableField>(TableField.XML_KEY); }
public ViewToken(ViewsManager manager) { if (null == manager) throw new ArgumentNullException("manager"); this.ViewsManager = manager; }
public ViewsCollection(ViewsManager manager) { this.Manager = manager; }
public FiltersCollection(ViewsManager manager) { this.Manager = manager; }
public Table(ViewsManager manager) { this.Manager = manager; this.Relations = new RelationsCollection(manager); this.Fields = new FieldsCollection<TableField>(TableField.XML_KEY); }
public Filter(ViewsManager manager) { this.Manager = manager; }
public Table(ViewsManager manager, string name) : this(manager) { if (String.IsNullOrEmpty(name)) throw new ArgumentNullException("table"); this.Name = name; }
public ComputedField(ViewsManager manager) { if (null == manager) throw new ArgumentNullException("manager"); this.Manager = manager; }