private void btPartOK_Click(object sender, EventArgs e) { PartList.Items.Clear(); if (this.listallPart.SelectedItems.Count < 1) { this.sMain.ShowPrgMsg("没有选择任何项..", MainParent.MsgType.Warning); return; } for (int i = 0; i < this.listallPart.SelectedItems.Count; i++) { string[] arr = new string[10]; arr = this.listallPart.SelectedItems[i].ToString().Split('-'); if (PartList.FindString(arr[0]) == -1) { PartList.Items.Add(arr[0]); } } btpartselect_Click(null, null); listallwo.Items.Clear(); string model = ""; GetListStringPart(out model, PartList); DataTable dtwoid = FrmBLL.publicfuntion.getNewTable(mdt, string.Format("PartNumber in ({0})", model)); foreach (DataRow dr in dtwoid.Rows) { listallwo.Items.Add(dr["woid"].ToString()); NamesWo.Add(dr["woid"].ToString()); } wolist.Items.Clear(); }