private void Submit(object sender, EventArgs e) { if (comboBox1.SelectedIndex.Equals(0) || comboBox2.SelectedIndex.Equals(0) || comboBox3.SelectedIndex.Equals(0)) { SystemManager.ShowMessageBox("Date, Month, and Year required, please fill them!", "Information", 1); } else { int visitorAge = comboBox3.SelectedIndex - DateTime.Now.Year; SystemManager.AddAge(visitorAge, Convert.ToString(DateTime.Now)); } }