protected void btnRenameResourceSet_Click(object sender, EventArgs e) { #if OnlineDemo this.ErrorDisplay.ShowError(WebUtils.LRes("FeatureDisabled")); return; #endif if (!Manager.RenameResourceSet(txtOldResourceSet.Text, txtRenamedResourceSet.Text)) { ErrorDisplay.ShowError(Manager.ErrorMessage); } else { // *** Force the selected value to be set lstResourceSet.Items.Add(new ListItem("", txtRenamedResourceSet.Text.ToLower())); lstResourceSet.SelectedValue = txtRenamedResourceSet.Text.ToLower(); //this.lstResourceSet.SelectedValue = string.Empty; // null; // *** Refresh and reset the resource list GetResourceSet(); ErrorDisplay.ShowMessage(WebUtils.LRes("ResourceSetRenamed")); } }
public bool RenameResourceSet(string oldResourceSet, string newResourceSet) { #if OnlineDemo throw new ApplicationException(WebUtils.GRes("FeatureDisabled")); #endif if (!Manager.RenameResourceSet(oldResourceSet, newResourceSet)) throw new ApplicationException(Manager.ErrorMessage); return true; }