public ActionResult Edit(GestionCartera gestionCartera) { if (ModelState.IsValid) { db.Entry(gestionCartera).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(gestionCartera)); }
// GET: GestionCartera/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } GestionCartera gestionCartera = db.GestionCartera.Find(id); if (gestionCartera == null) { return(HttpNotFound()); } return(View(gestionCartera)); }
public ActionResult Create(GestionCartera gestionCartera) { if (ModelState.IsValid) { db.GestionCartera.Add(gestionCartera); db.SaveChanges(); return(RedirectToAction("Index")); } else { this.ViewBag.ListaOCs = new DBOCAContext().Set <OrdenCompra>().ToList(); ViewBag.ListaResponsables = new SelectList(db.Responsables.OrderBy(x => x.Nombre), "Nombre", "Nombre"); } return(View(gestionCartera)); }
public ActionResult RechazarGestion(GestionCartera gestion) { if (Session["agente"] == null) { return(RedirectToAction("LogOff", "Login")); } ManagerGestionCartera manage = new ManagerGestionCartera(); gestion.UsuarioAprobacion = Session["agente"].ToString(); var ret = manage.RechazarGestion(gestion); return(Json(ret.FirstOrDefault())); }
public ActionResult calculaCuota(GestionCartera mora) { if (mora.IdCredito == null || mora.Fecha == null) { return(View()); } ManagerGestionCartera manage = new ManagerGestionCartera(); if (Session["agente"] == null) { return(RedirectToAction("LogOff", "Login")); } var ret = manage.calculaCuota(mora); return(Json(ret)); }
// GET: GestionCartera/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } GestionCartera gestionCartera = db.GestionCartera.Find(id); if (gestionCartera == null) { return(HttpNotFound()); } this.ViewBag.ListaOCs = new DBOCAContext().Set <OrdenCompra>().ToList(); ViewBag.ListaResponsables = new SelectList(db.Responsables.OrderBy(x => x.Nombre), "Nombre", "Nombre"); return(View(gestionCartera)); }
public ActionResult HistoricoPagos(GestionCartera gestion) { if (gestion.IdCredito == null) { return(View()); } ManagerGestionCartera manage = new ManagerGestionCartera(); if (Session["agente"] == null) { return(RedirectToAction("LogOff", "Login")); } var ret = manage.ConsultaPagos(gestion); return(Json(ret)); }
public JsonResult Delete(int id) { try { GestionCartera gestionCartera = db.GestionCartera.Find(id); if (gestionCartera == null) { Response.StatusCode = (int)HttpStatusCode.NotFound; return(Json(new { Result = "Error" })); } db.GestionCartera.Remove(gestionCartera); db.SaveChanges(); return(Json(new { Result = "OK" })); } catch (Exception ex) { return(Json(new { Result = "ERROR", Message = ex.Message })); } }