Beispiel #1
0
        private void DisplayJobProperties(SPJobDefinition selectedJob)
        {
            if (selectedJob.Properties.Values.Count > 0)
            {
                //Display Summary info
                PropertyInfoDataList.DataSource = selectedJob.Properties;
                PropertyInfoDataList.DataBind();

                //Set inputs to the existing values
                if (!string.IsNullOrEmpty(selectedJob.Properties[Constants.timerJobListNameAttribute].ToString()))
                {
                    ListNameTextBox.Text = selectedJob.Properties[Constants.timerJobListNameAttribute].ToString();
                }
                if (!string.IsNullOrEmpty(selectedJob.Properties[Constants.timerJobSiteNameAttribute].ToString()))
                {
                    SiteNamesTextBox.Text = selectedJob.Properties[Constants.timerJobSiteNameAttribute].ToString();
                }
                if (!string.IsNullOrEmpty(selectedJob.Properties[Constants.timerJobDestinationSiteAttribute].ToString()))
                {
                    DestinationSiteTextBox.Text = selectedJob.Properties[Constants.timerJobDestinationSiteAttribute].ToString();
                }
            }
            else
            {
                //Set the inputs Default Values
                ListNameTextBox.Text        = ListName;
                SiteNamesTextBox.Text       = SiteName;
                DestinationSiteTextBox.Text = DestinationSiteName;
            }
            ;
        }
Beispiel #2
0
 private void ClearControls()
 {
     ListNameTextBox.Text            = string.Empty;
     SiteNamesTextBox.Text           = string.Empty;
     DestinationSiteTextBox.Text     = string.Empty;
     PropertyInfoLabel.Text          = string.Empty;
     PropertyInfoDataList.DataSource = null;
     PropertyInfoDataList.DataBind();
 }