private bool DoItemCode(string itemCode) { if (string.IsNullOrEmpty(itemCode)) { return(false); } zKey = DbAccess.GetUnmanagedZKey(itemCode); if (zKey != null) { itemNameBox1.Text = zKey.ZKNAME1; itemNameBox2.Text = zKey.ZKNAME2; itemNameBox3.Text = zKey.ZKNAME3; msgBox.Text = string.Empty; return(true); } else { msgBox.Text = "没有此Item主数据"; itemCodeBox.Focus(); itemCodeBox.SelectAll(); return(false); } }