private void addButton_Click(object sender, RoutedEventArgs e)
 {  
     try
     {
         string temp = artikliBox.SelectedItem.ToString();
         string[] words = temp.Split('(');
         using (pisModelDataContext cont = new pisModelDataContext())
         {
             stavke_primke racun = new stavke_primke
             {
                 id_primke = Convert.ToInt32(idBoxx.Text.ToString()),
                 kolicina = Convert.ToInt32(kolicinaBox.Text),
                 id_artikla = Convert.ToInt32(words[0])
             };
             cont.stavke_primkes.InsertOnSubmit(racun);
             cont.SubmitChanges();
         }
         updateListBox();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Dogodila se pogreška!!!" + ex.Message.ToString());
     }
 }
		private void detach_stavke_primkes(stavke_primke entity)
		{
			this.SendPropertyChanging();
			entity.artikli = null;
		}
 partial void Deletestavke_primke(stavke_primke instance);
 partial void Updatestavke_primke(stavke_primke instance);
 partial void Insertstavke_primke(stavke_primke instance);
		private void attach_stavke_primkes(stavke_primke entity)
		{
			this.SendPropertyChanging();
			entity.primka = this;
		}