Advertisement
Guest User

KupacKalku

a guest
Jun 24th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.50 KB | None | 0 0
  1.  
  2.  
  3.             List<KupacKalkulacijaVM> kupci = db.IzlazStavke.Where(x => x.ProizvodID == id && x.Izlazi.NarudzbaID!=null).Select(x => new KupacKalkulacijaVM {
  4.  
  5.  
  6.                 KupacID = x.Izlazi.Narudzbe.KupacID,
  7.                 Ime = x.Izlazi.Narudzbe.Kupci.Ime,
  8.                 StavkaID = x.IzlazStavkaID,
  9.                 NarudzbaID = (int)x.Izlazi.NarudzbaID,
  10.                 Iznos = (x.Kolicina * x.Cijena) * (x.Popust.HasValue ?((100 - x.Popust.Value) / 100) : 1)
  11.  
  12.             }).ToList();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement