/// <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); } }