public ActionResult Create(TretementModels pm) { try { Treatement t = new Treatement() { description = pm.description, DuréeTretement = pm.DuréeTretement, DateTretement = pm.DateTretement, UserId = pm.UserId, Validation = pm.Validation, }; st.Add(t); st.Commit(); return(RedirectToAction("Index")); } catch { return(View()); } }
// GET: Tretement/Create public ActionResult Create() { TretementModels pm = new TretementModels(); return(View(pm)); }