Ejemplo n.º 1
0
        async void ProximoPagamento()
        {
            try
            {
                if (string.IsNullOrEmpty(ECpercDesc.Text))
                {
                    ECpercDesc.Text = "0";
                }
                if (Convert.ToDouble(ECpercDesc.Text) > 10)
                {
                    await DisplayAlert("Alerta!", "Desconto inválido", "OK");

                    return;
                }
                if (GlobalVariables.formaPagamento > 0)
                {
                    if (GlobalVariables.GlobalPedido.IdPedido > 0)
                    {
                        PedidoItemService srvPedidoItem = new PedidoItemService();
                        var descPedido = srvPedidoItem.RetornaPercentualDescPedido(GlobalVariables.GlobalPedido.IdPedido);
                        ECpercDesc.Text = descPedido.ToString();
                        if (GlobalVariables.formaPagamento == 0)
                        {
                            PedidoService srvPedido = new PedidoService();
                            var           atu       = await srvPedido.AtualizaFormaPagamentoPedido(GlobalVariables.GlobalPedido.IdPedido, GlobalVariables.formaPagamento);
                        }
                    }
                }
                var i = this.Children.IndexOf(this.CurrentPage);
                CurrentPage = Children[2];
            }
            catch (Exception)
            {
            }
        }