예제 #1
0
 public ActionResult Create(EducationLevelRegisterModel modelArea)
 {
     var area = new EducationLevel
     {
         Name = modelArea.Name,
     };
     _areaReposity.Create(area);
     const string title = "Nivel De Educacion Agregado";
     var content = "El area " + area.Name + " ha sido agregada exitosamente.";
     _viewMessageLogic.SetNewMessage(title, content, ViewMessageType.SuccessMessage);
     return RedirectToAction("Index");
 }
예제 #2
0
 public EducationLevel Update(EducationLevel itemToUpdate)
 {
     _context.Entry(itemToUpdate).State = EntityState.Modified;
     SaveChanges();
     return itemToUpdate;
 }
예제 #3
0
 public EducationLevel UpdateAreaFromAreaEditModel(EducationLevel areaEditModel, EducationLevel area)
 {
     area.Name = areaEditModel.Name;
     return Update(area);
 }
예제 #4
0
 public EducationLevel Create(EducationLevel itemToCreate)
 {
     var role = _context.EducationLevels.Add(itemToCreate);
     _context.SaveChanges();
     return role;
 }