public ActionResult Agregar(DepositoModel model) { try { if (ModelState.IsValid) { using (CPMEntities datos = new CPMEntities()) { datos.sp_AgregarDeposito((int)Session["User"], model.IdCuenta, model.IdCliente, model.Valor); } return(Redirect("~/Deposito/")); } return(View(model)); } catch (Exception ex) { throw new Exception(ex.Message); } }