public Boolean DejarApuesta(int numero, int sorteo, double monto)
        {
            DataTable result = new DataTable();

            Modelo.Apuesta apuesta = new Modelo.Apuesta();
            result = casa.SelectDineroCasa();
            int total = 0;

            double dineroCasa = Convert.ToDouble(result.Rows[0]["dinero"]);

            result = apuesta.SelectSumaMontoNumero(numero, sorteo);

            try
            {
                total = Convert.ToInt32(result.Rows[0]["sum"]);
            }
            catch (Exception e)
            {
                total = 0;
            }
            this.montoQuePuedeApostar = (monto + total) * 60;
            if (montoQuePuedeApostar > dineroCasa)
            {
                return(false);
            }
            return(true);
        }
Beispiel #2
0
        private void Gananciaminima()
        {
            double    total  = 0;
            DataTable result = new DataTable();

            Modelo.Casa casa = new Modelo.Casa();
            result = casa.SelectDineroCasa();
            double             dineroCasa = Convert.ToDouble(result.Rows[0]["dinero"]);
            LogicaCasaNoPierde logCasa    = new LogicaCasaNoPierde();
            string             cod        = cbSorteo.SelectedItem.ToString();
            int id = log.buscarID(cod);

            total          = dineroCasa - logCasa.PrimerosNumerosConMasMonto(id);
            lblMinima.Text = total.ToString();
        }