public void Save() { _isNew = false; IsDirty = false; if (!SupplierList.Contains(SupplierId)) { SupplierList.GetSupplierList().Add(this); } }
private static void DeleteChild(int parentSupplirId) { foreach (var childSupplier in SupplierList.GetChildSuppliers(parentSupplirId)) { var childSupplierId = childSupplier.SupplierId; if (SupplierList.Contains(childSupplierId)) { DeleteChild(childSupplierId); SupplierList.GetSupplierList().Remove(childSupplier); } } }
private static void BuildInstance() { Instance = new SupplierList(); ResetData(); }