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();
}
Anupam SinghPosted Jul 3, 2014, 12:42 AM
private void quantidadeFactu_KeyUp(object sender, KeyEventArgs e)
Mfwamba TshimangaPosted Jul 2, 2014, 8:39 PM
Anupam SinghPosted Jul 2, 2014, 1:32 AM
Hope it helps
Ranjit PowarPosted Jul 2, 2014, 12:45 AM
quantidadeFact =float.Parse(quantidadeFactu.Text);
Mfwamba TshimangaPosted Jul 1, 2014, 6:26 PM
Ranjit PowarPosted Jul 1, 2014, 12:40 PM
if(string.IsNullOrEmpty(quantidadeFactu.Text))
{
return;
}