Ejemplo n.º 1
0
        private void MontonumericUpDown_ValueChanged(object sender, EventArgs e)
        {
            decimal total = Convert.ToDecimal(TotaltextBox.Text);
            decimal monto = Convert.ToDecimal(MontonumericUpDown.Value);

            /*if (monto < total)
             *  MessageBox.Show("le falta dinero para pagar el ariculo", "Page", MessageBoxButtons.OK, MessageBoxIcon.Information);
             * else if (monto >= total)*/
            DevueltanumericUpDown.Value = FacturacionBLL.CalcularDevuelta(monto, total);
        }
Ejemplo n.º 2
0
        protected void MontoTextBox_TextChanged(object sender, EventArgs e)
        {
            int     total    = Convert.ToInt32(TotalTextBox.Text);
            int     monto    = Convert.ToInt32(MontoTextBox.Text);
            decimal devuelta = Utilities.Utils.ToInt(DevueltaTextBox.Text);

            if (monto < total)
            {
                Utilities.Utils.ShowToastr(this, "le falta dinero para pagar el articulo", "Fallido", "error");
            }
            else if (monto >= total)
            {
                devuelta = FacturacionBLL.CalcularDevuelta(monto, total);
            }
        }