/// <summary> /// Button make version major click. /// </summary> protected void btnMakeMajor_Click(object sender, EventArgs e) { if (Object != null) { // Check permissions if (CheckPermissions && !AllowModify) { ShowError(GetString("History.ErrorNotAllowedToModify")); return; } ObjectVersionHistoryInfo version = ObjectVersionManager.GetLatestVersion(Object.TypeInfo.ObjectType, Object.Generalized.ObjectID); if (version != null) { if (ObjectVersionManager.MakeVersionMajor(version)) { ShowConfirmation(GetString("objectversioning.makeversionmajorinfo")); } ReloadData(); } else { ShowError(GetString("objectversioning.makeversionmajornoversion") + " " + GetString("objectversioning.objecthasnohistory")); } } else { UIContext.EditedObject = null; } }
/// <summary> /// Button make version major click. /// </summary> protected void btnMakeMajor_Click(object sender, EventArgs e) { if (Object != null) { ObjectVersionHistoryInfo version = ObjectVersionManager.GetLatestVersion(Object.ObjectType, Object.ObjectID); if (version != null) { ObjectVersionManager.MakeVersionMajor(version); ReloadData(); lblInfo.Text = GetString("objectversioning.makeversionmajorinfo"); } else { lblError.Text = GetString("objectversioning.makeversionmajornoversion") + " " + GetString("objectversioning.objecthasnohistory"); } plcLabels.Visible = true; } else { CMSPage.EditedObject = null; } }