public static MasterDataSet.WebsiteDataTable GetWebsites() { using (WebsiteTableAdapter adapter = new WebsiteTableAdapter()) { return(adapter.GetWebsites()); } }
/// <summary> /// Returns the identifier of the web site that the specified organization is associated with. /// </summary> /// <param name="organizationId">The unique identifier of the organization.</param> /// <returns>The unique identifier of the web site if it's found; otherwise, System.Guid.Empty.</returns> internal static Guid GetWebsiteIdByOrganizationId(Guid organizationId) { using (WebsiteTableAdapter adapter = new WebsiteTableAdapter()) { MasterDataSet.WebsiteDataTable table = adapter.GetWebsiteByOrganizationId(organizationId); return((table.Count > 0) ? table[0].WebsiteId : Guid.Empty); } }
public static MasterDataSet.WebsiteRow GetWebsiteRow(Guid websiteId) { using (WebsiteTableAdapter adapter = new WebsiteTableAdapter()) { MasterDataSet.WebsiteDataTable table = adapter.GetWebsite(websiteId); return((table.Count > 0) ? table[0] : null); } }
public static void UpdateWebsite(Guid websiteId, string name, string url, string description, string adminContactInfo) { using (WebsiteTableAdapter adapter = new WebsiteTableAdapter()) { adapter.Update(websiteId, name, url, description, adminContactInfo, false); } RemoveWebsiteUrlsFromCache(); }
public static Guid InsertWebsite(string name, string url, string description, string adminContactInfo) { Guid websiteId = Guid.NewGuid(); using (WebsiteTableAdapter adapter = new WebsiteTableAdapter()) { adapter.Insert(websiteId, name, url, description, adminContactInfo, false); } RemoveWebsiteUrlsFromCache(); return(websiteId); }
public static void DeleteWebsite(Guid websiteId) { MasterDataSet.WebsiteRow row = GetWebsiteRow(websiteId); if (row != null) { row.Deleted = true; using (WebsiteTableAdapter adapter = new WebsiteTableAdapter()) { adapter.Update(row); } RemoveWebsiteUrlsFromCache(); } }