/// <summary> /// Raises the <see cref="E:System.Web.UI.Control.PreRender"></see> event. /// </summary> /// <param name="e">An <see cref="T:System.EventArgs"></see> object that contains the event data.</param> protected override void OnPreRender(EventArgs e) { ImportManager importManager = Page.Session["importManager"] as ImportManager; if (importManager != null) { GetImportTemplateList(importManager.Options); string template = cboTemplates.SelectedValue; cmdSave.Enabled = (!template.Equals(GetLocalResourceObject("cboTemplates.None.Item").ToString()) && !String.IsNullOrEmpty(template)); cmdSaveAs.Enabled = true; IList <SourceFieldMap> sourceList = GetSourceList(importManager); grdSource.DataSource = sourceList; IList <ImportTargetProperty> targetList = importManager.GetTargetPropertyDisplayList(chkShowAllTargets.Checked, false); grdTarget.DataSource = targetList; grdTarget.DataBind(); grdSource.DataBind(); IList <ImportMap> importMaps = importManager.ImportMaps; lblMatches.Text = String.Format(GetLocalResourceObject("lblMatches.Caption").ToString(), importMaps.Count.ToString(), sourceList.Count.ToString()); } else { DialogService.ShowMessage(GetLocalResourceObject("error_ImportManager_NotFound").ToString()); } base.OnPreRender(e); }