public List <Reclamation> Index() { List <Reclamation> mandates = es.GetMany().ToList(); List <Reclamation> mandatesXml = new List <Reclamation>(); foreach (Reclamation i in mandates) { mandatesXml.Add(new Reclamation { Id = i.Id, Nom = i.Nom, Prenom = i.Prenom, Telephone = i.Telephone, Type = i.Type, Email = i.Email, }); } return(mandatesXml); }
public ActionResult Archive() { List <ReclmationViewModel> rvms = new List <ReclmationViewModel>(); us = new ServiceUser(); rs = new ReclamationService(); foreach (var item in rs.GetMany(r => r.vu == 1)) { ReclmationViewModel rvm = new ReclmationViewModel(); rvm.id = item.id; rvm.subject = item.subject; rvm.Content = item.Content; rvm.name = item.name; rvm.lastName = item.lastName; rvm.role = us.Get(us => us.id == item.insured_id).role; rvms.Add(rvm); } return(View(rvms)); }