예제 #1
0
        private void txtShipmentNo_KeyDown(object sender, KeyEventArgs e)
        {
            if (String.IsNullOrEmpty(txtShipmentNo.Text) || String.IsNullOrWhiteSpace(txtShipmentNo.Text))
            {
                return;
            }
            if (e.KeyData == Keys.Tab || e.KeyData == Keys.Enter)
            {
                lblShipmentNo.Text = txtShipmentNo.Text;
                shipment           = _repositoryShipment.GetShipmentOut(txtShipmentNo.Text.Trim().ToUpper());

                if (shipment != null)
                {
                    FillForm(shipment);
                }
                else
                {
                    MessageBox.Show("Không tìm thấy đơn hàng vừa nhập", "Không tìm thấy", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }

                txtShipmentNo.Text = "";
            }
        }