/// <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);
    }
    /// <summary>
    /// Sets the source options.
    /// </summary>
    public void SetSourceOptions()
    {
        IDeDupJobProcess     job = GetJob();
        DeDupGroupDataSource ds  = new DeDupGroupDataSource(String.Empty)
        {
            GroupId    = lbxAddHocGroups.SelectedValue,
            GroupName  = lbxAddHocGroups.SelectedItem.Text,
            EntityType = job.EntitySourceType
        };

        job.DataSource = ds;
        Page.Session["DeDupJobInit"] = true;
    }
Пример #3
0
    /// <summary>
    /// Sets the source options.
    /// </summary>
    public void SetSourceOptions()
    {
        IDeDupJobProcess job = GetJob();
        DeDupGroupDataSource ds = new DeDupGroupDataSource(String.Empty)
        {
            GroupId = lbxAddHocGroups.SelectedValue,
            GroupName = lbxAddHocGroups.SelectedItem.Text,
            EntityType = job.EntitySourceType
        };

        job.DataSource = ds;
        Page.Session["DeDupJobIntit"] = true;
    }