public override bool saveData()
{
if (radioCreateNewWebApp.Checked && trackCreateNewWebApplication.Value == 0)
{
MessageBox.Show("Select at least one web application to create, if 'Create new web application' is selected.");
return false;
}
if (radioCreateNewWebApp.Checked && (txtOwnerUserName.Text == string.Empty || txtOwnerPassword.Text == string.Empty || txtOwnerEmail.Text == string.Empty || txtSQLServer.Text == string.Empty))
{
MessageBox.Show("Provide all details to create new web application.");
return false;
}
if (radioUseExistingWebApp.Checked && cboUseExistingWebApp.SelectedItem == null)
{
MessageBox.Show("Select at least one existing web application, if 'Use existing' is selected.");
return false;
}
WorkingDefinition.CreateNewWebApplications = trackCreateNewWebApplication.Value;
if (cboUseExistingWebApp.SelectedItem != null && WorkingDefinition.CreateNewWebApplications == 0)
{
WorkingDefinition.CreateNewWebApplications = 0;
WorkingDefinition.UseExistingWebApplication = ((ComboboxItem)cboUseExistingWebApp.SelectedItem).Value.ToString();
WorkingDefinition.UseExistingWebApplicationName = ((ComboboxItem)cboUseExistingWebApp.SelectedItem).Text.ToString();
}
else
{
WorkingDefinition.UseExistingWebApplication = string.Empty;
WorkingDefinition.UseExistingWebApplicationName = string.Empty;
WorkingDefinition.SiteCollection = string.Empty;
WorkingDefinition.WebAppOwnerLogin = txtOwnerUserName.Text;
WorkingDefinition.WebAppOwnerPassword = txtOwnerPassword.Text;
WorkingDefinition.WebAppOwnerEmail = txtOwnerEmail.Text;
WorkingDefinition.DatabaseServer = txtSQLServer.Text;
}
return true;
}