Example #1
0
        private void NewButton_Click(object sender, RoutedEventArgs e)
        {
            var dlg = new FormView.FormDialog(this.modelName, -1);

            dlg.ParentLayoutRoot = this.LayoutRoot;
            dlg.Saved           += new EventHandler(this.OnSaved);
            dlg.ShowDialog();
        }
Example #2
0
        private void EditButton_Click(object sender, RoutedEventArgs e)
        {
            var ids = this.TreeView.GetSelectedIDs();

            if (ids.Length == 0)
            {
                return;
            }
            var dlg = new FormView.FormDialog(this.modelName, ids.First());

            dlg.ParentLayoutRoot = this.LayoutRoot;
            dlg.Saved           += new EventHandler(this.OnSaved);
            dlg.ShowDialog();
        }