Пример #1
0
        private void NoviRacun(object sender, RoutedEventArgs e)
        {
            RacuniEd r = new RacuniEd(Art.ToList());

            r.Owner = this;
            if (r.ShowDialog() == true)
            {
                Racuni.Add(r.TrenutniRacun);
            }
        }
Пример #2
0
        private void NoviRacun(object sender, RoutedEventArgs e)
        {
            RacuniEd r = new RacuniEd(Art.ToList());

            r.Owner = this;
            if (r.ShowDialog() == true)
            {
                Racuni.Add(r.TrenutniRacun);
                BinaryFormatter BF = new BinaryFormatter();
                using (Stream snimanjeracuna = new FileStream("Racuni.txt", FileMode.OpenOrCreate, FileAccess.Write))
                {
                    BF.Serialize(snimanjeracuna, Racuni);
                }
            }
        }