//data validation for textbox presence
//extra logic for if the textbox is the color textbox
public bool isPresentTextBox(TextBox textbox, string name)
{
if (textbox == txtColor)
{
if (textbox.Text == "")
{
MessageBox.Show(name + " is a required field. Enter N/A if not applicable.", "Error");
textbox.Clear();
textbox.Focus();
return false;
}
else
{
return true;
}
}
else
{
if (textbox.Text == "")
{
MessageBox.Show(name + " is a required field", "Error");
textbox.Clear();
textbox.Focus();
return false;
}
}
return true;
}