Ejemplo n.º 1
0
        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();
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Returns the first URL of the specified web site.
 /// </summary>
 /// <param name="websiteId">The identifier of the web site.</param>
 /// <returns>The first URL of the web site.</returns>
 public static string GetWebsiteUrl(Guid websiteId)
 {
     MasterDataSet.WebsiteRow row = GetWebsiteRow(websiteId);
     return((row == null) ? null : row.Url.Replace("\r", string.Empty).Split(new string[] { "\n" }, StringSplitOptions.RemoveEmptyEntries)[0]);
 }