private void BTN_SAVE_Click(object sender, EventArgs e) { if (DGV_ITEMS_LIST.Rows.Count == 0) { TXT_ITEMNAME.Focus(); MSGBOX mdg = new MSGBOX(MessageAlertHeder.Alert(), "PLEASE ADD ITEMS FIRST!", MessageAlertImage.Alert()); mdg.ShowDialog(); } else if (CMB_SUPPLIER.SelectedIndex == -1) { CMB_SUPPLIER.Focus(); MSGBOX mdg = new MSGBOX(MessageAlertHeder.Alert(), "PLEASE SELECT SUPPLIER!", MessageAlertImage.Alert()); mdg.ShowDialog(); } else if (Convert.ToDouble(TXT_CARD.Text) <= 0 && TXT_CARD_NO.Text == string.Empty) { TXT_CARD_NO.Focus(); MSGBOX mdg = new MSGBOX(MessageAlertHeder.Alert(), "PLEASE ENTER CARD NO!", MessageAlertImage.Alert()); mdg.ShowDialog(); } else if (Convert.ToDouble(TXT_CHEQUE.Text) > 0 && (TXT_CHEQUE_NO.Text == string.Empty || CMB_CHEQUE_BANK.SelectedIndex == -1)) { TXT_CHEQUE_NO.Focus(); MSGBOX mdg = new MSGBOX(MessageAlertHeder.Alert(), "PLEASE ENTER CHEQUE INFORMATIONS!", MessageAlertImage.Alert()); mdg.ShowDialog(); } else { SAVEGRN(); } }
private void TXT_CHEQUE_NO_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { TXT_CARD_NO.Focus(); } }