// //////////////////////////////////////////////////////////////////////// // PUBLIC METHODS - DATASET // /// <summary> /// LoadAll /// </summary> /// <param name="companyId">companyId</param> public void LoadAll(int companyId) { HotelsSetupHotelsSetupGateway hotelsSetupHotelsSetupGateway = new HotelsSetupHotelsSetupGateway(Data); hotelsSetupHotelsSetupGateway.LoadAll(companyId); UpdateDataForNavigators(); }
/// <summary> /// Save all hotels to database (direct) /// </summary> /// <param name="companyId">companyId</param> public void Save(int companyId) { HotelsSetupTDS hotelsSetupChanges = (HotelsSetupTDS)Data.GetChanges(); if (hotelsSetupChanges != null) { if (hotelsSetupChanges.HotelsSetup.Rows.Count > 0) { HotelsSetupHotelsSetupGateway hotelsSetupHotelsSetupGateway = new HotelsSetupHotelsSetupGateway(hotelsSetupChanges); foreach (HotelsSetupTDS.HotelsSetupRow row in (HotelsSetupTDS.HotelsSetupDataTable)hotelsSetupChanges.HotelsSetup) { // Delete hotels if (row.Deleted) { Hotels hotels = new Hotels(null); hotels.DeleteDirect(row.COMPANIES_ID, row.Date); } } } } }