public void UpdateGroup(GroupDtoModel groupModel) { var group = (Grupo)GetGroupById(groupModel.IdGrupo); group.Nombre = groupModel.Nombre; group.Descripcion = groupModel.Descripcion; _savingsDataContext.SubmitChanges(); }
public ActionResult EditarGrupo(GroupDtoModel grupo) { try { _groupProvider.UpdateObject(grupo); return(RedirectToAction("VerGrupos")); } catch { return(RedirectToAction("VerGrupos")); } }
public ActionResult CrearGrupo(GroupDtoModel groupModel) { try { _groupProvider.AddObject(groupModel); return(RedirectToAction("VerGrupos")); } catch { return(RedirectToAction("VerGrupos")); } }
public ActionResult CrearGrupo(GroupDtoModel groupModel) { try { _groupProvider.AddObject(groupModel); //creation ok TempData["SavingsAction"] = "SOk"; return(RedirectToAction("VerGrupos")); } catch { //creation failed TempData["SavingsAction"] = "SF"; return(RedirectToAction("VerGrupos")); } }
public ActionResult EditarGrupo(GroupDtoModel grupo) { try { _groupProvider.UpdateObject(grupo); //updated ok TempData["SavingsAction"] = "UOk"; return(RedirectToAction("VerGrupos")); } catch { //update failed TempData["SavingsAction"] = "UF"; return(RedirectToAction("VerGrupos")); } }