public void UpdatePlan(PlanDtoModel planModel) { var plan = (Plan)GetPlanById(planModel.IdPlan); plan.Nombre = planModel.Nombre; plan.Descripcion = planModel.Descripcion; plan.Duracion = planModel.Duracion; plan.MontoCuota = planModel.MontoCuota; plan.Periodicidad = planModel.Periodicidad; plan.FechaInicial = planModel.FechaInicial; plan.FechaFinal = planModel.FechaFinal; _savingsDataContext.SubmitChanges(); }
public ActionResult EditarPlan(PlanDtoModel plan) { try { _planProvider.UpdateObject(plan); //updated ok TempData["SavingsAction"] = "UOk"; return(RedirectToAction("VerPlanes")); } catch { //uodate failed TempData["SavingsAction"] = "UF"; return(RedirectToAction("VerPlanes")); } }
public ActionResult CrearPlan(PlanDtoModel planModel) { try { _planProvider.AddObject(planModel); //creation ok TempData["SavingsAction"] = "SOk"; return(RedirectToAction("VerPlanes")); } catch { //creation failed TempData["SavingsAction"] = "SF"; return(RedirectToAction("VerPlanes")); } }