Example #1
0
 public bool kreirajRevers(Revers r)
 {
     using (var conext = new PSContext())
     {
         conext.Revers.Add(r);
         if (conext.SaveChanges() == 1)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
 }
Example #2
0
        public void DodajRevers(string jedinicaMere, int Ulaz, int Izlaz, Roba roba, string kolicina)
        {
            int asd;

            if (!Int32.TryParse(kolicina, out asd))
            {
                MessageBox.Show("Kolicina mora biti broj!");
                return;
            }
            Revers r = new Revers()
            {
                JedMere   = jedinicaMere,
                Ulaz      = Ulaz,
                Izlaz     = Izlaz,
                Roba      = roba,
                Ukupno    = asd,
                RedniBroj = revers.Count + 1
            };

            revers.Add(r);
        }