예제 #1
0
        public void Create(Model.RelationshipType RelationshipType)
        {
            if (!this.TableCache.ContainsKey(RelationshipType))
            {
                if (RelationshipType.Name.Equals(RootRelationshipTypeName))
                {
                    this.RootRelationshipType = RelationshipType;
                }

                this.TableCache[RelationshipType]       = new Table(this, RelationshipType);
                this.ItemTypeCache[RelationshipType.ID] = RelationshipType;
            }
        }
예제 #2
0
        public RelationshipGrid(IItemControl Parent, Model.RelationshipType RelationshipType)
            : base(Parent.Session)
        {
            // Create Search
            this.Grid        = new Grids.Relationship(Parent, RelationshipType);
            this.Grid.Region = Regions.Center;

            // Set Toolbar
            this.Toolbar        = ((IToolbarProvider)this.Grid).Toolbar;
            this.Toolbar.Region = Regions.Top;

            // Add Children
            this.Children.Add(this.Toolbar);
            this.Children.Add(this.Grid);
        }
예제 #3
0
 public void Create(Model.RelationshipType RelationshipType)
 {
     this.ItemTypeCache[RelationshipType.Name] = RelationshipType;
 }
예제 #4
0
        public Relationship(IItemControl Parent, Model.RelationshipType RelationshipType)
            : base(Parent.Session)
        {
            // Create Page
            this.Page       = new Properties.Integer(this.Session);
            this.Page.Value = 1;

            // Create No Pages
            this.NoPages       = new Properties.Integer(this.Session);
            this.NoPages.Value = 0;

            // Only create Dialog when needed
            this.Dialog = null;

            // Create Selected
            this.Selected = new Model.ObservableList <Model.Relationship>();

            // Create Comands
            this.Refresh      = new RefreshCommand(this);
            this.NextPage     = new NextPageCommand(this);
            this.PreviousPage = new PreviousPageCommand(this);
            this.Create       = new CreateCommand(this);
            this.Delete       = new DeleteCommand(this);

            // Store Parent
            this.Parent = Parent;

            // Watch Parent Events
            this.Parent.Created += Parent_Created;
            this.Parent.Edited  += Parent_Edited;
            this.Parent.Undone  += Parent_Undone;
            this.Parent.Saved   += Parent_Saved;

            // Store RelationshipType
            this.RelationshipType = RelationshipType;

            // Create Grid
            this.Grid               = new Grid(this.Session);
            this.Grid.AllowSelect   = true;
            this.Grid.Width         = this.Width;
            this.Grid.RowsSelected += Grid_RowsSelected;
            this.Children.Add(this.Grid);

            // Create Query String
            this.QueryString                     = new Properties.String(this.Session);
            this.QueryString.Enabled             = true;
            this.QueryString.IntermediateChanges = true;
            this.QueryString.Tooltip             = "Search String";
            this.QueryString.PropertyChanged    += QueryString_PropertyChanged;

            // Create Page Size
            this.PageSize                  = new Properties.Integers.Spinner(this.Session);
            this.PageSize.Tooltip          = "Page Size";
            this.PageSize.Width            = 40;
            this.PageSize.Enabled          = true;
            this.PageSize.MinValue         = 5;
            this.PageSize.MaxValue         = 100;
            this.PageSize.Value            = 25;
            this.PageSize.PropertyChanged += PageSize_PropertyChanged;

            // Load Columns
            this.LoadColumns();
        }