Hi!
I do write this code. But I would like to see the number I enter in the textbox be decimal. How can I do it please.
Other point strange, when I am trying to delete my textbox that should make operation. When the last number is deleted I receive a error message:
Input string was not in a correct format.
private void quantidadeFactu_KeyUp(object sender, KeyEventArgs e)
{
float quantidadeFact;
float precoFact;
float totFact;
quantidadeFact = Convert.ToInt32(quantidadeFactu.Text);//for example in this quantitity textbox when I delete until the latest number. The error message appear.
precoFact = Convert.ToInt32(precosaidaFactu.Text);
totFact = quantidadeFact * precoFact;
totalFactu.Text = totFact.ToString();
}

Ranjit PowarRank #553 · 4.4K reputationPosted Jul 1, 2014, 8:40 AM EDT
if(string.IsNullOrEmpty(quantidadeFactu.Text))
{
return;
}
Mfwamba Tshimanga155 reputationPosted Jul 1, 2014, 2:26 PM EDT
Ranjit PowarRank #553 · 4.4K reputationPosted Jul 1, 2014, 8:45 PM EDT
quantidadeFact =float.Parse(quantidadeFactu.Text);
Anupam SinghRank #643 · 3.7K reputationPosted Jul 1, 2014, 9:32 PM EDT
Hope it helps
Mfwamba Tshimanga155 reputationPosted Jul 2, 2014, 4:39 PM EDT
Anupam SinghRank #643 · 3.7K reputationPosted Jul 2, 2014, 8:42 PM EDT
private void quantidadeFactu_KeyUp(object sender, KeyEventArgs e)