Esempio n. 1
0
        private void BuscaFormaPagamento(TextBox codigo, TextBox nome, DecimalBox valor)
        {
            if (this.codigoAtual.ToString() == codigo.Text)
            {
                return;
            }

            int id = 0;

            if (!int.TryParse(codigo.Text, out id))
            {
                codigo.Clear();
                nome.Clear();
                valor.Valor = 0.00m;
                CalculaTotalPagamento();
                return;
            }

            if (codigo.Text.Length <= 0)
            {
                return;
            }


            var formaPagamento = formaPagamentoDAO.BuscarByID(id);

            if (formaPagamento != null)
            {
                PreencheCamposFormaPagamento(formaPagamento, codigo, nome);
            }
            else
            {
                LimpaFormaPagamento(codigo, nome, valor);
            }
        }
Esempio n. 2
0
 private void CalculaTotalPagamento(TextBox codigo, DecimalBox valor)
 {
     if (codigo.Text.Length == 0)
     {
         valor.Valor = 0.00m;
     }
     totalPago  = 0.00m;
     totalPago += dbPagamento1.Valor;
     //totalPago += dbPagamento2.Valor;
     //totalPago += dbPagamento3.Valor;
     //totalPago += dbPagamento4.Valor;
     //totalPago += dbPagamento5.Valor;
     //totalPago += dbPagamento6.Valor;
     //totalPago += dbPagamento7.Valor;
     lbValorTroco.Text      = (totalPago - totalAPagar).ToString("R$ ############0.00");
     lbValorTroco.ForeColor = totalPago < totalAPagar ? System.Drawing.Color.Red : System.Drawing.Color.Green;
 }
Esempio n. 3
0
        public DepositoPropioUsuario(CuentaCliente cuenta)
        {
            ColorFondoTitulo = Color4.MediumSlateBlue;
            Titulo           = "Configure su deposito";
            OnAlertHide      = guardarRetiro;
            this.cuenta      = cuenta;
            Add(textbox      = new DecimalBox
            {
                PlaceholderText = "Cantidad",
                Height          = 30,
                Width           = 250,
                Anchor          = Anchor.Centre,
                Origin          = Anchor.BottomCentre,
                Y = -30 / 2f - 10,
            });
            Add(submit = new BotonHover
            {
                Size             = new Vector2(250, 30),
                BackgroundColour = disabledColor,
                Text             = "Entrar",
                Anchor           = Anchor.Centre,
                Origin           = Anchor.Centre,
            });
            Add(new BotonOpcion
            {
                Anchor           = Anchor.BottomLeft,
                Origin           = Anchor.BottomLeft,
                BackgroundColour = Color4.OrangeRed,
                Icono            = FontAwesome.Solid.ArrowCircleLeft,
                Text             = "Regresar",
                Margin           = new MarginPadding(20),
                Action           = this.Exit,
            });

            submit.Action       += revisarRetiro;
            submit.Enabled.Value = false;

            textbox.Current.ValueChanged += _ => CheckButton();
        }
Esempio n. 4
0
 private void LimpaFormaPagamento(TextBox codigo, TextBox nome, DecimalBox valor)
 {
     codigo.Clear();
     nome.Clear();
     valor.Valor = 0.00m;
 }