private void hlEdit_Click(object sender, RoutedEventArgs e) { dynamic d = this.ProductLineResult.SelectedItem as dynamic; ProductLineVM vm = new ProductLineVM() { ProductLineName = d.ProductLineName, SysNo = d.SysNo, UseScopeDescription = d.Note, Priority = Convert.ToString(d.PRI), Category = new ProductLineCategoryVM() { CategoryName = d.CategoryName, SysNo = d.CategorySysNo } }; ProductLineMaintain item = new ProductLineMaintain(); item.IsEdit = true; item.Data = vm; item.Dialog = Window.ShowDialog("编辑", item, (s, args) => { if (args.DialogResult == Newegg.Oversea.Silverlight.Controls.Components.DialogResultType.OK) { this.ProductLineResult.Bind(); } }, new Size(400, 300)); }
private void btnProductlineNew_Click(object sender, RoutedEventArgs e) { ProductLineMaintain item = new ProductLineMaintain(); item.IsEdit = false; item.Dialog = Window.ShowDialog("新建", item, (s, args) => { if (args.DialogResult == Newegg.Oversea.Silverlight.Controls.Components.DialogResultType.OK) { this.ProductLineResult.Bind(); } }, new Size(400, 300)); }