Exemplo n.º 1
0
        public Tpvform_init()
        {
            InitializeComponent();

            labelNumpedido.Text = num_order.ToString();
            msnPay = "Añade algo a la cesta";

            menB = new Menu("M.Grande", 14.99f, 800, "Glúten, Mostaza");
            menM = new Menu("M.Mediano", 10f, 300, "Glúten, Mostaza");
            menS = new Menu("M.Pequeño", 7.99f, 100, "Glúten, Mostaza");

            ptB = new Patatas("P.Grande", 4.99f, 1000, "Glúten");
            ptM = new Patatas("P.Mediana", 3.99f, 1000, "Glúten");
            ptS = new Patatas("P.Pequeña", 2.99f, 1000, "Glúten");

            hbB = new Hamburgesa("H.Grande", 8.99f, 2000, "Glúten, Mostaza");
            hbM = new Hamburgesa("H.Mediana", 6.99f, 3000, "Glúten, Mostaza");
            hbS = new Hamburgesa("H.Pequeña", 3.99f, 3000, "Glúten, Mostaza");

            beB = new Bebida("R.Grande", 4.50f, 1000, "");
            beM = new Bebida("R.Mediano", 3.20f, 500, "");
            beS = new Bebida("R.Pequeño", 2.10f, 2000, "");

            tarta  = new Postre("Tarta", 5.50f, 600, "Lacteos");
            cafe   = new Postre("Café", 2.30f, 2200, "Lacteos");
            helado = new Postre("Helado", 4.30f, 140, "Lacteos, Glúten");

            radioButtonLocal.Focus();
            this.sitio          = radioButtonLocal.Text.ToString();
            labelCategoria.Text = "Categoria Principal";
        }
Exemplo n.º 2
0
 public FormGerente()
 {
     InitializeComponent();
     FormBorderStyle = FormBorderStyle.None;
     WindowState     = FormWindowState.Maximized;
     //Tamaño.CargarTamaños();
     Hamburguesa.CargarHamburguesas();
     Bebida.CargarBebidas();
     Carne.CargarCarnes();
     Ingrediente.CargarIngredientes();
     Postre.CargarPostres();
     Nuggets.CargarNuggets();
     MostrarB();
     MostrarC();
     MostrarH();
     MostrarSH();
     ActualizarCmb();
     OcultarBtnBebidas();
     OcultarBtnHamburguesas();
     OcultarBtnCombo();
     pnlNugget.Enabled      = false;
     cmbHamburguesa.Enabled = false;
     CargarPie1();
     CargarPie2();
     PBModificarC.Hide();
 }
Exemplo n.º 3
0
        public async Task <IActionResult> NewMenu(CrearMenuVM crearMenuVM)
        {
            Entrante primero = await _context.Entrantes.FindAsync(crearMenuVM.Menu.EntranteId);

            Principal segundo = await _context.Principales.FindAsync(crearMenuVM.Menu.PrincipalId);

            Postre tercero = await _context.Postres.FindAsync(crearMenuVM.Menu.PostreId);

            Menu nuevoMenu = new Menu
            {
                Entrante  = primero,
                Principal = segundo,
                Postre    = tercero,
                Fecha     = DateTime.Now,
                //PrecioTotal = primero.Precio + segundo.Precio + tercero.Precio,
            };

            double precio = 0;

            if (primero != null)
            {
                precio += primero.Precio;
            }
            if (segundo != null)
            {
                precio += segundo.Precio;
            }
            if (tercero != null)
            {
                precio += tercero.Precio;
            }
            nuevoMenu.PrecioTotal = precio;

            return(View(nuevoMenu));
        }
Exemplo n.º 4
0
 static void Main()
 {
     Ingrediente.CargarIngredientes();
     Usuario.CargarUsuarios();
     Tamaño.CargarTamaños();
     Postre.CargarPostres();
     Bebida.CargarBebidas();
     Hamburguesa.CargarHamburguesas();
     MetodoDePago.CargarMetDePagos();
     //Pedido.cargarPedidos();
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     //Application.Run(new FormEmpleado());
     //Application.Run(new FormGerente());
     Application.Run(new FormLogin());
 }
Exemplo n.º 5
0
        private void aceptarConoRelleno_Click(object sender, EventArgs e)
        {
            string nombre = "";

            if (radioButton120.Checked == true)
            {
                nombre = " Cono relleno Chocolate";
            }
            else
            {
                nombre = "Cono relleno Dulce De Leche";
            }
            foreach (Postre p in Postre.Buscar(nombre))
            {
                dgvCombo.DataSource = p;
            }
        }
Exemplo n.º 6
0
        private void aceptarCucuruchon_Click(object sender, EventArgs e)
        {
            string nombre = "";

            if (radioButton125.Checked == true)
            {
                nombre = "Cucuruchon - Rocklets";
            }
            if (radioButton121.Checked == true)
            {
                nombre = "Cucuruchon - Toddy Chocolate";
            }
            foreach (Postre p in Postre.Buscar(nombre))
            {
                dgvCombo.DataSource = p;
            }
        }
