コード例 #1
0
        private void btnEditMatching_Click(object sender, RoutedEventArgs e)
        {
            RadButton          btn      = sender as RadButton;
            ProStyleMatchingBO matching = btn.DataContext as ProStyleMatchingBO;

            if (matching != null)
            {
                StylePictureAlbum album = this.DataContext as StylePictureAlbum;
                if (album != null)
                {
                    WinStyleSelectForMatching win = new WinStyleSelectForMatching(album, matching);
                    win.Owner = View.Extension.UIHelper.GetAncestor <Window>(this);
                    win.ShowDialog();
                }
            }
        }
コード例 #2
0
        private void btnDeleteMatching_Click(object sender, RoutedEventArgs e)
        {
            var diaResult = MessageBox.Show("确定要删除该搭配组吗?", "提醒", MessageBoxButton.OKCancel);

            if (diaResult == MessageBoxResult.OK)
            {
                RadButton          btn      = sender as RadButton;
                ProStyleMatchingBO matching = btn.DataContext as ProStyleMatchingBO;
                if (matching != null)
                {
                    var result = ProStylePictureBookVM.DeleteMatchingGroup(matching.GroupID);
                    MessageBox.Show(result.Message);
                    if (result.IsSucceed)
                    {
                        StylePictureAlbum album = this.DataContext as StylePictureAlbum;
                        if (album != null)
                        {
                            //album.SelectedStyle.SelectedPicture.Matchings.Remove(matching);
                            ProStylePictureBookVM.DeleteMatchingForAlbum(album, matching);
                        }
                    }
                }
            }
        }
コード例 #3
0
 public WinStyleSelectForMatching(StylePictureAlbum album, ProStyleMatchingBO matching)
 {
     _dataContxt      = new WinStyleSelectForMatchingVM(album, matching);
     this.DataContext = _dataContxt;
     InitializeComponent();
 }