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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
var l = (
from c1 in entity.annonce
from c in entity.entreprise
where c1.identreprise == id__entre
&& c.Identreprise == c1.identreprise
&& (c1.archive == null || c1.archive == 0)
orderby c1.date_annonce descending
group new { c, c1 } by new { kk = c1.idannonce, c1.archive, c1.typeactivite, c1.fonction,
c1.descriptionposte, c1.profilrech, c1.typecontrat,c1.salaire,c1.contact,c1.date_annonce,
c1.idannonce,c1.titre,c.raisonsociale,
} into g select new listee
{
TypeActivite = g.Key.typeactivite,
fonction = g.Key.fonction,
desc_poste = g.Key.descriptionposte,
profil_rech = g.Key.profilrech,
type_contrat = g.Key.typecontrat,
salaire = g.Key.salaire,
contacte = g.Key.contact,
date_ann = (DateTime)g.Key.date_annonce,
id_annonce = g.Key.kk
,
titre = g.Key.titre,
RaisonSociale = g.Key.raisonsociale,
nb_reponse = (
from xx in entity.postule
where
g.Key.kk == xx.idannonce
&& (g.Key.archive == null || g.Key.archive == 0)
select xx.idcandidat).Count()
}).Take(6);
return View(l.ToList()); |
Partager