Exemplo n.º 7
0
        /// <summary>
        /// Si el pedido es por delivery, genera un ticket con los datos necesarios para la entrega.
        /// </summary>
        /// <param name="nuevaVenta">Venta.</param>
        public static void GenerarTicketVenta(Pedido nuevaVenta)
        {
            StringBuilder sb           = new StringBuilder();
            string        ruta         = AppDomain.CurrentDomain.BaseDirectory + "PedidosDelivery\\";
            string        nombreTicket = nuevaVenta.codigoPedido + ".txt";
            double        total        = 0;

            Texto auxTexto = new Texto();

            sb.AppendFormat("Fecha: {0}\n", DateTime.Now);
            sb.AppendFormat("Direccion de entrega: {0} \n", nuevaVenta.direccionDeEntrega);

            sb.AppendLine("");
            sb.AppendLine("");
            sb.AppendLine("Lista de productos: ");
            sb.AppendLine("-----------------------------------");

            foreach (Producto item in nuevaVenta.pedido)
            {
                if (item is Hamburguesa)
                {
                    Hamburguesa a = (Hamburguesa)item;
                    sb.AppendFormat("{0,-28}   ${1,-20}\n", a.tipo, a.precio);
                    total = total + a.precio;
                }
                else
                {
                    Postre b = (Postre)item;
                    sb.AppendFormat("{0,-28}   ${1,-20}\n", b.tipo, b.precio);
                    total = total + b.precio;
                }
            }


            sb.AppendLine("-----------------------------------");
            sb.AppendFormat("Total:        ${0,20} \n", total.ToString());
            sb.AppendLine("-----------------------------------");
            sb.AppendLine("-----------------------------------");
            sb.AppendFormat("Nro de pedido: {0,20} \n", nuevaVenta.codigoPedido);
            sb.AppendLine("-----------------------------------");

            auxTexto.Guardar(ruta + nombreTicket, sb.ToString());
        }
Exemplo n.º 8
0
        private void aceptarSundae_Click(object sender, EventArgs e)
        {
            string nombre = "";

            if (radioButton124.Checked == true)
            {
                nombre = "Sundae Frutilla";
            }
            if (radioButton123.Checked == true)
            {
                nombre = "Sundae Dulce De Leche";
            }
            if (radioButton123.Checked == true)
            {
                nombre = "Sundae Chocolate";
            }
            foreach (Postre p in Postre.Buscar(nombre))
            {
                dgvCombo.DataSource = p;
            }
        }
Exemplo n.º 9
0
        private void aceptarCono_Click(object sender, EventArgs e)
        {
            string tipo = "";

            if (radioButton114.Checked == true)
            {
                tipo = "Cono Americana";
            }

            if (radioButton113.Checked == true)
            {
                tipo = "Cono Dulce De Leche";
            }
            if (radioButton112.Checked == true)
            {
                tipo = "Cono Mixta";
            }
            foreach (Postre p in Postre.Buscar(tipo))
            {
                dgvCombo.DataSource = p;
            }
        }
Exemplo n.º 10
0
        public async Task <IActionResult> EleccionMenu(CrearMenusVM crearMenusVM)
        {
            Entrante entrante = await _context.Entrantes.FindAsync(crearMenusVM.Menu.EntranteId);

            Postre postre = await _context.Postres.FindAsync(crearMenusVM.Menu.PostreId);

            Principal principal = await _context.Principales.FindAsync(crearMenusVM.Menu.PrincipalId);

            Menu menu = new Menu
            {
                Entrante  = entrante,
                Postre    = postre,
                Principal = principal,
                Fecha     = DateTime.Now
            };

            double precio = 0;

            if (entrante != null)
            {
                precio += entrante.Precio;
            }

            if (principal != null)
            {
                precio += principal.Precio;
            }

            if (postre != null)
            {
                precio += postre.Precio;
            }
            menu.PrecioTotal = precio;

            return(View(menu));
        }
Exemplo n.º 11
0
        public async Task <IActionResult> ConfirmarMenu(EleccionMenuVM emvm)              // no seria mas correcto decir que lo que recibe son los 3 Ids? y el menu?, porque no le da error?
        {
            Entrante entrante = await _context.Entrantes.FindAsync(emvm.Menu.EntranteId); // buscamos objetos en funcion ID recibido

            Principal principal = await _context.Principales.FindAsync(emvm.Menu.EntranteId);

            Postre postre = await _context.Postres.FindAsync(emvm.Menu.EntranteId);



            Menu menu = new Menu
            {
                Entrante  = entrante,
                Principal = principal,
                Postre    = postre,
                Fecha     = DateTime.Now,
                //PrecioTotal = entrante.Precio + principal.Precio + postre.Precio
            };

            double precio = 0;

            if (entrante != null)
            {
                precio += entrante.Precio;
            }
            if (principal != null)
            {
                precio += principal.Precio;
            }
            if (postre != null)
            {
                precio += postre.Precio;
            }
            menu.PrecioTotal = precio;
            return(View(menu));
        }