Exemplo n.º 1
0
        //private void MagacinWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        //{
        //    Util.GenericSerializer.Serialize("../../../rs12-2011.UI/bin/Debug/namestaj.xml", viewModel.Magacin.ToList());
        //}

        private void NoviNamestaj_Click(object sender, RoutedEventArgs e)
        {
            var window = new NoviNamestajWindow()
            {
                DataContext = new NoviNamestajViewModel(viewModel), Mode = 0
            };

            window.ShowDialog();
        }
Exemplo n.º 2
0
        private void IzmeniNamestaj_Click(object sender, RoutedEventArgs e)
        {
            var selektovan = (Namestaj)MagacinGrid.SelectedItem;

            if (selektovan != null)
            {
                var window = new NoviNamestajWindow()
                {
                    DataContext = new IzmeniNamestajViewModel(viewModel, selektovan), Mode = 1
                };
                window.Inicijalizacija();
                window.ShowDialog();
            }
        }