public void UpdateHostingUnit(HostingUnit My_HostingUnit) { foreach (var item in DataSource.My_HostingUnitList) { if (item.hosting_unit_key == My_HostingUnit.hosting_unit_key) { Dal_XML_imp.RemoveHostingUnitToXml(item.hosting_unit_key); --Configuration.HostingUnitKey; } } Dal_XML_imp.AddHostingUnitToXml(My_HostingUnit.Clone()); ++Configuration.HostingUnitKey; }
public void AddHostingUnit(HostingUnit My_HostingUnit) { My_HostingUnit.hosting_unit_key = ++Configuration.HostingUnitKey; Dal_XML_imp.AddHostingUnitToXml(My_HostingUnit.Clone()); }