Beispiel #1
0
        public MainWindow()
        {
            InitializeComponent();

            MainWindow.BKlienci    = new BazaKlientow("bazy\\BazaKlientow.xml");
            MainWindow.BSprzedazy  = new BazaSprzedazy("bazy\\BazaSprzedazy131478739417504196");
            MainWindow.BZamowienia = new BazaZamowien("bazy\\BazaZamowien.xml");
            MainWindow.BZamowienia.Baza.Reverse();
            datagridZam.ItemsSource = MainWindow.BZamowienia.Baza;
            ZamowienieWindow w1 = new ZamowienieWindow();

            tabitem2.Content = w1.Content;

            // datagridZam.ItemsSource = MainWindow.BZamowienia.Baza;
        }
Beispiel #2
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.Title       = "Podaj plik ze sprzedazą";
            openFileDialog.Multiselect = true;
            if (openFileDialog.ShowDialog() == true)
            {
                string[]          filenames         = openFileDialog.FileNames;
                ReaderDocSprzedaz readerDocSprzedaz = new ReaderDocSprzedaz();
                readerDocSprzedaz.Make(filenames);
                BazaSprzedazy bazaSprzedazy = new BazaSprzedazy(readerDocSprzedaz.listaSprzedazy);
            }

            MessageBox.Show("Utworzono bazę sprzedaży");
        }
Beispiel #3
0
        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            OpenFileDialog openFileDialog1 = new OpenFileDialog();
            string         xmlfilename     = (string)null;

            openFileDialog1.Title       = "Podaj bazę sprzedaży do edycji";
            openFileDialog1.Multiselect = false;
            if (openFileDialog1.ShowDialog() == true)
            {
                xmlfilename = openFileDialog1.FileName;
                BazaSprzedazy     bazaSprzedazy     = new BazaSprzedazy(xmlfilename);
                ReaderDocSprzedaz readerDocSprzedaz = new ReaderDocSprzedaz(bazaSprzedazy.Baza);
                OpenFileDialog    openFileDialog2   = new OpenFileDialog();
                openFileDialog2.Title       = "Podaj plik ze sprzedazą";
                openFileDialog2.Multiselect = true;
                if (openFileDialog1.ShowDialog() == true)
                {
                    string[] filenames = openFileDialog2.FileNames;
                    readerDocSprzedaz.Make(filenames);
                    bazaSprzedazy.SaveXML("editedBazaSprzedazy");
                }
            }
        }