private void CardAddView_Click(object sender, RoutedEventArgs e)
        {
            CardAddView CAV = new CardAddView();

            CAV.DataContext = DataContext;
            Close();
            CAV.Show();
        }
예제 #2
0
        private void DisplayAddDialog()
        {
            var dialog = new CardAddView {
                Owner = Window.GetWindow(this)
            };

            dialog.Closed += (s, e) => dialog.Owner.Focus();
            dialog.Show();
        }
예제 #3
0
        private void ShowCard(Card card)
        {
            var dialog = new CardAddView(card.Id)
            {
                Owner = Window.GetWindow(this)
            };

            dialog.Closed += (s, e) => dialog.Owner.Focus();
            dialog.Show();
        }
예제 #4
0
 private void NumbersEdit_Click(object sender, RoutedEventArgs e)
 {
     if (DataEmployers.SelectedItem != null)
     {
         IsChildWindowClosed = false;
         CardAddView CAV = new CardAddView();
         CAV.DataContext = DataContext;
         CAV.Show();
         ChildWindow = CAV;
     }
 }
예제 #5
0
        private void DisplayEditDialog()
        {
            var item = ViewModel.SelectedItem as Card;

            if (item != null)
            {
                var dialog = new CardAddView(item)
                {
                    Owner = Window.GetWindow(this)
                };
                dialog.Closed += (s, e) => dialog.Owner.Focus();
                dialog.Show();
            }
        }
예제 #6
0
        private void OpenCard()
        {
            var item = ViewModel.SelectedItem as Unit;

            if (item == null)
            {
                return;
            }

            var stockUnit = item.StockUnit;

            if (stockUnit != null)
            {
                int cardId = stockUnit.Card.Id;
                var dialog = new CardAddView(cardId)
                {
                    Owner = Window.GetWindow(this)
                };
                dialog.Show();
            }
        }