/// <summary> /// 编辑 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void hlEdit_Click(object sender, RoutedEventArgs e) { KeyWordsForProductQueryVM item = this.QueryResultGrid.SelectedItem as KeyWordsForProductQueryVM; UCAddKeywordsForProduct usercontrol = new UCAddKeywordsForProduct(); usercontrol.VM = item; usercontrol.Dialog = Window.ShowDialog(ResKeywords.Title_EditKeywordsForProduct, usercontrol, (obj, args) => { QueryResultGrid.Bind(); }); }
/// <summary> /// 添加 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAddItem_Click(object sender, RoutedEventArgs e) { UCAddKeywordsForProduct usercontrol = new UCAddKeywordsForProduct(); usercontrol.Dialog = Window.ShowDialog(ResKeywords.Title_CreateKeywordsForProduct, usercontrol, (obj, args) => { filter = model.ConvertVM <KeyWordsForProductQueryVM, KeyWordsForProductQueryFilter>(); filterVM = Newegg.Oversea.Silverlight.Utilities.UtilityHelper.DeepClone <KeyWordsForProductQueryFilter>(filter); QueryResultGrid.QueryCriteria = this.filter; QueryResultGrid.Bind(); }); }