Exemplo n.º 1
0
 private void TXT_BARCODE_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         CMB_CATEGORY.Focus();
     }
 }
Exemplo n.º 2
0
 private void BTN_SAVE_Click(object sender, EventArgs e)
 {
     if (CMB_CATEGORY.SelectedIndex == -1)
     {
         CMB_CATEGORY.Focus();
         MSGBOX mdg = new MSGBOX(MessageAlertHeder.Warning(), "PLEASE SELECT CATEGORY", MessageAlertImage.Warning());
         mdg.ShowDialog();
     }
     else if (TXT_ITEMNAME.Text == String.Empty)
     {
         TXT_ITEMNAME.Focus();
         MSGBOX mdg = new MSGBOX(MessageAlertHeder.Warning(), "PLEASE ENTER ITEM NAME", MessageAlertImage.Warning());
         mdg.ShowDialog();
     }
     else if (CMB_ITEM_TYPE.SelectedIndex < 0)
     {
         CMB_ITEM_TYPE.Focus();
         MSGBOX mdg = new MSGBOX(MessageAlertHeder.Warning(), "PLEASE SELECT ITEM TYPE", MessageAlertImage.Warning());
         mdg.ShowDialog();
     }
     else if (BTN_SAVE.Text == "SAVE")
     {
         SAVE_ITEMS();
         LOAD_ITEM_lIST();
         BTN_SAVE.Text = "SAVE";
         DisableControls();
         BTN_NEW.Focus();
     }
     else if (BTN_SAVE.Text == "UPDATE")
     {
         UPDATE_ITEMS();
         LOAD_ITEM_lIST();
         BTN_NEW.Focus();
     }
 }