private void TXT_LNAME_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { CMB_GENDER.Focus(); } }
private void BTN_SAVE_Click(object sender, EventArgs e) { if (TXT_ID_NUMBER.Text.Length == 0) { TXT_ID_NUMBER.Focus(); MSGBOX mdg = new MSGBOX(MessageAlertHeder.Alert(), "PLEASE ENTER ID NO!", MessageAlertImage.Alert()); mdg.ShowDialog(); } else if (TXT_FNAME.Text.Length == 0) { TXT_FNAME.Focus(); MSGBOX mdg = new MSGBOX(MessageAlertHeder.Alert(), "PLEASE ENTER FIRST NAME!", MessageAlertImage.Alert()); mdg.ShowDialog(); } else if (TXT_LNAME.Text.Length == 0) { TXT_LNAME.Focus(); MSGBOX mdg = new MSGBOX(MessageAlertHeder.Alert(), "PLEASE ENTER LAST NAME!", MessageAlertImage.Alert()); mdg.ShowDialog(); } else if (CMB_GENDER.SelectedIndex == -1) { CMB_GENDER.Focus(); MSGBOX mdg = new MSGBOX(MessageAlertHeder.Alert(), "PLEASE SELECT GENDER TYPE!", MessageAlertImage.Alert()); mdg.ShowDialog(); } else if (CMB_COUNTRY.SelectedIndex == -1) { CMB_COUNTRY.Focus(); MSGBOX mdg = new MSGBOX(MessageAlertHeder.Alert(), "PLEASE SELECT COUNTRY!", MessageAlertImage.Alert()); mdg.ShowDialog(); } else { groupBox2.Enabled = false; SAVE_GUEST(); groupBox2.Enabled = true; BTN_NEW.Focus(); } }