public ActionResult Agregar(AgregarUsuarioModel model)
 {
     try
     {
         if (ModelState.IsValid)
         {
             using (CPMEntities datos = new CPMEntities())
             {
                 datos.sp_AgregarUsuario(model.IdEmp, model.Usuario, model.Contra, model.IdRol);
             }
             return(Redirect("~/ProyectoFinal/"));
         }
         return(View(model));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }