Hello,
I have started to create an app that through some other things needs to take the text from two text boxes on a form and then post the text on list box that's located on another form.
Following is the code with which I've tried doing this... and of course... it failed...
private void btnSave_Click(object sender, EventArgs e)
{
if (sizeTextBox.Text == "" && productNumberTextBox.Text == "")
{
MessageBox.Show("no input all");
}
else if (sizeTextBox.Text == "" && productNumberTextBox != null)
{
MessageBox.Show("no input 1");
}
else if (productNumberTextBox.Text == "" && sizeTextBox != null)
{
MessageBox.Show("no input 2");
}
else
{
formAddProduct.sizeListBox.Items.Add("{0} for {1}", productNumberTextBox.Text, sizeTextBox.Text);
this.Close();
}
}
If you have any idea on how I could this, I'd be very grateful.
thank you