コード例 #1
0
        private void PersonelListele()
        {
            if (context == null)
            {
                context = new SatinAlmaContext();
            }

            dataGridView1.DataSource = _personelService.Listele().Join(context.Departmanlars, p => p.DepartmanID, d => d.DepartmanID, (per, dep) => new
            {
                per.PersonelID,
                per.Adi,
                per.SoyAdi,
                per.TCKN,
                per.Gorevi,
                dep.DepartmanID,
                DepartmanAdı = dep.Adi,
                per.IseGirisTarihi,
                per.TelNo,
                per.KullaniciAdi,
                per.Parola,
                per.AlisYetkiliMi
            }).ToList();
            dataGridView1.Columns["DepartmanID"].Visible = false;
        }