public ActionResult AskPayment(int id = 0) { AvencasEntity avenca = adb.AvencasEntity.Find(id); avenca.AvisoPagamento = true; adb.SaveChanges(); return(RedirectToAction("CheckAvencas")); }
public ActionResult DeleteConfirmed(int id) { AvencasEntity avencasentity = adb.AvencasEntity.Find(id); adb.AvencasEntity.Remove(avencasentity); adb.SaveChanges(); return(RedirectToAction("ManageAvencas")); }
public ActionResult Delete(int id = 0) { AvencasEntity avencasentity = adb.AvencasEntity.Find(id); if (avencasentity == null) { return(HttpNotFound()); } return(View(avencasentity)); }
public ActionResult Edit(int id = 0) { AvencasEntity avencasentity = adb.AvencasEntity.Find(id); if (avencasentity == null) { return(HttpNotFound()); } ViewBag.ClienteId = new SelectList(adb.UserProfile, "UserId", "UserName", avencasentity.ClienteId); ViewBag.ContabilistaId = new SelectList(adb.UserProfile, "UserId", "UserName", avencasentity.ContabilistaId); return(View(avencasentity)); }
public ActionResult Edit(AvencasEntity avencasentity) { if (ModelState.IsValid) { adb.Entry(avencasentity).State = EntityState.Modified; adb.SaveChanges(); return(RedirectToAction("ManageAvencas")); } ViewBag.ClienteId = new SelectList(adb.UserProfile, "UserId", "UserName", avencasentity.ClienteId); ViewBag.ContabilistaId = new SelectList(adb.UserProfile, "UserId", "UserName", avencasentity.ContabilistaId); return(View(avencasentity)); }