private void button1_Click(object sender, RoutedEventArgs e)
        {
            //try
            //{
                using (pisModelDataContext cont = new pisModelDataContext())
                {
                    racun_od_dobavljaca racun = new racun_od_dobavljaca
                    {
                        datum = Convert.ToDateTime(datumBox.Text),
                        adresa = adresaBox.Text
                    };
                    cont.racun_od_dobavljacas.InsertOnSubmit(racun);
                    cont.SubmitChanges();
                    var entry = (from ee in cont.racun_od_dobavljacas
                                 select ee).OrderByDescending(ee => ee.br_racuna).FirstOrDefault();
                    id = entry.br_racuna;
                    iznos.tempID = entry.br_racuna;
                }
                updateListBox();

                //MessageBox.Show(id.ToString());
                stavkeRacunaOdDobPage stavke = new stavkeRacunaOdDobPage();
                stavke.idBoxx.Text = id.ToString();
                //MessageBox.Show(iznos.tempID.ToString());
                stavke.ShowDialog();

            //}

            //catch (Exception ex)
            //{
               // MessageBox.Show("Dogodila se pogreška!!!\n" + ex.Message.ToString());
            //}
        }
 partial void Updateracun_od_dobavljaca(racun_od_dobavljaca instance);
 partial void Deleteracun_od_dobavljaca(racun_od_dobavljaca instance);
 partial void Insertracun_od_dobavljaca(racun_od_dobavljaca instance);