public RootConfig() { CSMConfig = new CSMConfig(); Logging = new LoggingConfig(); Proxy = new ProxyConfig(); EndpointDefinition = AWSConfigs._endpointDefinition; Region = AWSConfigs._awsRegion; ProfileName = AWSConfigs._awsProfileName; ProfilesLocation = AWSConfigs._awsAccountsLocation; UseSdkCache = AWSConfigs._useSdkCache; CorrectForClockSkew = true; }
protected void Page_Load(object sender, EventArgs e) { AuthenticateUser(); intProfile = Int32.Parse(Request.Cookies["profileid"].Value); oOnDemand = new OnDemand(intProfile, dsn); oForecast = new Forecast(intProfile, dsn); oCSMConfig = new CSMConfig(intProfile, dsn); oRequest = new Requests(intProfile, dsn); if (Request.QueryString["aid"] != null && Request.QueryString["aid"] != "") { intAnswer = Int32.Parse(Request.QueryString["aid"]); } if (Request.QueryString["id"] != null && Request.QueryString["id"] != "") { intConfig = Int32.Parse(Request.QueryString["id"]); } int intServer = 0; int intDR = 0; if (intAnswer > 0) { DataSet ds = oForecast.GetAnswer(intAnswer); if (ds.Tables[0].Rows.Count > 0) { intServer = Int32.Parse(ds.Tables[0].Rows[0]["quantity"].ToString()) - oForecast.TotalServerCount(intAnswer, boolUseCSM); intDR = Int32.Parse(ds.Tables[0].Rows[0]["recovery_number"].ToString()) - oForecast.TotalDRCount(intAnswer, boolUseCSM); intRequest = oForecast.GetRequestID(intAnswer, true); if (!IsPostBack) { panView.Visible = true; ds = oCSMConfig.Get(intConfig); if (ds.Tables[0].Rows.Count > 0) { txtName.Text = ds.Tables[0].Rows[0]["name"].ToString(); txtServers.Text = ds.Tables[0].Rows[0]["servers"].ToString(); txtDR.Text = ds.Tables[0].Rows[0]["dr"].ToString(); } } } } btnClose.Attributes.Add("onclick", "return window.close();"); btnDenied.Attributes.Add("onclick", "return window.close();"); btnSave.Attributes.Add("onclick", "return ValidateText('" + txtName.ClientID + "','Please enter a custom name for this cluster')" + " && ValidateNumber0('" + txtServers.ClientID + "','Please enter a valid number for the number of servers')" + " && ValidateNumberLess('" + txtServers.ClientID + "'," + intServer + ",'You cannot add any more than " + intServer + " servers')" + " && ValidateNumber('" + txtDR.ClientID + "','Please enter a valid number for the number of DR servers')" + " && ValidateNumberLess('" + txtDR.ClientID + "'," + intDR + ",'You cannot add any more than " + intDR + " DR servers')" + ";"); }
public RootConfig() { CSMConfig = new CSMConfig(); Logging = new LoggingConfig(); Proxy = new ProxyConfig(); EndpointDefinition = AWSConfigs._endpointDefinition; Region = AWSConfigs._awsRegion; ProfileName = AWSConfigs._awsProfileName; ProfilesLocation = AWSConfigs._awsAccountsLocation; UseSdkCache = AWSConfigs._useSdkCache; CorrectForClockSkew = true; #if !NETSTANDARD var root = AWSConfigs.GetSection <AWSSection>(_rootAwsSectionName); Logging.Configure(root.Logging); Proxy.Configure(root.Proxy); CSMConfig.Configure(root.CSMConfig); ServiceSections = root.ServiceSections; if (root.UseSdkCache.HasValue) { UseSdkCache = root.UseSdkCache.Value; } EndpointDefinition = Choose(EndpointDefinition, root.EndpointDefinition); Region = Choose(Region, root.Region); ProfileName = Choose(ProfileName, root.ProfileName); ProfilesLocation = Choose(ProfilesLocation, root.ProfilesLocation); ApplicationName = Choose(ApplicationName, root.ApplicationName); if (root.CorrectForClockSkew.HasValue) { CorrectForClockSkew = root.CorrectForClockSkew.Value; } #endif }
protected void Page_Load(object sender, EventArgs e) { Page.Title = "ClearView Config Information"; intProfile = Int32.Parse(Request.Cookies["profileid"].Value); oOnDemand = new OnDemand(intProfile, dsn); oForecast = new Forecast(intProfile, dsn); oModel = new Models(intProfile, dsn); oModelsProperties = new ModelsProperties(intProfile, dsn); oCSMConfig = new CSMConfig(intProfile, dsn); if (Request.QueryString["id"] != null && Request.QueryString["id"] != "") { intID = Int32.Parse(Request.QueryString["id"]); } if (Request.QueryString["sid"] != null && Request.QueryString["sid"] != "") { intStep = Int32.Parse(Request.QueryString["sid"]); } if (Request.QueryString["step"] != null && Request.QueryString["step"] != "") { panUpdate.Visible = true; } else { panNavigation.Visible = true; } int intForecastCount = 0; int intForecastDRCount = 0; int intCurrentCount = 0; int intCurrentDRCount = 0; if (intID > 0) { Page.Title = "ClearView Config Information | Design # " + intID.ToString(); DataSet ds = oForecast.GetAnswer(intID); if (ds.Tables[0].Rows.Count > 0) { intRequest = oForecast.GetRequestID(intID, true); intForecastCount = Int32.Parse(ds.Tables[0].Rows[0]["quantity"].ToString()); intForecastDRCount = Int32.Parse(ds.Tables[0].Rows[0]["recovery_number"].ToString()); intCurrentCount = oForecast.TotalServerCount(intID, boolUseCSM); intCurrentDRCount = oForecast.TotalDRCount(intID, boolUseCSM); int intModel = oForecast.GetModel(intID); intModel = Int32.Parse(oModelsProperties.Get(intModel, "modelid")); intType = oModel.GetType(intModel); if (oForecast.IsOSMidrange(intID) == true) { boolMidrange = true; } DataSet dsSteps = oOnDemand.GetWizardSteps(intType, 1); int intCount = Int32.Parse(oOnDemand.GetWizardStep(intStep, "step")); if (dsSteps.Tables[0].Rows.Count == intCount) { btnNext.Text = "Finish"; } if (intCount == 0 || intCount == 1) { btnBack.Enabled = false; } if (!IsPostBack) { LoadClusters(); } } } btnClose.Attributes.Add("onclick", "return window.close();"); btnAdd.Attributes.Add("onclick", "return OpenCluster('" + intID.ToString() + "','');"); if (strAttributes == "") { if (intCurrentCount > 0) { panValid.Visible = true; } btnNext.Attributes.Add("onclick", "return ValidateEqual('" + intForecastCount + "','" + intCurrentCount + "','WARNING: Your Current Server Count does not equal your Forecasted Server Count.\\n\\nForecasted Server Count = " + intForecastCount + "\\nCurrent Server Count = " + intCurrentCount + "\\n\\nIf you choose to proceed, you will not be able to provision the remaining devices.\\n\\nAre you sure you want to continue?')" + ";"); btnUpdate.Attributes.Add("onclick", "return ValidateEqual('" + intForecastDRCount + "','" + intCurrentDRCount + "','WARNING: Your Current DR Count does not equal your Forecasted DR Count.\\n\\nForecasted DR Count = " + intForecastCount + "\\nCurrent DR Count = " + intCurrentCount + "\\n\\nIf you choose to proceed, you will not be able to provision the remaining devices.\\n\\nAre you sure you want to continue?')" + ";"); } else { btnNext.Attributes.Add("onclick", strAttributes); btnUpdate.Attributes.Add("onclick", strAttributes); } }
protected void Page_Load(object sender, EventArgs e) { Page.Title = "ClearView Device Configuration"; intProfile = Int32.Parse(Request.Cookies["profileid"].Value); oOnDemand = new OnDemand(intProfile, dsn); oForecast = new Forecast(intProfile, dsn); oModel = new Models(intProfile, dsn); oModelsProperties = new ModelsProperties(intProfile, dsn); oCluster = new Cluster(intProfile, dsn); oCSMConfig = new CSMConfig(intProfile, dsn); oServer = new Servers(intProfile, dsn); oStorage = new Storage(intProfile, dsn); if (Request.QueryString["id"] != null && Request.QueryString["id"] != "") { intID = Int32.Parse(Request.QueryString["id"]); } if (Request.QueryString["sid"] != null && Request.QueryString["sid"] != "") { intStep = Int32.Parse(Request.QueryString["sid"]); } if (oForecast.GetAnswer(intID, "completed") == "" && Request.QueryString["view"] == null) { if (Request.QueryString["step"] != null && Request.QueryString["step"] != "") { panUpdate.Visible = true; } else { panNavigation.Visible = true; } } else { btnClose.Text = "Close"; } bool boolStorage = true; if (intID > 0) { Page.Title = "ClearView Device Configuration | Design # " + intID.ToString(); oServer.UpdateModels(intID); DataSet ds = oForecast.GetAnswer(intID); if (ds.Tables[0].Rows.Count > 0) { intRequest = oForecast.GetRequestID(intID, true); intTotalCount = Int32.Parse(ds.Tables[0].Rows[0]["quantity"].ToString()); intTotalDR = Int32.Parse(ds.Tables[0].Rows[0]["recovery_number"].ToString()); int intModel = oForecast.GetModel(intID); intModel = Int32.Parse(oModelsProperties.Get(intModel, "modelid")); intType = oModel.GetType(intModel); DataSet dsSteps = oOnDemand.GetWizardSteps(intType, 1); int intCount = Int32.Parse(oOnDemand.GetWizardStep(intStep, "step")); if (dsSteps.Tables[0].Rows.Count == intCount) { btnNext.Text = "Finish"; } if (intCount == 0 || intCount == 1) { btnBack.Enabled = false; } if (oForecast.IsStorage(intID) == true) { DataSet dsStorage = oForecast.GetStorage(intID); double dblHighA = double.Parse(dsStorage.Tables[0].Rows[0]["high_total"].ToString()); double dblStandardA = double.Parse(dsStorage.Tables[0].Rows[0]["standard_total"].ToString()); double dblLowA = double.Parse(dsStorage.Tables[0].Rows[0]["low_total"].ToString()); double dblHighQAA = double.Parse(dsStorage.Tables[0].Rows[0]["high_qa"].ToString()); double dblStandardQAA = double.Parse(dsStorage.Tables[0].Rows[0]["standard_qa"].ToString()); double dblLowQAA = double.Parse(dsStorage.Tables[0].Rows[0]["low_qa"].ToString()); double dblHighTestA = double.Parse(dsStorage.Tables[0].Rows[0]["high_test"].ToString()); double dblStandardTestA = double.Parse(dsStorage.Tables[0].Rows[0]["standard_test"].ToString()); double dblLowTestA = double.Parse(dsStorage.Tables[0].Rows[0]["low_test"].ToString()); dsStorage = oStorage.GetLuns(intID); double dblHighU = 0.00; double dblStandardU = 0.00; double dblLowU = 0.00; double dblHighQAU = 0.00; double dblStandardQAU = 0.00; double dblLowQAU = 0.00; double dblHighTestU = 0.00; double dblStandardTestU = 0.00; double dblLowTestU = 0.00; foreach (DataRow drStorage in dsStorage.Tables[0].Rows) { if (drStorage["size"].ToString() != "") { if (drStorage["performance"].ToString() == "High") { dblHighU += double.Parse(drStorage["size"].ToString()); } if (drStorage["performance"].ToString() == "Standard") { dblStandardU += double.Parse(drStorage["size"].ToString()); } if (drStorage["performance"].ToString() == "Low") { dblLowU += double.Parse(drStorage["size"].ToString()); } } if (drStorage["size_qa"].ToString() != "") { if (drStorage["performance"].ToString() == "High") { dblHighQAU += double.Parse(drStorage["size_qa"].ToString()); } if (drStorage["performance"].ToString() == "Standard") { dblStandardQAU += double.Parse(drStorage["size_qa"].ToString()); } if (drStorage["performance"].ToString() == "Low") { dblLowQAU += double.Parse(drStorage["size_qa"].ToString()); } } if (drStorage["size_test"].ToString() != "") { if (drStorage["performance"].ToString() == "High") { dblHighTestU += double.Parse(drStorage["size_test"].ToString()); } if (drStorage["performance"].ToString() == "Standard") { dblStandardTestU += double.Parse(drStorage["size_test"].ToString()); } if (drStorage["performance"].ToString() == "Low") { dblLowTestU += double.Parse(drStorage["size_test"].ToString()); } } DataSet dsMount = oStorage.GetMountPoints(Int32.Parse(drStorage["id"].ToString())); foreach (DataRow drMount in dsMount.Tables[0].Rows) { if (drMount["size"].ToString() != "") { if (drMount["performance"].ToString() == "High") { dblHighU += double.Parse(drMount["size"].ToString()); } if (drMount["performance"].ToString() == "Standard") { dblStandardU += double.Parse(drMount["size"].ToString()); } if (drMount["performance"].ToString() == "Low") { dblLowU += double.Parse(drMount["size"].ToString()); } } if (drMount["size_qa"].ToString() != "") { if (drMount["performance"].ToString() == "High") { dblHighQAU += double.Parse(drMount["size_qa"].ToString()); } if (drMount["performance"].ToString() == "Standard") { dblStandardQAU += double.Parse(drMount["size_qa"].ToString()); } if (drMount["performance"].ToString() == "Low") { dblLowQAU += double.Parse(drMount["size_qa"].ToString()); } } if (drMount["size_test"].ToString() != "") { if (drMount["performance"].ToString() == "High") { dblHighTestU += double.Parse(drMount["size_test"].ToString()); } if (drMount["performance"].ToString() == "Standard") { dblStandardTestU += double.Parse(drMount["size_test"].ToString()); } if (drMount["performance"].ToString() == "Low") { dblLowTestU += double.Parse(drMount["size_test"].ToString()); } } } } if (dblHighA < dblHighU || dblStandardA < dblStandardU || dblLowA < dblLowU || dblHighQAA < dblHighQAU || dblStandardQAA < dblStandardQAU || dblLowQAA < dblLowQAU || dblHighTestA < dblHighTestU || dblStandardTestA < dblStandardTestU || dblLowTestA < dblLowTestU) { boolStorage = false; } } if (!IsPostBack) { LoadDevices(); } if (boolConfigured == true && boolStorage == true) { panValid.Visible = true; } } } btnClose.Attributes.Add("onclick", "return window.close();"); if (boolConfigured == false) { btnNext.Attributes.Add("onclick", "alert('You cannot continue until you have configured all devices.\\n\\nClick OK to close this window. Then click [Edit] to configure each device.');return false;"); btnUpdate.Attributes.Add("onclick", "alert('You cannot continue until you have configured all devices.\\n\\nClick OK to close this window. Then click [Edit] to configure each device.');return false;"); } //if (boolStorage == false) //{ // btnNext.Attributes.Add("onclick", "alert('You have allocated more storage than you requested. \\n\\nClick OK to close this window. Then click [Edit] to modify the storage allocation.\\n\\nClick \"Storage Details\" for additional information.');return false;"); // btnUpdate.Attributes.Add("onclick", "alert('You have allocated more storage than you requested. \\n\\nClick OK to close this window. Then click [Edit] to modify the storage allocation.\\n\\nClick \"Storage Details\" for additional information.');return false;"); //} }
protected void Page_Load(object sender, EventArgs e) { AuthenticateUser(); intProfile = Int32.Parse(Request.Cookies["profileid"].Value); oOnDemand = new OnDemand(intProfile, dsn); oForecast = new Forecast(intProfile, dsn); oClass = new Classes(intProfile, dsn); oCSMConfig = new CSMConfig(intProfile, dsn); oRequest = new Requests(intProfile, dsn); oServer = new Servers(intProfile, dsn); oStorage = new Storage(intProfile, dsn); oModel = new Models(intProfile, dsn); oModelsProperties = new ModelsProperties(intProfile, dsn); oVMWare = new VMWare(intProfile, dsn); oConsistencyGroup = new ConsistencyGroups(intProfile, dsn); oServerName = new ServerName(intProfile, dsn); oUser = new Users(intProfile, dsn); oOperatingSystem = new OperatingSystems(intProfile, dsn); if (Request.QueryString["aid"] != null && Request.QueryString["aid"] != "") { intAnswer = Int32.Parse(Request.QueryString["aid"]); } if (Request.QueryString["clusterid"] != null && Request.QueryString["clusterid"] != "") { intCluster = Int32.Parse(Request.QueryString["clusterid"]); } if (Request.QueryString["csmid"] != null && Request.QueryString["csmid"] != "") { intConfig = Int32.Parse(Request.QueryString["csmid"]); } if (Request.QueryString["num"] != null && Request.QueryString["num"] != "") { intNumber = Int32.Parse(Request.QueryString["num"]); } int intMenuTab = 0; if (Request.QueryString["menu_tab"] != null && Request.QueryString["menu_tab"] != "") { intMenuTab = Int32.Parse(Request.QueryString["menu_tab"]); } if (Request.QueryString["refresh"] != null) { Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "refresh", "<script type=\"text/javascript\">RefreshOpeningWindow();<" + "/" + "script>"); } if (Request.QueryString["save"] != null) { Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "save", "<script type=\"text/javascript\">RefreshOpeningWindow();window.close();<" + "/" + "script>"); } else if (Request.QueryString["required"] != null) { if (Request.QueryString["dba"] != null) { Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "dba", "<script type=\"text/javascript\">RefreshOpeningWindow();alert('Please enter a database administrator');<" + "/" + "script>"); intMenuTab = 1; } } int intServer = 0; int intDR = 0; if (intAnswer > 0) { Page.Title = "ClearView Configure Device | Design # " + intAnswer.ToString(); DataSet ds = oForecast.GetAnswer(intAnswer); if (ds.Tables[0].Rows.Count > 0) { Tab oTab = new Tab("", intMenuTab, "divMenu1", true, false); oTab.AddTab("1.) General Information", ""); oTab.AddTab("2.) Software Components", ""); strMenuTab1 = oTab.GetTabs(); int intModel = oForecast.GetModel(intAnswer); int intType = oModelsProperties.GetType(intModel); int intDRForecast = Int32.Parse(oForecast.TotalDRCount(intAnswer, boolUseCSM).ToString()); int intDRCurrent = Int32.Parse(ds.Tables[0].Rows[0]["recovery_number"].ToString()); int intHAForecast = Int32.Parse(oForecast.TotalHACount(intAnswer, boolUseCSM).ToString()); int intHACurrent = Int32.Parse(ds.Tables[0].Rows[0]["ha"].ToString()); bool boolHADisabled = (oModelsProperties.IsHighAvailability(intModel) == false); bool boolHA = oForecast.IsHARoom(intAnswer); int _classid = Int32.Parse(ds.Tables[0].Rows[0]["classid"].ToString()); if (oClass.Get(_classid, "prod") == "1") { if (oModelsProperties.IsStorageDE_FDriveMustBeOnSAN(intModel) == true) { radDRNo.Checked = false; radDRYes.Checked = true; radDRNo.Enabled = false; radDRYes.Enabled = false; divDR1.Style["display"] = "inline"; divDR2.Style["display"] = "inline"; } if (ds.Tables[0].Rows[0]["test"].ToString() == "1") { panTest.Visible = true; } } if (boolHA == false) { radHANo.Checked = true; radHAYes.Checked = false; radHANo.Enabled = false; radHAYes.Enabled = false; } if (intCluster > 0) { panCluster.Visible = false; radHANo.Checked = true; radHAYes.Checked = false; radHANo.Enabled = false; radHAYes.Enabled = false; radDRNo.Checked = true; radDRYes.Checked = false; radDRNo.Enabled = false; radDRYes.Enabled = false; divDR1.Style["display"] = "none"; divDR2.Style["display"] = "none"; } int _environmentid = Int32.Parse(ds.Tables[0].Rows[0]["environmentid"].ToString()); intServer = Int32.Parse(ds.Tables[0].Rows[0]["quantity"].ToString()) - oForecast.TotalServerCount(intAnswer, boolUseCSM); intDR = Int32.Parse(ds.Tables[0].Rows[0]["recovery_number"].ToString()) - oForecast.TotalDRCount(intAnswer, boolUseCSM); intRequest = oForecast.GetRequestID(intAnswer, true); if (ds.Tables[0].Rows[0]["applicationid"].ToString() == "0") { panInfrastructure.Visible = true; } if (!IsPostBack) { LoadLists(_classid, _environmentid); int intDBA = 0; ds = oServer.Get(intAnswer, intConfig, intCluster, intNumber); if (ds.Tables[0].Rows.Count > 0) { panComponents.Visible = true; frmComponents.Attributes.Add("src", "/frame/ondemand/config_server_components.aspx" + Request.Url.Query); intServer = Int32.Parse(ds.Tables[0].Rows[0]["id"].ToString()); Page.Title = "ClearView Configure Device | Server # " + intServer.ToString(); if (ds.Tables[0].Rows[0]["step"].ToString() != "0") { btnSaveConfig.Visible = false; } lblId.Text = intServer.ToString(); Int32.TryParse(ds.Tables[0].Rows[0]["osid"].ToString(), out intOS); if (intOS > 0 && ddlOS.SelectedValue == "0") { ddlOS.SelectedValue = intOS.ToString(); } int intSP = 0; Int32.TryParse(ds.Tables[0].Rows[0]["spid"].ToString(), out intSP); ddlServicePack.SelectedValue = intSP.ToString(); ddlMaintenance.SelectedValue = intSP.ToString(); ddlTemplate.SelectedValue = ds.Tables[0].Rows[0]["templateid"].ToString(); ddlDomain.SelectedValue = ds.Tables[0].Rows[0]["domainid"].ToString(); ddlTestDomain.SelectedValue = ds.Tables[0].Rows[0]["test_domainid"].ToString(); intDBA = Int32.Parse(ds.Tables[0].Rows[0]["dba"].ToString()); if (ds.Tables[0].Rows[0]["infrastructure"].ToString() == "1") { radInfrastructureYes.Checked = true; } else { radInfrastructureNo.Checked = true; } if (ds.Tables[0].Rows[0]["ha"].ToString() == "1") { radHAYes.Checked = true; } else { radHANo.Checked = true; } if (ds.Tables[0].Rows[0]["dr"].ToString() == "1") { radDRYes.Checked = true; divDR1.Style["display"] = "inline"; if (ds.Tables[0].Rows[0]["dr_exist"].ToString() == "1") { radExistYes.Checked = true; divExist.Style["display"] = "inline"; txtRecovery.Text = ds.Tables[0].Rows[0]["dr_name"].ToString(); } else { radExistNo.Checked = true; } divDR2.Style["display"] = "inline"; if (ds.Tables[0].Rows[0]["dr_consistency"].ToString() == "1") { radConsistencyYes.Checked = true; divConsistency1.Style["display"] = "inline"; divConsistency2.Style["display"] = "inline"; int intConsistency = Int32.Parse(ds.Tables[0].Rows[0]["dr_consistencyid"].ToString()); hdnConsistencyGroup.Value = intConsistency.ToString(); txtConsistencyGroup.Text = oConsistencyGroup.Get(intConsistency, "name"); } else { radConsistencyNo.Checked = true; } } else { radDRNo.Checked = true; } // Check selected items DataSet dsSelected = oServerName.GetComponentDetailSelected(intServer, 1); foreach (DataRow drSelected in dsSelected.Tables[0].Rows) { if (drSelected["sql"].ToString() == "1" || drSelected["dbase"].ToString() == "1") { divDBA.Style["display"] = "inline"; if (intDBA > 0) { txtUser.Text = oUser.GetFullName(intDBA) + " (" + oUser.GetName(intDBA) + ")"; hdnUser.Value = intDBA.ToString(); } } } } else { panComponentsNo.Visible = true; } } if (intDRCurrent < intDRForecast || (intDRCurrent == intDRForecast && radDRYes.Checked == false)) { radDRNo.Checked = true; radDRYes.Checked = false; radDRNo.Enabled = false; radDRYes.Enabled = false; divDR1.Style["display"] = "none"; divDR2.Style["display"] = "none"; } if (intHACurrent < intHAForecast || (intHACurrent == intHAForecast && radHAYes.Checked == false)) { radHANo.Checked = true; radHAYes.Checked = false; radHANo.Enabled = false; radHAYes.Enabled = false; } btnClose.Attributes.Add("onclick", "return window.close();"); if (oModelsProperties.IsConfigServicePack(intModel) == true || oOperatingSystem.IsWindows(intOS) == true || oOperatingSystem.IsWindows2008(intOS) == true) { panSP.Visible = true; } if (oModelsProperties.IsConfigVMWareTemplate(intModel) == true) { panTemplate.Visible = true; } if (oModelsProperties.IsConfigMaintenanceLevel(intModel) == true) { panMaintenance.Visible = true; } string strInfrastructure = ""; if (panInfrastructure.Visible == true) { strInfrastructure = " && ValidateRadioButtons('" + radInfrastructureYes.ClientID + "','" + radInfrastructureNo.ClientID + "','Please choose if this server is an infrastructure server')"; } string strTemplate = ""; if (panTemplate.Visible == true) { strTemplate = " && ValidateDropDown('" + ddlTemplate.ClientID + "','Please select a template')"; } string strSP = ""; if (panSP.Visible == true) { strSP = " && ValidateDropDown('" + ddlServicePack.ClientID + "','Please select a service pack')"; } if (panMaintenance.Visible == true) { strSP = " && ValidateDropDown('" + ddlMaintenance.ClientID + "','Please select a maintenance level')"; } string strHA = ""; string strDR = ""; if (panCluster.Visible == true) { strHA = " && ValidateRadioButtons('" + radHAYes.ClientID + "','" + radHANo.ClientID + "','Please choose if this server has an HA counterpart')"; strDR = " && EnsureDR('" + radDRYes.ClientID + "','" + radDRNo.ClientID + "','" + radExistYes.ClientID + "','" + radExistNo.ClientID + "','" + txtRecovery.ClientID + "','" + radConsistencyYes.ClientID + "','" + radConsistencyNo.ClientID + "','" + hdnConsistencyGroup.ClientID + "')"; } btnSaveConfig.Attributes.Add("onclick", "return ValidateDropDown('" + ddlDomain.ClientID + "','Please select a domain')" + " && ValidateHiddenDisabled('" + hdnUser.ClientID + "','" + txtUser.ClientID + "','Please enter a username, first name or last name')" + strSP + strTemplate + " && ValidateDropDown('" + ddlTestDomain.ClientID + "','Please select a domain')" + strInfrastructure + strHA + strDR + ";"); } } else { btnSaveConfig.Enabled = false; } radDRYes.Attributes.Add("onclick", "ShowHideDiv('" + divDR1.ClientID + "','inline');ShowHideDiv('" + divDR2.ClientID + "','inline');ShowHideDivCheck('" + divExist.ClientID + "',document.getElementById('" + radExistYes.ClientID + "'));ShowHideDivCheck('" + divConsistency1.ClientID + "',document.getElementById('" + radConsistencyYes.ClientID + "'));ShowHideDivCheck('" + divConsistency2.ClientID + "',document.getElementById('" + radConsistencyYes.ClientID + "'));"); radDRNo.Attributes.Add("onclick", "ShowHideDiv('" + divDR1.ClientID + "','none');ShowHideDiv('" + divDR2.ClientID + "','none');ShowHideDiv('" + divExist.ClientID + "','none');ShowHideDiv('" + divConsistency1.ClientID + "','none');ShowHideDiv('" + divConsistency2.ClientID + "','none');"); radExistYes.Attributes.Add("onclick", "ShowHideDiv('" + divExist.ClientID + "','inline');"); radExistNo.Attributes.Add("onclick", "ShowHideDiv('" + divExist.ClientID + "','none');"); radConsistencyYes.Attributes.Add("onclick", "ShowHideDiv('" + divConsistency1.ClientID + "','inline');ShowHideDiv('" + divConsistency2.ClientID + "','inline');"); radConsistencyNo.Attributes.Add("onclick", "ShowHideDiv('" + divConsistency1.ClientID + "','none');ShowHideDiv('" + divConsistency2.ClientID + "','none');"); btnConsistencyServer.Attributes.Add("onclick", "return ShowConsistency('CONSISTENCY_SERVER','?id=0','" + txtConsistencyGroup.ClientID + "','" + hdnConsistencyGroup.ClientID + "');"); btnConsistencyName.Attributes.Add("onclick", "return ShowConsistency('CONSISTENCY_SELECT','?id=0','" + txtConsistencyGroup.ClientID + "','" + hdnConsistencyGroup.ClientID + "');"); btnConsistencyNew.Attributes.Add("onclick", "return ShowConsistency('CONSISTENCY_NEW','?id=0','" + txtConsistencyGroup.ClientID + "','" + hdnConsistencyGroup.ClientID + "');"); Variables oVariable = new Variables(intEnvironment); txtUser.Attributes.Add("onkeyup", "return AJAXTextBoxGet(this,'250','195','" + divAJAX.ClientID + "','" + lstAJAX.ClientID + "','" + hdnUser.ClientID + "','" + oVariable.URL() + "/frame/users.aspx',2);"); lstAJAX.Attributes.Add("ondblclick", "AJAXClickRow();"); }