예제 #1
0
 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
     }
                                                            )));
 }
예제 #2
0
 public async Task <SayilarDto> Sayilar(int firmaid)
 {
     return(new SayilarDto
     {
         AracSayisi = await _aracRepository.All(firmaid).CountAsync(),
         BakimTalebi = await _bakimTalebiRepository.All(firmaid).CountAsync(),
         KullaniciSayisi = await _kullaniciRepository.All(firmaid).CountAsync(),
         MusteriSayisi = await _musteriRepository.All(firmaid).CountAsync(),
     });
 }
예제 #3
0
 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
     }
                                                                   )));
 }