public ActionResult Edit(int id, DateTime datedebut, int choixchantier, JDTPost jdtpost) { if (SessionManager.SessionUser != null) { try { _serviceJDT.Update(id, new JournalDesTravaux(jdtpost.PersonnelId, jdtpost.PosteId, jdtpost.DateChantier, jdtpost.HeuresProd, jdtpost.VoitPerso, jdtpost.ZoneDepl, jdtpost.ChefChantierId, SessionManager.SessionUser.PersonnelId, jdtpost.EstValide)); TempData["choixchantier"] = choixchantier; TempData["datedebut"] = datedebut; return(RedirectToAction("Index", new { choixchantier = @TempData["choixchantier"], datedebut = @TempData["datedebut"] })); } catch (Exception ex) { return(View()); } } else { return(RedirectToAction("../../Home/Index")); } }
public void Update(int id, JDTPost jdtpost) { _service.Update(id, new JournalDesTravaux(jdtpost.PersonnelId, jdtpost.PosteId, jdtpost.DateChantier, jdtpost.HeuresProd, jdtpost.VoitPerso, jdtpost.ZoneDepl, jdtpost.ChefChantierId, jdtpost.Login, jdtpost.EstValide)); }
public void Update(int id, JournalDesTravaux T) { _globalService.Update(id, T.ToGlobalJDT()); }