private void addButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         string temp = artikliBox.SelectedItem.ToString();
         string[] words = temp.Split('(');
         using (pisModelDataContext cont = new pisModelDataContext())
         {
             stavke_zahtjevnice racun = new stavke_zahtjevnice
             {
                 id_zahtjevnice = Convert.ToInt32(idBoxx.Text.ToString()),
                 kolicina = Convert.ToInt32(kolicinaBox.Text),
                 id_artikla = Convert.ToInt32(words[0])
             };
             cont.stavke_zahtjevnices.InsertOnSubmit(racun);
             cont.SubmitChanges();
         }
         updateListBox();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Dogodila se pogreška!!!" + ex.Message.ToString());
     }
 }
 partial void Deletestavke_zahtjevnice(stavke_zahtjevnice instance);
 partial void Updatestavke_zahtjevnice(stavke_zahtjevnice instance);
 partial void Insertstavke_zahtjevnice(stavke_zahtjevnice instance);
		private void detach_stavke_zahtjevnices(stavke_zahtjevnice entity)
		{
			this.SendPropertyChanging();
			entity.artikli = null;
		}
		private void attach_stavke_zahtjevnices(stavke_zahtjevnice entity)
		{
			this.SendPropertyChanging();
			entity.zahtjevnica = this;
		}