public ActionResult Edit(int id, AbsentaModel absenta) { if (ModelState.IsValid) { new AbsentaBusiness().Update(absenta); } return(View()); }
public static Absenta ToEntity(this AbsentaModel absentaModel) { return(new Absenta() { IDElev = absentaModel.IDElev, IDMaterieClasa = absentaModel.IDMaterieClasa, DataAbsenta = absentaModel.DataAbsenta }); }
public ActionResult Create(AbsentaModel absentaModel) { if (ModelState.IsValid) { new AbsentaBusiness().Insert(absentaModel); return(RedirectToAction("Index")); } return(View()); }
public void Update(AbsentaModel absentaModel) { AbsentaHelper.Update(absentaModel.ToEntity()); }
public void Insert(AbsentaModel absentaModel) { var absenta = absentaModel.ToEntity(); AbsentaHelper.Insert(absenta); }