コード例 #1
0
        private void btnObrisiCeluKorpu_Click(object sender, RoutedEventArgs e)
        {
            SmartSoftwareServiceInterfaceClient service = new SmartSoftwareServiceInterfaceClient();

            SmartSoftwareServiceReference.DbItemOpremaSaParametrima[] rez = service.KorpaDelete(null);
            pera.ItemsSource = null;
            this.korpa       = this.korpaProvera = new ObservableCollection <SmartSoftwareGlavnaOblast>();
            refreshujUkupnuCenu();
        }
コード例 #2
0
        private void btnObrisiIzKorpe_Click(object sender, RoutedEventArgs e)
        {
            Button    b  = sender as Button;
            Grid      g  = b.Parent as Grid;
            Grid      g1 = g.Parent as Grid;
            TextBlock t  = g1.FindName("skrivenId") as TextBlock;
            int       id = Convert.ToInt32(t.Text);

            SmartSoftwareServiceInterfaceClient service = new SmartSoftwareServiceInterfaceClient();

            SmartSoftwareServiceReference.DbItemOpremaSaParametrima[] rez = service.KorpaDelete(id);
            pera.ItemsSource = null;
            this.PopuniKorpu(rez);
            pera.ItemsSource = this.Korpa;
            refreshujUkupnuCenu();
        }
コード例 #3
0
        private void btnPreskoci_Click(object sender, RoutedEventArgs e)
        {
            SmartSoftwareServiceInterfaceClient service = new SmartSoftwareServiceInterfaceClient();
            DateTime datum = DateTime.Now;


            DbItemIstorijaKupovine d = new DbItemIstorijaKupovine()
            {
                datum_prodaje = datum,
                Kupac         = null,
                prodavac      = new DbItemKorisnici()
                {
                    id_korisnici = 1
                },
                ukupna_cena_kupovine = this.UkupnaCenaSaPopustom, broj_iskoriscenih_popust_poena = 0
            };
            List <DbItemKupljenaOpremaSaParametrima> listaKupljenjeOpreme = new List <DbItemKupljenaOpremaSaParametrima>();

            foreach (var item in this.Korpa)
            {
                Oprema o = item as Oprema;

                listaKupljenjeOpreme.Add(new DbItemKupljenaOpremaSaParametrima()
                {
                    cena = o.Cena,
                    cena_opreme_kad_je_prodata = o.Cena,
                    id_oprema       = o.IdOprema,
                    prodataKolicina = o.IzabranaKolicina
                });
            }
            //SmartSoftwareServiceReference.DbItemKupljenaOpremaSaParametrima[] rez = service.ProdajaArtikla();

            SmartSoftwareServiceReference.DbItemOpremaSaParametrima[] rezultat = service.KorpaDelete(null);
            Xceed.Wpf.Toolkit.MessageBox.Show("Uspesno ste zavrsili Prodaju !");
            this.vratiSeUglavniProzor = true;
            this.Korpa = new ObservableCollection <SmartSoftwareGlavnaOblast>();
            this.Close();
        }