private void KarZararHesapla() { List <SatisModel> satisModeller = HelperSatis.GetSatisModel(); double kar = 0; foreach (var item in satisModeller) { kar += item.Urun.satisFiyati - item.Urun.gelisFıyati; } label43.Text = kar.ToString(); }
public void SatisListesiDoldur() { List <SatisModel> satisModeller = HelperSatis.GetSatisModel(); dataGridView1.Rows.Clear(); foreach (var item in satisModeller) { if (item.durum) { dataGridView1.Rows.Add($"{item.satisID}", $"{item.Musteri.adi}", $"{item.Musteri.soyadi}", $"{item.Urun.urunAdi}", $"{item.satisAdedi}", $"{item.satisAdedi * item.Urun.satisFiyati}", $"{item.satisTarihi.Day}.{item.satisTarihi.Month}.{item.satisTarihi.Year}"); } } }