public ActionResult Agregar(ClienteModel model) { try { if (ModelState.IsValid) { using (CPMEntities datos = new CPMEntities()) { datos.sp_AgregarCliente(model.IdCiudad, model.Nombre, model.Contacto, model.Telefono, model.Correo, model.LimCredito, model.Descuento / 100); } return(Redirect("~/Cliente/")); } return(View(model)); } catch (Exception ex) { throw new Exception(ex.Message); } }