Exemplo n.º 1
0
 protected void ButtonAddOrder_Click(object sender, EventArgs e)
 {
     try
     {
         getQuantity();
         if (!quantity.Trim().Equals("") && Int32.Parse(quantity) > 0 && Int32.Parse(quantity) < 101)
         {
             if ((List <LineaOrden>)Session["List"] == null)
             {
                 orderLines = new List <LineaOrden>();
             }
             else
             {
                 orderLines = (List <LineaOrden>)Session["List"];
             }
             bll.AddOrderLine(idPlateToOrder, quantity, orderLines);
             Session["List"] = orderLines;
             alert("Se agrego el plato a la orden con exito");
         }
         else
         {
             alert("Debe ingresar un numero mayor a 0 y menor a 100. SI desea comprar mas de 100 contactar con los dueños");
         }
     } catch (Exception ex) {
         //alert("Debe ingresar un numero mayor a 0 y menor a 100. SI desea comprar mas de 100 contactar con los dueños");
         alertException(ex.Message, ex);
     }
 }
Exemplo n.º 2
0
        protected void ButtonAddOrder_Click(object sender, EventArgs e)
        {
            getQuantity();
            if (!quantity.Trim().Equals("") && Int32.Parse(quantity) > 0 && Int32.Parse(quantity) < 101)
            {
                idPlateToOrder.ToString();

                bll.AddOrderLine(idPlateToOrder, quantity, orderLines);

                alertConfirm("Se agrego el plato a la orden con exito");
                TextBoxName.Text            = "";
                TextBoxPrice.Text           = "";
                TextBoxFullDescription.Text = "";
                idPlateToOrder  = "";
                Image1.ImageUrl = null;
            }
            else
            {
                alert("Debe ingresar un numero mayor a 0 y menor a 100. SI desea comprar mas de 100 contactar con los dueños");
            }
        }