1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
cl_actif .Clear();
cl_tous.Clear();
cl_actif .AddRange((from a in datacontext.reglements
from b in datacontext.Clients
where a.Id_client == b.Id
select new client_ina
{
code = b.code,
nom = b.Nom,
deleg = b.Delegation,
tel = b.Tel,
}).AsEnumerable().Distinct(new Comparer_client()));
cl_tous.AddRange((from b in datacontext.Clients
select new client_ina
{
code = b.code,
nom = b.Nom,
deleg = b.Delegation,
tel = b.Tel,
}).ToList());
IEnumerable<client_ina> res = cl_tous.Except(cl_actif).ToList();
dataGrid1.ItemsSource = res; |