Exemple #1
0
 private void txtEuid_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == (char)13)
     {
         var caja = InfoDryersBusiness.GetBin(txtBin.Text.ToUpper());;
         if (txtEuid.Text.Trim() != "" && txtBin.Text != "" && caja != null)
         {
             GrabaInformacion();
         }
         else
         {
             MessageBox.Show("Datos Inválidos", "Módulo Cosecha", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1);
             txtEuid.Text = "";
             txtEuid.Focus();
         }
     }
 }
Exemple #2
0
        private void txtBin_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)13)
            {
                if (txtBin.Text.Trim() != "")
                {
                    var caja = InfoDryersBusiness.GetBin(txtBin.Text.ToUpper());

                    if (caja == null)
                    {
                        MessageBox.Show("Bin no existe", "Módulo Packing", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
                        txtBin.Text = "";
                        txtBin.Focus();
                        dataEuid.DataSource = null;
                        return;
                    }
                    else
                    {
                        LlenaGrilla(txtBin.Text);
                        txtEuid.Focus();
                    }
                }
            }
        }