private void addButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         string temp = artikliBox.SelectedItem.ToString();
         string[] words = temp.Split('(');
         using (pisModelDataContext cont = new pisModelDataContext())
         {
             stavke_prednaloga_za_nabavu racun = new stavke_prednaloga_za_nabavu
             {
                 id_prednaloga = Convert.ToInt32(idBoxx.Text.ToString()),
                 kolicina = Convert.ToInt32(kolicinaBox.Text),
                 id_artikla = Convert.ToInt32(words[0])
             };
             cont.stavke_prednaloga_za_nabavus.InsertOnSubmit(racun);
             cont.SubmitChanges();
         }
         updateListBox();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Dogodila se pogreška!!!" + ex.Message.ToString());
     }
 }
		private void detach_stavke_prednaloga_za_nabavus(stavke_prednaloga_za_nabavu entity)
		{
			this.SendPropertyChanging();
			entity.artikli = null;
		}
 partial void Insertstavke_prednaloga_za_nabavu(stavke_prednaloga_za_nabavu instance);
 partial void Deletestavke_prednaloga_za_nabavu(stavke_prednaloga_za_nabavu instance);
		private void attach_stavke_prednaloga_za_nabavus(stavke_prednaloga_za_nabavu entity)
		{
			this.SendPropertyChanging();
			entity.prednalog_za_nabavu = this;
		}