コード例 #1
0
        protected async override Task Ready()
        {
            var Data      = ShowPage.GetDataFrom(GetDataString());
            var TableInfo = TableFinder.FindTable(Data.TableName);

            if (Data.RelationName == "")
            {
                MainElement.ReplaceChilds(TableInfo.MakeShowViewForItems(
                                              OnUpdate: (c) =>
                {
                    new UpdatePage().Show(c.TableInfo.TableName, c.Key);
                },
                                              OnDelete: (c) =>
                {
                    c.TableInfo.Delete(c.Key);
                    this.Ready();
                }));
            }
            else
            {
                var RelationInfo = TableInfo.FindRelation(Data.RelationName);
                MainElement.ReplaceChilds(RelationInfo.MakeShowViewForItems(Data.ItemKey,
                                                                            OnUpdate: (c) =>
                {
                    new UpdatePage().Show(c.TableInfo.TableName, c.Key);
                },
                                                                            OnDelete: (c) =>
                {
                    c.TableInfo.Delete(c.Key);
                    this.Ready();
                }));
            }
        }
コード例 #2
0
        protected async override Task Ready()
        {
            var Data      = ShowPage.GetDataFrom(GetDataString());
            var TableInfo = TableFinder.FindTable(Data.TableName);

            if (Data.RelationName == "")
            {
                MainElement.ReplaceChilds(TableInfo.MakeInsertView(() => js.GoBack()));
            }
            else
            {
                var RelationInfo = TableInfo.FindRelation(Data.RelationName);
                MainElement.ReplaceChilds(RelationInfo.MakeInsertView(
                                              Data.ItemKey,
                                              () => js.GoBack()));
            }
        }