Exemple #1
0
        public PrikazRacunaWindow(Racun racun)
        {
            InitializeComponent();
            salon                   = new Salon();
            tbSalon.Text            = salon.ToString();
            tbIdRacuna.DataContext  = racun;
            tbDatum.DataContext     = racun;
            tbKupac.DataContext     = racun;
            tbZaposleni.DataContext = racun;
            vrednostPdv.Text        = racun.TotalPricePDV().ToString();
            vrednostBezPdv.Text     = racun.TotalPriceBezPDV().ToString();
            tbUkupanRacun.Text      = racun.TotalPrice().ToString();

            dgStavkeProdaje.ItemsSource = racun.listaStavkiNamestaja;
            dgStavkeProdaje.IsSynchronizedWithCurrentItem = true;
            dgStavkeProdaje.ColumnWidth = new DataGridLength(1, DataGridLengthUnitType.Star);
            dgStavkeUsluga.ItemsSource  = racun.listaStavkiUsluga;
            dgStavkeUsluga.IsSynchronizedWithCurrentItem = true;
            dgStavkeUsluga.ColumnWidth = new DataGridLength(1, DataGridLengthUnitType.Star);
        }