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

            AbsentaHelper.Insert(absenta);
        }