private void btnDocBox_Click(object sender, EventArgs e) { if (currentBoxList != null && currentBoxList.Exists(i => i.PACKRESULT == "E" && i.RESULT == "S")) { DocBoxDetailForm form = new DocBoxDetailForm(currentBoxList); if (form.ShowDialog() == DialogResult.OK) { grid.Rows.Clear(); if (currentBoxList.Count > 0) { foreach (PBBoxInfo item in currentBoxList) { AddBoxDetailGrid(item); } } } } }
private void dmButton6_Click(object sender, EventArgs e) { if (currentBoxList != null && currentBoxList.Exists(i => i.PACKRESULT == "E" && i.RESULT == "S")) { List <PBBoxInfo> boxs = currentBoxList.FindAll(i => i.PACKRESULT == "E" && i.RESULT == "S"); DocBoxDetailForm form = new DocBoxDetailForm(currentBoxList); if (form.ShowDialog() == DialogResult.OK) { currentBoxList.RemoveAll(i => boxs.Exists(j => j.HU == i.HU)); grid.Rows.Clear(); if (currentBoxList.Count > 0) { foreach (PBBoxInfo item in currentBoxList) { AddBoxDetailGrid(item); } } } } }