public bool AddLineItem(SaleOrderlineItem qli) { bool flag; try { if (this.lineItems == null) { this.lineItems = new List <SaleOrderlineItem>(); } if (!this.lineItems.Contains(qli)) { this.lineItems.Add(qli); } else { this.lineItems[this.lineItems.IndexOf(qli)] = qli; } flag = true; } catch (Exception exception) { throw exception; } return(flag); }
public override bool Equals(object obj) { SaleOrderlineItem item = obj as SaleOrderlineItem; if (obj == null) { return(false); } return(obj.GetHashCode() == this.GetHashCode()); }
public SaleOrderlineItem GetLineItem(SaleOrderlineItem qli) { SaleOrderlineItem item; try { if (this.lineItems == null) { this.lineItems = new List <SaleOrderlineItem>(); } if (this.lineItems.Contains(qli)) { return(this.lineItems[this.lineItems.IndexOf(qli)]); } item = null; } catch (Exception exception) { throw exception; } return(item); }
public bool DelLineItem(SaleOrderlineItem sli) { bool flag; try { if (this.lineItems == null) { this.lineItems = new List <SaleOrderlineItem>(); } if (this.lineItems.Contains(sli)) { this.lineItems.RemoveAt(this.lineItems.IndexOf(sli)); return(true); } flag = false; } catch (Exception exception) { throw exception; } return(flag); }