private void addButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                int id;
                using (pisModelDataContext cont = new pisModelDataContext())
                {
                    primka art = new primka
                    {
                        datum = Convert.ToDateTime(datumPicker.Text),
                        vrijeme = vrijemeBox.Text
                    };
                    cont.primkas.InsertOnSubmit(art);
                    cont.SubmitChanges();
                    var entry = (from ee in cont.primkas
                                 select ee).OrderByDescending(ee => ee.id).FirstOrDefault();
                    id = entry.id;
                    iznos.tempPrimkaID = id;
                }
                updateListBox();

                //MessageBox.Show(id.ToString());
                stavkePrimkePage stavke = new stavkePrimkePage();
                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 Updateprimka(primka instance);
 partial void Deleteprimka(primka instance);
 partial void Insertprimka(primka instance);