private void btnOK_Click(object sender, EventArgs e) { if (cmbJobTypes.SelectedItem.ToString() != "") { IJTXConfiguration ipJTXConfig = m_ipDatabase.ConfigurationManager; IJTXJobType ipJobType = ipJTXConfig.GetJobType(cmbJobTypes.SelectedItem.ToString()); m_Arguments.Add(StepUtilities.CreateSingleArgument(m_expectedArgs[0], ipJobType.ID.ToString())); } if (chkGroup.Checked) { m_Arguments.Add(StepUtilities.CreateSingleArgument(m_expectedArgs[1], cmbGroups.SelectedItem.ToString())); } else if (chkUser.Checked) { m_Arguments.Add(StepUtilities.CreateSingleArgument(m_expectedArgs[2], cmbUsers.SelectedItem.ToString())); } DialogResult = DialogResult.OK; this.Hide(); }
private void btnOK_Click(object sender, EventArgs e) { if (cmbJobTypes.SelectedItem.ToString() != "") { m_Arguments.Add(StepUtilities.CreateSingleArgument(m_expectedArgs[0], cmbJobTypes.SelectedItem.ToString())); } if (chkGroup.Checked) { m_Arguments.Add(StepUtilities.CreateSingleArgument(m_expectedArgs[1], cmbGroups.Text)); } else if (chkUser.Checked) { m_Arguments.Add(StepUtilities.CreateSingleArgument(m_expectedArgs[2], cmbUsers.Text)); } if (chkDependThisStep.Checked) { m_Arguments.Add(StepUtilities.CreateFlagArgument(m_expectedArgs[3])); } if (chkDependNextStep.Checked) { m_Arguments.Add(StepUtilities.CreateFlagArgument(m_expectedArgs[4])); } if (chkDependThisStep.Checked || chkDependNextStep.Checked) { m_Arguments.Add(StepUtilities.CreateSingleArgument(m_expectedArgs[5], cboDependentStatus.SelectedItem.ToString())); } if (radioButton_DefineNumberOfJobs.Checked) { m_Arguments.Add(StepUtilities.CreateSingleArgument(m_expectedArgs[8], lstNumberOfJobs.Value.ToString())); if (chkAssignParentAOIToChild.Checked) { m_Arguments.Add(StepUtilities.CreateFlagArgument(m_expectedArgs[6])); } } if (radioButton_generateNumberJobs.Checked) { m_Arguments.Add(StepUtilities.CreateSingleArgument(m_expectedArgs[7], txtAOIFeatureClassName.Text)); } if (chkCreateVersion.Checked) { m_Arguments.Add(StepUtilities.CreateSingleArgument(m_expectedArgs[9], cboCreateVersionSetting.Text)); } if (chkAssignVersion.Checked) { m_Arguments.Add(StepUtilities.CreateSingleArgument(m_expectedArgs[10], cboAssignVersionSetting.Text)); } if (chkSetExtProps.Checked) { m_Arguments.Add(StepUtilities.CreateSingleArgument(m_expectedArgs[11], txtSetExtProps.Text)); } // Deal with the date options if (chkDueDate.Checked) { string strDate = JTXUtilities.GenerateDBMSDate(m_ipDatabase.JTXWorkspace, dtpDueDate.Value); m_Arguments.Add(StepUtilities.CreateSingleArgument(m_expectedArgs[12], strDate)); } else if (!String.IsNullOrEmpty(txtDuration.Text)) { int duration = -1; // Make sure the duration is a positive number int.TryParse(txtDuration.Text, out duration); if (duration > 0) { m_Arguments.Add(StepUtilities.CreateSingleArgument(m_expectedArgs[13], txtDuration.Text)); } } DialogResult = DialogResult.OK; this.Hide(); }