/// <summary> /// Undo check out. /// </summary> protected void btnUndoCheckOut_Click(object sender, EventArgs e) { try { WebPartInfo wpi = WebPartInfoProvider.GetWebPartInfo(webPart.WebPartType); if (wpi != null) { WebPartLayoutInfo wpli = WebPartLayoutInfoProvider.GetWebPartLayoutInfo(wpi.WebPartName, LayoutCodeName); if (wpli != null) { SiteManagerFunctions.UndoCheckOutWebPartLayout(wpli.WebPartLayoutID); etaCode.ReadOnly = false; etaCode.Enabled = true; etaCSS.ReadOnly = false; etaCSS.Enabled = true; } } } catch (Exception ex) { this.lblError.Text = GetString("WebPartLayout.ErrorUndoCheckout") + ": " + ex.Message; this.lblError.Visible = true; return; } SetCheckPanel(null); }
protected void btnUndoCheckOut_Click(object sender, EventArgs e) { try { SiteManagerFunctions.UndoCheckOutWebPartLayout(layoutId); } catch (Exception ex) { lblError.Text = GetString("WebPartLayout.ErrorUndoCheckout") + ": " + ex.Message; lblError.Visible = true; return; } URLHelper.Redirect(URLHelper.Url.AbsoluteUri); }