Reputation: 29
So I need to do so in the "Year", you can enter the date only. To pop up a warning something. Here's the code, if the user enters an empty value, you need to add?
if (textBox1.Text == "" || textBox2.Text == "" || textBox3.Text == "" || textBox4.Text == "" || textBox5.Text == "" || textBox6.Text == "")
{
MessageBox.Show("Не заполнены все поля!");
return;
}
Upvotes: 2
Views: 91
Reputation: 58
Put together textBox dateTimePicker, further: string date=dateTimePicker1.Value.ToString ("dd.mm.yy")
Upvotes: 1
Reputation: 43
And why in the "Year" the whole date? Plug the NumericUpDown to the limitations of values and the whole business.)))
Upvotes: 2