private void RefreshBoms() { DERelationBizItemList relListOfDEBizItem = PlArchivManage.GetRelListOfDEBizItem(this._theItem, ConstAm.TDSBOM_RELCLASS); this.lvwPrintBom.Items.Clear(); foreach (DERelationBizItem item in relListOfDEBizItem.RelationBizItems) { if (item.Relation.State != RelationState.Deleted) { PlArchivManage.UpdatePrintLvwRelValues(this.lvwPrintBom, this.lstOrder, item); } } }
private void btnPrintEnd_Click(object sender, EventArgs e) { if (this.lvwPrintBom.SelectedItems.Count != 0) { ListViewItem current; ArrayList list = new ArrayList(); ArrayList list2 = new ArrayList(); IEnumerator enumerator = this.lvwPrintBom.SelectedItems.GetEnumerator(); while (enumerator.MoveNext()) { current = (ListViewItem)enumerator.Current; DERelationBizItem tag = current.Tag as DERelationBizItem; if (!(this.GetRelItemStatus(tag) == "已打印")) { list.Add(tag); list2.Add(current); } } if (list.Count != 0) { if (list.Count == 1) { current = list2[0] as ListViewItem; current.Selected = true; } bool isSameReason = false; for (int i = 0; i < list.Count; i++) { bool flag2; DERelationBizItem relItem = list[i] as DERelationBizItem; if (i < (list.Count - 1)) { flag2 = false; } else { flag2 = true; } if (!isSameReason) { FrmInputRemark remark = new FrmInputRemark(relItem.Id + "完成打印", true, flag2); DialogResult result = remark.ShowDialog(); isSameReason = remark.IsSameReason; string strMarkup = remark.StrMarkup; if (isSameReason) { if (result != DialogResult.OK) { int count = list.Count - i; list.RemoveRange(i, count); } else { for (int j = i; j < list.Count; j++) { DERelationBizItem item4 = list[j] as DERelationBizItem; PlArchivManage.EndPrint(item4, strMarkup); PlArchivManage.UpdatePrintLvwRelValues(this.lvwPrintBom, this.lstOrder, item4); this._isChg = true; } } break; } if (result != DialogResult.OK) { list.RemoveAt(i); i--; } else { PlArchivManage.EndPrint(relItem, strMarkup); PlArchivManage.UpdatePrintLvwRelValues(this.lvwPrintBom, this.lstOrder, relItem); this._isChg = true; } } } this.RefreshFormByDocId(); } } }