Exemple #1
0
 public JuegoDTO Apostar([FromBody] JuegoDTO juego)
 {
     try
     {
         ChanceDAO chance = new ChanceDAO();
         JuegoDTO  result = chance.Apostar(juego);
         return(result);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #2
0
        public JuegoDTO Apostar(JuegoDTO juego)
        {
            try
            {
                ChanceDAO chance = new ChanceDAO();
                JuegoDTO  result = chance.Apostar(juego);

                return(result);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public ActionResult Apostar(JuegoDTO juego)
        {
            try
            {
                UsuarioDTO usuarioDTO = (UsuarioDTO)Session["usuario"];
                ChanceDAO  chance     = new ChanceDAO(this);

                JuegoDTO juegoCreado = chance.Apostar(juego, usuarioDTO);

                return(Json(juegoCreado));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 public ActionResult Ticket(string id)
 {
     try
     {
         UsuarioDTO usuarioDTO = (UsuarioDTO)Session["usuario"];
         if (usuarioDTO == null)
         {
             return(View("Index"));
         }
         ChanceDAO chance      = new ChanceDAO(this);
         JuegoDTO  juegoCreado = chance.getBySerial(id);
         return(View(juegoCreado));
     }
     catch (Exception)
     {
         throw;
     }
 }