public void AddCurrency(AccessionNumber anIn) { bool wasIddata = false; if (this.accNums_ == null) { this.accNums_ = new List <AccessionNumber>(); } foreach (AccessionNumber a in this.accNums_) { if (anIn.IDDATA.Equals(a.IDDATA)) { a.Currency = anIn.Currency; wasIddata = true; } } if (!wasIddata) { this.accNums_.Add(anIn); } }
public List <AccessionNumber> accNums_; //номер+метка+иддата public void AddAccessionNum(AccessionNumber anIn) //ищем ИДДАТА и присваиваем инв.номер. если нет такого ИДДАТА - добавляем { bool wasIddata = false; if (this.accNums_ == null) { this.accNums_ = new List <AccessionNumber>(); } foreach (AccessionNumber a in this.accNums_) { if (anIn.IDDATA.Equals(a.IDDATA)) { a.AccessionNum = anIn.AccessionNum; wasIddata = true; } } if (!wasIddata) { this.accNums_.Add(anIn); } }
public void AddAccessionWriteOff(AccessionNumber anIn) { bool wasIddata = false; if (this.accNums_ == null) { this.accNums_ = new List <AccessionNumber>(); } foreach (AccessionNumber a in this.accNums_) { if (anIn.IDDATA.Equals(a.IDDATA)) { a.IsWriteOff = true; wasIddata = true; } } if (!wasIddata) { anIn.IsWriteOff = true; this.accNums_.Add(anIn); } }