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