/* При вводе значения */ void TextBox8TextChanged(object sender, EventArgs e) { if (textBox8.Text != "" && ClassConversion.checkString(textBox8.Text)) { textBox6.Text = ClassCalculation.ChangeTotal_ReturnNDS(textBox8.Text, textBox5.Text); } else { textBox8.Text = "0.00"; } }
/* При потере фокуса */ void TextBox8LostFocus(object sender, EventArgs e) { String Value = textBox8.Text; textBox8.Clear(); textBox8.Text = ClassConversion.StringToMoney(Value); if (textBox8.Text != "" && ClassConversion.checkString(textBox8.Text)) { textBox6.Text = ClassCalculation.ChangeTotal_ReturnNDS(textBox8.Text, textBox5.Text); } else { textBox8.Text = "0.00"; } }
/* При нажатии на Интер*/ void TextBox8KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Tab) { String Value = textBox8.Text; textBox8.Clear(); textBox8.Text = ClassConversion.StringToMoney(Value); if (textBox8.Text != "" && ClassConversion.checkString(textBox8.Text)) { textBox6.Text = ClassCalculation.ChangeTotal_ReturnNDS(textBox8.Text, textBox5.Text); } else { textBox8.Text = "0.00"; } } }