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(); })); } }
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())); } }