Esempio n. 1
0
        private void txtDiscount_Leave(object sender, EventArgs e)
        {
            var disc = ValidateDiscount(txtDiscount.Text.Trim());

            if (disc > 100)
            {
                MessageBox.Show("Discount tidak boleh melebihi angka 100.", "Informasi", MessageBoxButtons.OK, MessageBoxIcon.Information);
                txtDiscount.Text = "0";
                txtDiscount.Focus();
            }
            commonHelper.SetTextBoxToZeroWhenEmpty(sender);
        }
Esempio n. 2
0
        private void txtPrice_Leave(object sender, EventArgs e)
        {
            commonHelper.SetTextBoxToZeroWhenEmpty(sender);

            txtPrice.Text = string.Format("{0:n0}", Convert.ToDecimal(txtPrice.Text));
        }