Esempio n. 1
0
        /// <summary>
        /// 料号模糊查询
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cbo_PN_TextUpdate(object sender, EventArgs e)
        {
            GetPN();
            cbo_PN.Items.Clear();
            cbo_PN.Items.Add(string.Empty);

            var query_PN = (from PartNumber in lstPN where PartNumber.Contains(cbo_PN.Text.Trim().ToUpper()) select PartNumber).Distinct();

            foreach (var item in query_PN)
            {
                cbo_PN.Items.Add(item.ToString());
            }
            this.cbo_PN.DroppedDown = true;
            Cursor = Cursors.Default;
            this.cbo_PN.SelectionStart = this.cbo_PN.Text.Length;
        }