public ActionResult Edit(int id, DateTime datedebut, int choixchantier) { if (SessionManager.SessionUser != null) { JournalDesTravaux s = _serviceJDT.GetOne(id); TempData["choixchantier"] = choixchantier; TempData["datedebut"] = datedebut; listdate.Add((DateTime)datedebut); for (int i = 1; i < 7; i++) { listdate.Add(((DateTime)datedebut).AddDays(i)); } return(View(new JDTPost() { //Id = s.Id, PersonnelId = s.PersonnelId, PosteId = s.PosteId, DateChantier = s.DateChantier, HeuresProd = s.HeuresProd, VoitPerso = s.VoitPerso, ZoneDepl = s.ZoneDepl, ChefChantierId = s.ChefChantierId, Login = s.Login, //NumSemaine = s.NumSemaine, EstValide = s.EstValide, Poste = vgetlist.GetVPostes().Where(p => p.ChantierId == (int)TempData["choixchantier"]), Personnel = vgetlist.GetVPersonnels(), ListeDate = listdate })); } else { return(RedirectToAction("../../Home/Index")); } }
//.........................................***********DETAILS************............................................... public ActionResult Details(int id, DateTime datedebut, int choixchantier) { if (SessionManager.SessionUser != null) { JournalDesTravaux s = _serviceJDT.GetOne(id); TempData["choixchantier"] = choixchantier; TempData["datedebut"] = datedebut; return(View(new JDTListe() { Id = s.Id, PersonnelId = s.PersonnelId, PosteId = s.PosteId, DateChantier = s.DateChantier, HeuresProd = s.HeuresProd, VoitPerso = s.VoitPerso, ZoneDepl = s.ZoneDepl, ChefChantierId = s.ChefChantierId, Login = s.Login, NumSemaine = s.NumSemaine, EstValide = s.EstValide })); } else { return(RedirectToAction("../../Home/Index")); } }
internal static G.JournalDesTravaux ToGlobalJDT(this JournalDesTravaux entity) { return(new G.JournalDesTravaux() { Id = entity.Id, PersonnelId = entity.PersonnelId, PosteId = entity.PosteId, DateChantier = entity.DateChantier, HeuresProd = entity.HeuresProd, VoitPerso = entity.VoitPerso, ZoneDepl = entity.ZoneDepl, ChefChantierId = entity.ChefChantierId, Login = entity.Login, NumSemaine = entity.NumSemaine, EstValide = entity.EstValide }); }