private void addButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         string temp = artikliBox.SelectedItem.ToString();
         string[] words = temp.Split('(');
         using (pisModelDataContext cont = new pisModelDataContext())
         {
             stavke_izdatnice racun = new stavke_izdatnice
             {
                 id_izdatnice = Convert.ToInt32(idBoxx.Text.ToString()),
                 kolicina = Convert.ToInt32(kolicinaBox.Text),
                 id_artikla = Convert.ToInt32(words[0])
             };
             cont.stavke_izdatnices.InsertOnSubmit(racun);
             cont.SubmitChanges();
         }
         updateListBox();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Dogodila se pogreška!!!" + ex.Message.ToString());
     }
 }
		private void detach_stavke_izdatnices(stavke_izdatnice entity)
		{
			this.SendPropertyChanging();
			entity.artikli = null;
		}
 partial void Deletestavke_izdatnice(stavke_izdatnice instance);
 partial void Updatestavke_izdatnice(stavke_izdatnice instance);
 partial void Insertstavke_izdatnice(stavke_izdatnice instance);
		private void attach_stavke_izdatnices(stavke_izdatnice entity)
		{
			this.SendPropertyChanging();
			entity.izdatnica = this;
		}