/// <summary>
    /// Loads the view with the defaulted data.
    /// </summary>
    protected void LoadView()
    {
        if (ddlJobs.Items.Count <= 0)
        {
            IList <DeDupJobConfig> jobs = DeDupService.Configurations.DeDupJobs;
            foreach (DeDupJobConfig job in jobs)
            {
                ddlJobs.Items.Add(new ListItem {
                    Text = GetJobDisplayName(job), Value = job.Name
                });
            }
            ddlJobs.SelectedIndex = 0;
            Page.Session.Remove("DeDupJob");
        }

        IDeDupJobProcess savedJob        = Page.Session["DeDupJob"] as IDeDupJobProcess;
        string           selectedAdHocId = string.Empty;

        if (savedJob == null)
        {
            DeDupJobConfig jobConfig = GetConfig(ddlJobs.SelectedValue);
            _selectedEntitySourceName = jobConfig != null ? jobConfig.EntitySourceName : ddlJobs.SelectedValue;
        }
        else
        {
            _selectedEntitySourceName = savedJob.EntitySourceName;
            DeDupGroupDataSource ds = savedJob.DataSource as DeDupGroupDataSource;
            selectedAdHocId = ds.GroupId;
        }

        LoadAddHocGroups(_selectedEntitySourceName, selectedAdHocId);
    }
    private string GetJobDisplayName(DeDupJobConfig jobConfig)
    {
        object resource    = GetLocalResourceObject("Job." + jobConfig.Name);
        string displayName = resource != null?resource.ToString() : jobConfig.DisplayName;

        return(displayName);
    }
Ejemplo n.º 3
0
 private string GetJobDisplayName(DeDupJobConfig jobConfig)
 {
     object resource = GetLocalResourceObject("Job." + jobConfig.Name);
     string displayName = jobConfig.DisplayName;
     if (resource != null)
     {
         displayName = resource.ToString();
     }
     return displayName;
 }