private void TXT_L_NAME_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { TXT_TEL.Focus(); } }
private void BTN_SAVE_Click(object sender, EventArgs e) { if (TXT_F_NAME.Text.Length == 0) { TXT_F_NAME.Focus(); MSGBOX mdg = new MSGBOX(MessageAlertHeder.Alert(), "PLEASE ENTER GUEST NAME!", MessageAlertImage.Alert()); mdg.ShowDialog(); } else if (TXT_TEL.Text.Length == 0) { TXT_TEL.Focus(); MSGBOX mdg = new MSGBOX(MessageAlertHeder.Alert(), "PLEASE ENTER TELEPHONE NO!", MessageAlertImage.Alert()); mdg.ShowDialog(); } else if (TXT_ADULT.Text.Length == 0) { TXT_ADULT.Focus(); MSGBOX mdg = new MSGBOX(MessageAlertHeder.Alert(), "PLEASE ENTER NO OF ADULTS!", MessageAlertImage.Alert()); mdg.ShowDialog(); } else if (CMB_RESERVE_BY.SelectedIndex == -1) { CMB_RESERVE_BY.Focus(); MSGBOX mdg = new MSGBOX(MessageAlertHeder.Alert(), "PLEASE SELECT RESERVATION TYPE!", MessageAlertImage.Alert()); mdg.ShowDialog(); } else if (CMB_RESERVE_BY.SelectedIndex == 3 && CMB_AGENT.SelectedIndex == -1) { CMB_RESERVE_BY.Focus(); MSGBOX mdg = new MSGBOX(MessageAlertHeder.Alert(), "PLEASE SELECT AGENT!", MessageAlertImage.Alert()); mdg.ShowDialog(); } else if (LST_SELECTED_ROOM.Items.Count == 0) { MSGBOX mdg = new MSGBOX(MessageAlertHeder.Alert(), "PLEASE SELECT ROOMS!", MessageAlertImage.Alert()); mdg.ShowDialog(); } else if (Convert.ToInt16(TXT_NO_OF_NIGHTS.Text) == 0) { MSGBOX mdg = new MSGBOX(MessageAlertHeder.Alert(), "PLEASE SELECT SPEND DATES!", MessageAlertImage.Alert()); mdg.ShowDialog(); } else if (CMB_TAX.SelectedIndex == -1) { MSGBOX mdg = new MSGBOX(MessageAlertHeder.Alert(), "PLEASE SELECT TAX TYPE!", MessageAlertImage.Alert()); mdg.ShowDialog(); } else if (CMB_AGENT.SelectedIndex > -1 && CMB_AGENT.SelectedIndex == -1) { MSGBOX mdg = new MSGBOX(MessageAlertHeder.Alert(), "PLEASE SELECT AGENT!", MessageAlertImage.Alert()); mdg.ShowDialog(); } else { BTN_SAVE.Enabled = false; SAVE_RESERVATION(); BTN_NEW.Focus(); } }