public async Task <DataGridDto <AracListDto> > List(int firmaid) { return(await GenerateDataGridDto <AracListDto> .Store((from a in _aracRepository.All().Where(w => w.FirmaId == firmaid) join m in _lookupListRepository.All() on a.MarkaId equals m.Id into mn from m in mn.DefaultIfEmpty() join y in _lookupListRepository.All() on a.YakitId equals y.Id into yn from y in yn.DefaultIfEmpty() join u in _kullaniciRepository.All() on a.CreatorId equals u.Id select new AracListDto { Creator = u.AdSoyad, Id = a.Id, Km = a.Km, Marka = m.Isim, Model = a.Model, Plaka = a.Plaka, Vites = a.Otomatik?"Otomaik":"Manuel", Yakit = y.Isim, Yil = a.Yil, CreateDate = a.CreateDate, TicariBinek = a.Ticari?"Ticari":"Binek", RuhsatSahibiAdSoyad = a.RuhsatSahibiAdSoyad, EnSonBakimYetkiliServis = a.EnSonBakimYetkiliServis } ))); }
public async Task <DataGridDto <MusteriListDto> > List(int firmaid) { return(await GenerateDataGridDto <MusteriListDto> .Store((from a in _musteriRepository.All().Where(w => w.FirmaId == firmaid) join u in _kullaniciRepository.All() on a.KullaniciId equals u.Id join ilce in _lookupListRepository.All() on u.IlceId equals ilce.Id into ilcen from ilce in ilcen.DefaultIfEmpty() join il in _lookupListRepository.All() on ilce.ParentId equals il.Id into iln from il in iln.DefaultIfEmpty() select new MusteriListDto { Id = a.Id, Cinsiyet = a.CinsiyetErkek?"Erkek":"Kadın", Eposta = u.Eposta, Il = il.Isim, Ilce = ilce.Isim, Meslek = u.Unvan, Sirket = a.SirketAd, Telefon = u.Telefon, AdSoyad = u.AdSoyad, EvTelefon = a.EvTelefon, SirketAdres = a.SirketAdres, SirketArabasi = a.SirketAraci, SirketTelefon = a.SirketTelefon, TC = a.TC } ))); }
public async Task <DataGridDto <BakimTalebiListDto> > List(int firmaid) { return(await GenerateDataGridDto <BakimTalebiListDto> .Store((from a in _bakimTalebiRepository.All().Where(w => w.FirmaId == firmaid) join arac in _aracRepository.All() on a.AracId equals arac.Id join marka in _lookupListRepository.All() on arac.MarkaId equals marka.Id into markad from marka in markad.DefaultIfEmpty() join kullanici in _kullaniciRepository.All() on a.KullaniciId equals kullanici.Id join d in _lookupListRepository.All() on a.DurumId equals d.Id select new BakimTalebiListDto { Id = a.Id, Marka = marka.Isim, Model = arac.Model, Plaka = arac.Plaka, Tarih = a.BakimTarihi, Telefon = kullanici.Telefon, AdSoyad = kullanici.AdSoyad, EnSonBakimYetkiliServis = arac.EnSonBakimYetkiliServis, Durum = d.Isim } ))); }