Example #1
0
 protected void btnEliminar_Click(object sender, EventArgs e)
 {
     try
     {
         if ((Pedido)Session["PEDIDO"] == null)
         {
             throw new Exception("Debe seleccionar un pedido.");
         }
         else
         {
             LogicaPedido logicaPedido = new LogicaPedido();
             logicaPedido.BajaPedido((Pedido)Session["PEDIDO"]);
         }
         formularioDefault();
         lblERROR.ForeColor = System.Drawing.Color.Green;
         lblERROR.Text      = "Pedido eliminado correctamente.";
     }
     catch (Exception ex)
     {
         lblERROR.ForeColor = System.Drawing.Color.Red;
         lblERROR.Text      = ex.Message;
     }
 }