//************************************************************************************************************************ protected void btnGenerateReport_Click(object sender, EventArgs e) { ClearMessages(); #region control values var contentRoot = txtContentRootPath.Text.Trim(); var includeChildItems = chkBoxIncludeChildItems.Checked; var contentType = ddlContentType.SelectedValue; var selectedFilter = ddlFilterBy.SelectedValue; var selectedLanguage = ddlLanguage.SelectedValue; #endregion if (!String.IsNullOrEmpty(contentRoot)) { var masterDb = Database.GetDatabase(Sitecore.Configuration.Settings.GetSetting("Sitecore.SharedSource.ItemVersionTracker.SourceDatabase")); var isValid = CustomHelper.IsValidSource(contentRoot, masterDb); if (isValid) { var objVersionData = GetVersionsData(contentRoot, includeChildItems, contentType, selectedFilter, selectedLanguage); if (objVersionData != null && objVersionData.Any()) { PopulateVersionReport(objVersionData); } else { ltlReport.Text = CustomHelper.GetErrorMessage(Constants.Messages.NoRecordsFound); } } else { lblContentError.Text = Constants.Messages.InvalidSource; } } else { lblContentError.Text = Constants.Messages.RootSourceRequired; } }