Пример #1
0
 private async void MethodCleaningOrder()
 {
     await Task.Factory.StartNew(() =>
     {
         try
         {
             Application.Current.Dispatcher.Invoke(() =>
             {
                 CollectionMSGR_PedidoDetalle.Clear();
                 SelectedESGR_ProductoSubCategoria = null;
                 CollectionESGR_Producto.Clear();
                 ListVMSGR_PedidoDetalleDelete.Clear();
             });
             Total      = 0;
             var Opcion = ESGR_Pedido.Opcion;
             if (Opcion == "I")
             {
                 var NombreMesa              = ESGR_Pedido.Identificador;
                 var NumPersonas             = ESGR_Pedido.Cubierto;
                 ESGR_Pedido                 = new BSGR_Pedido().GetPedido();
                 ESGR_Pedido.Opcion          = Opcion;
                 ESGR_Pedido.Identificador   = NombreMesa;
                 ESGR_Pedido.Cubierto        = NumPersonas;
                 ESGR_Pedido.ESGR_PedidoTipo = SelectedESGR_PedidoTipo;
             }
         }
         catch (Exception ex)
         {
             CmpMessageBox.Show(SGRMessage.TitlePedido, ex.Message, CmpButton.Aceptar);
         }
     });
 }
Пример #2
0
 private void MethodLoadPedido(ESGR_Mesa ESGR_Mesa)
 {
     try
     {
         ESGR_Pedido = new BSGR_Pedido().GetCollectionPedido().ToList().FirstOrDefault(x => x.IdPedido == ESGR_Mesa.IdPedido);
         if (ESGR_Pedido == null)
         {
             throw new Exception("Pedido no Encontrado");
         }
         ESGR_Pedido.Observacion = Observacion;
     }
     catch (Exception)
     {
         throw;
     }
 }