/// <summary> /// Deletes culture. Called when the "Delete culture" button is pressed. /// Expects the CreateCulture method to be run first. /// </summary> private bool DeleteCulture() { // Get the culture CultureInfo deleteCulture = CultureInfoProvider.GetCultureInfo("MyNewCulture"); // Delete the culture CultureInfoProvider.DeleteCultureInfo(deleteCulture); return(deleteCulture != null); }
private void DeleteCulture(int cultureId) { CultureInfo culture = CultureInfoProvider.GetSafeCulture(cultureId); EditedObject = culture; string cultureCode = culture.CultureCode; DataSet ds = CultureInfoProvider.GetCultureSites(cultureCode); if (DataHelper.DataSourceIsEmpty(ds)) { CultureInfoProvider.DeleteCultureInfo(cultureCode); } else { ShowError(GetString("culture_list.errorremoveculture")); } }
private void DeleteCulture(int cultureId) { CultureInfo culture = CultureInfoProvider.GetSafeCulture(cultureId); EditedObject = culture; string cultureCode = culture.CultureCode; DataSet ds = CultureInfoProvider.GetCultureSites(cultureCode); if (DataHelper.DataSourceIsEmpty(ds)) { CultureInfoProvider.DeleteCultureInfo(cultureCode); } else { lblError.Visible = true; lblError.Text += GetString("culture_list.errorremoveculture") + "\n"; } }