protected void btnNext_Click(Object Sender, EventArgs e) { oOnDemand.Next(intID, Int32.Parse(Request.QueryString["sid"])); Servers oServer = new Servers(0, dsn); //DataSet dsClusters = oCSMConfig.Gets(intRequest); //foreach (DataRow drCluster in dsClusters.Tables[0].Rows) //{ // int intNodes = Int32.Parse(drCluster["nodes"].ToString()); // int intCluster = Int32.Parse(drCluster["id"].ToString()); // DataSet dsServers = oServer.GetClusters(intCluster); // if (dsServers.Tables[0].Rows.Count > 0) // { // for (int ii = 1; ii < intNodes; ii++) // { // int intServerCopy = Int32.Parse(dsServers.Tables[0].Rows[0]["id"].ToString()); // int intOS = Int32.Parse(dsServers.Tables[0].Rows[0]["osid"].ToString()); // int intSP = Int32.Parse(dsServers.Tables[0].Rows[0]["spid"].ToString()); // int intDomain = Int32.Parse(dsServers.Tables[0].Rows[0]["domainid"].ToString()); // int intDomainTest = Int32.Parse(dsServers.Tables[0].Rows[0]["test_domainid"].ToString()); // int intDR = Int32.Parse(dsServers.Tables[0].Rows[0]["dr"].ToString()); // int intLocal = Int32.Parse(dsServers.Tables[0].Rows[0]["local_storage"].ToString()); // int intF = Int32.Parse(dsServers.Tables[0].Rows[0]["fdrive"].ToString()); // int intServer = oServer.Add(intRequest, intID, 0, intCluster, ii, intOS, intSP, intDomain, intDomainTest, intDR, 1, intLocal, intF); // DataSet dsComp = oServer.GetComponents(intServerCopy); // foreach (DataRow drComp in dsComp.Tables[0].Rows) // oServer.AddComponent(intServer, Int32.Parse(drComp["componentid"].ToString())); // } // } //} // Add the server entries for each node. Response.Redirect(Request.Path + "?id=" + intID.ToString() + "&forward=true"); }
protected void Page_Load(object sender, EventArgs e) { intProfile = Int32.Parse(Request.Cookies["profileid"].Value); oOnDemand = new OnDemand(intProfile, dsn); oForecast = new Forecast(intProfile, dsn); oClass = new Classes(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"; } if (intID > 0) { DataSet ds = oForecast.GetAnswer(intID); if (ds.Tables[0].Rows.Count > 0) { int intClass = Int32.Parse(ds.Tables[0].Rows[0]["classid"].ToString()); if (oClass.IsProd(intClass) && oClass.Get(intClass, "pnc") == "0") { if (ds.Tables[0].Rows[0]["production"].ToString() != "") { txtDate.Text = DateTime.Parse(ds.Tables[0].Rows[0]["production"].ToString()).ToShortDateString(); } } else if (Request.QueryString["view"] == null) { oOnDemand.Next(intID, Int32.Parse(Request.QueryString["sid"])); Response.Redirect(Request.Path + "?id=" + intID.ToString() + "&save=true"); } else { panTest.Visible = true; } } } imgDate.Attributes.Add("onclick", "return ShowCalendar('" + txtDate.ClientID + "');"); btnNext.Attributes.Add("onclick", "return ValidateDate('" + txtDate.ClientID + "','Please enter a valid date')" + ";"); btnClose.Attributes.Add("onclick", "return window.close();"); }
protected void btnBegin_Click(Object Sender, EventArgs e) { int intRequest = oForecast.GetRequestID(intID, true); if (intRequest == 0) { Requests oRequest = new Requests(intProfile, dsn); ServiceRequests oServiceRequest = new ServiceRequests(intProfile, dsn); int intForecast = Int32.Parse(oForecast.GetAnswer(intID, "forecastid")); if (intForecast > 0) { intRequest = Int32.Parse(oForecast.Get(intForecast, "requestid")); int intProject = oRequest.GetProjectNumber(intRequest); intRequest = oRequest.Add(intProject, intProfile); } else { intRequest = oRequest.Add(0, intProfile); } } oForecast.UpdateAnswer(intID, intRequest); oOnDemand.Next(intID, Int32.Parse(Request.QueryString["sid"])); Response.Redirect(Request.Path + "?id=" + intID.ToString() + "&forward=true"); }
protected void btnNext_Click(Object Sender, EventArgs e) { oOnDemand.Next(intID, Int32.Parse(Request.QueryString["sid"])); Response.Redirect(Request.Path + "?id=" + intID.ToString() + "&forward=true"); }
protected void Page_Load(object sender, EventArgs e) { AuthenticateUser(); intProfile = Int32.Parse(Request.Cookies["profileid"].Value); oForecast = new Forecast(intProfile, dsn); oOnDemand = new OnDemand(intProfile, dsn); oPage = new Pages(intProfile, dsn); oModel = new Models(intProfile, dsn); oModelsProperties = new ModelsProperties(intProfile, dsn); oServiceRequest = new ServiceRequests(intProfile, dsn); oStorage = new Storage(intProfile, dsn); oUser = new Users(intProfile, dsn); oFunction = new Functions(intProfile, dsn, intEnvironment); if (Request.QueryString["parent"] != null && Request.QueryString["parent"] != "") { intForecast = Int32.Parse(Request.QueryString["parent"]); } if (Request.QueryString["id"] != null && Request.QueryString["id"] != "") { intID = Int32.Parse(Request.QueryString["id"]); } if (oUser.GetApplicationUrl(intProfile, intForecastPage) == "") { panDenied.Visible = true; hypDesign.NavigateUrl = "/datapoint/service/design.aspx?id=" + oFunction.encryptQueryString(intID.ToString()); } else { panAllow.Visible = true; if (Request.QueryString["saved"] != null) { Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "saved", "<script type=\"text/javascript\">alert('Forecast Equipment Saved');if(window.opener!=null)window.opener.navigate('" + oPage.GetFullLink(intForecastPage) + "?id=" + intForecast.ToString() + "');window.close();<" + "/" + "script>"); } int intType = 0; int intStep = 0; int intModel = 0; bool boolOverrideReject = false; bool boolOverridePending = false; bool boolConfidence = false; if (intID > 0) { int _step = 0; DataSet ds = oForecast.GetAnswer(intID); if (ds.Tables[0].Rows.Count > 0) { int intQuantity = Int32.Parse(ds.Tables[0].Rows[0]["quantity"].ToString()); if (intConfidence100 == Int32.Parse(ds.Tables[0].Rows[0]["confidenceid"].ToString())) { boolConfidence = true; } if (Int32.Parse(ds.Tables[0].Rows[0]["override"].ToString()) == -10) { boolOverrideReject = true; } if (Int32.Parse(ds.Tables[0].Rows[0]["override"].ToString()) == -1) { boolOverridePending = true; } lblQuantity.Text = intQuantity.ToString(); intQuantity = intQuantity * 25; lblMinimum.Text = intQuantity.ToString(); lblForecastCount.Text = ds.Tables[0].Rows[0]["quantity"].ToString(); lblCurrentCount.Text = oForecast.TotalServerCount(intID, boolUseCSM).ToString(); if (lblCurrentCount.Text != lblForecastCount.Text) { lblCurrentCount.CssClass = "biggerreddefault"; } lblCurrentDR.Text = oForecast.TotalDRCount(intID, boolUseCSM).ToString(); lblForecastDR.Text = ds.Tables[0].Rows[0]["recovery_number"].ToString(); if (lblCurrentDR.Text != lblForecastDR.Text) { lblCurrentDR.CssClass = "biggerreddefault"; } lblCurrentHA.Text = oForecast.TotalHACount(intID, boolUseCSM).ToString(); lblForecastHA.Text = ds.Tables[0].Rows[0]["ha"].ToString(); if (lblCurrentHA.Text != lblForecastHA.Text) { lblCurrentHA.CssClass = "biggerreddefault"; } if (oForecast.IsStorage(intID) == true) { DataSet dsStorage = oForecast.GetStorage(intID); double dblHigh = double.Parse(dsStorage.Tables[0].Rows[0]["high_total"].ToString()); double dblStandard = double.Parse(dsStorage.Tables[0].Rows[0]["standard_total"].ToString()); double dblLow = double.Parse(dsStorage.Tables[0].Rows[0]["low_total"].ToString()); double dblHighQA = double.Parse(dsStorage.Tables[0].Rows[0]["high_qa"].ToString()); double dblStandardQA = double.Parse(dsStorage.Tables[0].Rows[0]["standard_qa"].ToString()); double dblLowQA = double.Parse(dsStorage.Tables[0].Rows[0]["low_qa"].ToString()); double dblHighTest = double.Parse(dsStorage.Tables[0].Rows[0]["high_test"].ToString()); double dblStandardTest = double.Parse(dsStorage.Tables[0].Rows[0]["standard_test"].ToString()); double dblLowTest = double.Parse(dsStorage.Tables[0].Rows[0]["low_test"].ToString()); double dblHighHA = double.Parse(dsStorage.Tables[0].Rows[0]["high_ha"].ToString()); double dblStandardHA = double.Parse(dsStorage.Tables[0].Rows[0]["standard_ha"].ToString()); double dblLowHA = double.Parse(dsStorage.Tables[0].Rows[0]["low_ha"].ToString()); //double dblHighRep = double.Parse(dsStorage.Tables[0].Rows[0]["high_replicated"].ToString()); //double dblStandardRep = double.Parse(dsStorage.Tables[0].Rows[0]["standard_replicated"].ToString()); //double dblLowRep = double.Parse(dsStorage.Tables[0].Rows[0]["low_replicated"].ToString()); //double dblTotal = dblHigh + dblStandard + dblLow + dblHighQA + dblStandardQA + dblLowQA + dblHighTest + dblStandardTest + dblLowTest + dblHighRep + dblStandardRep + dblLowRep + dblHighHA + dblStandardHA + dblLowHA; double dblTotal = dblHigh + dblStandard + dblLow + dblHighQA + dblStandardQA + dblLowQA + dblHighTest + dblStandardTest + dblLowTest + dblHighHA + dblStandardHA + dblLowHA; lblForecastStorage.Text = dblTotal.ToString() + " GB"; lblBladeStorage.Text = dblTotal.ToString(); lblForecastStorageHighP.Text = dblHigh.ToString() + " GB"; lblForecastStorageHighQ.Text = dblHighQA.ToString() + " GB"; lblForecastStorageHighT.Text = dblHighTest.ToString() + " GB"; lblForecastStorageHighH.Text = dblHighHA.ToString() + " GB"; lblForecastStorageStandardP.Text = dblStandard.ToString() + " GB"; lblForecastStorageStandardQ.Text = dblStandardQA.ToString() + " GB"; lblForecastStorageStandardT.Text = dblStandardTest.ToString() + " GB"; lblForecastStorageStandardH.Text = dblStandardHA.ToString() + " GB"; lblForecastStorageLowP.Text = dblLow.ToString() + " GB"; lblForecastStorageLowQ.Text = dblLowQA.ToString() + " GB"; lblForecastStorageLowT.Text = dblLowTest.ToString() + " GB"; lblForecastStorageLowH.Text = dblLowHA.ToString() + " GB"; dsStorage = oStorage.GetLuns(intID); dblHigh = 0.00; dblStandard = 0.00; dblLow = 0.00; dblHighQA = 0.00; dblStandardQA = 0.00; dblLowQA = 0.00; dblHighTest = 0.00; dblStandardTest = 0.00; dblLowTest = 0.00; dblTotal = 0.00; dblHighHA = 0.00; dblStandardHA = 0.00; dblLowHA = 0.00; double dblTotalQA = 0.00; double dblTotalTest = 0.00; foreach (DataRow drStorage in dsStorage.Tables[0].Rows) { double dblQuantity = 1.00; if (Int32.Parse(drStorage["clusterid"].ToString()) > 0 && Int32.Parse(drStorage["instanceid"].ToString()) == 0) { int intCluster = Int32.Parse(drStorage["clusterid"].ToString()); Cluster oCluster = new Cluster(intProfile, dsn); dblQuantity = double.Parse(oCluster.Get(intCluster, "nodes")); } if (drStorage["size"].ToString() != "") { if (drStorage["performance"].ToString() == "High") { dblHigh += (double.Parse(drStorage["size"].ToString()) * dblQuantity); if (drStorage["high_availability"].ToString() == "1") { dblHighHA += (double.Parse(drStorage["size"].ToString()) * dblQuantity); } } if (drStorage["performance"].ToString() == "Standard") { dblStandard += (double.Parse(drStorage["size"].ToString()) * dblQuantity); if (drStorage["high_availability"].ToString() == "1") { dblStandardHA += (double.Parse(drStorage["size"].ToString()) * dblQuantity); } } if (drStorage["performance"].ToString() == "Low") { dblLow += (double.Parse(drStorage["size"].ToString()) * dblQuantity); if (drStorage["high_availability"].ToString() == "1") { dblLowHA += (double.Parse(drStorage["size"].ToString()) * dblQuantity); } } dblTotal += (double.Parse(drStorage["size"].ToString()) * dblQuantity); if (drStorage["high_availability"].ToString() == "1") { dblTotal += (double.Parse(drStorage["size"].ToString()) * dblQuantity); } } if (drStorage["size_qa"].ToString() != "") { if (drStorage["performance"].ToString() == "High") { dblHighQA += (double.Parse(drStorage["size_qa"].ToString()) * dblQuantity); } if (drStorage["performance"].ToString() == "Standard") { dblStandardQA += (double.Parse(drStorage["size_qa"].ToString()) * dblQuantity); } if (drStorage["performance"].ToString() == "Low") { dblLowQA += (double.Parse(drStorage["size_qa"].ToString()) * dblQuantity); } dblTotalQA += (double.Parse(drStorage["size_qa"].ToString()) * dblQuantity); } if (drStorage["size_test"].ToString() != "") { if (drStorage["performance"].ToString() == "High") { dblHighTest += (double.Parse(drStorage["size_test"].ToString()) * dblQuantity); } if (drStorage["performance"].ToString() == "Standard") { dblStandardTest += (double.Parse(drStorage["size_test"].ToString()) * dblQuantity); } if (drStorage["performance"].ToString() == "Low") { dblLowTest += (double.Parse(drStorage["size_test"].ToString()) * dblQuantity); } dblTotalTest += (double.Parse(drStorage["size_test"].ToString()) * dblQuantity); } 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") { dblHigh += (double.Parse(drMount["size"].ToString()) * dblQuantity); if (drMount["high_availability"].ToString() == "1") { dblHighHA += (double.Parse(drStorage["size"].ToString()) * dblQuantity); } } if (drMount["performance"].ToString() == "Standard") { dblStandard += (double.Parse(drMount["size"].ToString()) * dblQuantity); if (drMount["high_availability"].ToString() == "1") { dblStandardHA += (double.Parse(drStorage["size"].ToString()) * dblQuantity); } } if (drMount["performance"].ToString() == "Low") { dblLow += (double.Parse(drMount["size"].ToString()) * dblQuantity); if (drMount["high_availability"].ToString() == "1") { dblLowHA += (double.Parse(drStorage["size"].ToString()) * dblQuantity); } } dblTotal += (double.Parse(drMount["size"].ToString()) * dblQuantity); if (drMount["high_availability"].ToString() == "1") { dblTotal += (double.Parse(drStorage["size"].ToString()) * dblQuantity); } } if (drStorage["size_qa"].ToString() != "") { if (drMount["performance"].ToString() == "High") { dblHighQA += (double.Parse(drMount["size_qa"].ToString()) * dblQuantity); } if (drMount["performance"].ToString() == "Standard") { dblStandardQA += (double.Parse(drMount["size_qa"].ToString()) * dblQuantity); } if (drMount["performance"].ToString() == "Low") { dblLowQA += (double.Parse(drMount["size_qa"].ToString()) * dblQuantity); } dblTotalQA += (double.Parse(drMount["size_qa"].ToString()) * dblQuantity); } if (drMount["size_test"].ToString() != "") { if (drMount["performance"].ToString() == "High") { dblHighTest += (double.Parse(drMount["size_test"].ToString()) * dblQuantity); } if (drMount["performance"].ToString() == "Standard") { dblStandardTest += (double.Parse(drMount["size_test"].ToString()) * dblQuantity); } if (drMount["performance"].ToString() == "Low") { dblLowTest += (double.Parse(drMount["size_test"].ToString()) * dblQuantity); } dblTotalTest += (double.Parse(drMount["size_test"].ToString()) * dblQuantity); } } } double dblOverall = dblTotal + dblTotalQA + dblTotalTest; lblCurrentStorage.Text = dblOverall.ToString() + " GB"; lblCurrentStorageHighP.Text = dblHigh.ToString() + " GB"; lblCurrentStorageHighQ.Text = dblHighQA.ToString() + " GB"; lblCurrentStorageHighT.Text = dblHighTest.ToString() + " GB"; lblCurrentStorageHighH.Text = dblHighHA.ToString() + " GB"; lblCurrentStorageStandardP.Text = dblStandard.ToString() + " GB"; lblCurrentStorageStandardQ.Text = dblStandardQA.ToString() + " GB"; lblCurrentStorageStandardT.Text = dblStandardTest.ToString() + " GB"; lblCurrentStorageStandardH.Text = dblStandardHA.ToString() + " GB"; lblCurrentStorageLowP.Text = dblLow.ToString() + " GB"; lblCurrentStorageLowQ.Text = dblLowQA.ToString() + " GB"; lblCurrentStorageLowT.Text = dblLowTest.ToString() + " GB"; lblCurrentStorageLowH.Text = dblLowHA.ToString() + " GB"; if (lblCurrentStorage.Text != lblForecastStorage.Text) { lblCurrentStorage.CssClass = "biggerreddefault"; } } else { lblCurrentStorage.Text = "0 GB"; lblForecastStorage.Text = "0 GB"; } intModel = oForecast.GetModelAsset(intID); if (intModel == 0) { intModel = oForecast.GetModel(intID); } intModel = Int32.Parse(oModelsProperties.Get(intModel, "modelid")); intType = oModel.GetType(intModel); DataSet dsSteps = oOnDemand.GetWizardSteps(intType, 1); DataSet dsStepsDone = oOnDemand.GetWizardStepsDone(intID, intType); int intStepsTotal = dsSteps.Tables[0].Rows.Count; int intStepsNotDone = (intStepsTotal - dsStepsDone.Tables[0].Rows.Count); double dblProgress = double.Parse(intStepsNotDone.ToString()) / double.Parse(intStepsTotal.ToString()); dblProgress = dblProgress * 100.00; strProgress = oServiceRequest.GetStatusBarBlue(dblProgress, "90", true); if (Request.QueryString["step"] != null && Request.QueryString["step"] != "") { _step = Int32.Parse(Request.QueryString["step"]); if (_step <= dsSteps.Tables[0].Rows.Count) { intStep = _step; } } else if (Request.QueryString["view"] != null && Request.QueryString["sid"] != null && Request.QueryString["sid"] != "") { _step = Int32.Parse(Request.QueryString["sid"]); if (_step <= dsSteps.Tables[0].Rows.Count) { intStep = Int32.Parse(dsSteps.Tables[0].Rows[_step - 1]["id"].ToString()); } } else { if (dsStepsDone.Tables[0].Rows.Count > 0) { intStep = Int32.Parse(dsStepsDone.Tables[0].Rows[0]["id"].ToString()); } } if (oForecast.IsStorage(intID) == true) { btnDetails.Attributes.Add("onclick", "ShowHideDiv2('" + divDetails.ClientID + "');return false;"); } else { btnDetails.Enabled = false; } } if (Request.QueryString["save"] != null) { Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "save", "<script type=\"text/javascript\">if(window.opener!=null)window.opener.navigate('" + oPage.GetFullLink(intForecastPage) + "?id=" + intForecast.ToString() + "');<" + "/" + "script>"); } DataSet dsStep = oOnDemand.GetWizardStep(intStep); if (dsStep.Tables[0].Rows.Count > 0) { imgStep.ImageUrl = "/images/wizard.gif"; lblTitle.Text = dsStep.Tables[0].Rows[0]["name"].ToString(); lblSubTitle.Text = dsStep.Tables[0].Rows[0]["subtitle"].ToString(); if (boolConfidence == false) { panConfidence.Visible = true; } else if (boolOverridePending == true) { panOverridePending.Visible = true; } else if (boolOverrideReject == true) { panOverrideReject.Visible = true; } else { string strPath = dsStep.Tables[0].Rows[0]["path"].ToString(); bool boolSkip = false; bool boolShowCluster = (dsStep.Tables[0].Rows[0]["show_cluster"].ToString() == "1"); bool boolShowCSM = (dsStep.Tables[0].Rows[0]["show_csm"].ToString() == "1"); bool boolSkipCluster = (dsStep.Tables[0].Rows[0]["skip_cluster"].ToString() == "1"); bool boolSkipCSM = (dsStep.Tables[0].Rows[0]["skip_csm"].ToString() == "1"); if (oForecast.IsHACluster(intID) == true) { if (boolShowCluster == false) { boolSkip = true; } } else if (boolSkipCluster == true) { boolSkip = true; } if (oForecast.IsHACSM(intID) == true) { if (boolShowCSM == false) { boolSkip = true; } } else if (boolSkipCSM == true) { boolSkip = true; } if (boolSkip == true) { if (Request.QueryString["backward"] != null) { if (Request.QueryString["view"] != null) { _step--; Response.Redirect(Request.Path + "?id=" + intID.ToString() + "&sid=" + _step.ToString() + "&view=true"); } else { oOnDemand.Back(intID); Response.Redirect(Request.Path + "?id=" + intID.ToString() + "&backward=true"); } } else { if (Request.QueryString["view"] != null) { _step++; Response.Redirect(Request.Path + "?id=" + intID.ToString() + "&sid=" + _step.ToString() + "&view=true"); } else { oOnDemand.Next(intID, intStep); Response.Redirect(Request.Path + "?id=" + intID.ToString() + "&forward=true"); } } } if (strPath != "") { panStep.Visible = true; if (Request.QueryString["sid"] == null || Request.QueryString["sid"] == "") { Response.Redirect(Request.Path + "?id=" + intID + "&sid=" + intStep); } PHStep.Controls.Add((Control)LoadControl(strPath)); } } } else { // START ON DEMAND Response.Redirect("/frame/ondemand/status.aspx?id=" + Request.QueryString["id"]); } } } btnClose.Attributes.Add("onclick", "return window.close();"); }
protected void btnNext_Click(Object Sender, EventArgs e) { oOnDemand.Next(intID, Int32.Parse(Request.QueryString["sid"])); Servers oServer = new Servers(0, dsn); DataSet dsClusters = oCluster.Gets(intRequest); foreach (DataRow drCluster in dsClusters.Tables[0].Rows) { int intNodes = Int32.Parse(drCluster["nodes"].ToString()); int intDRLeft = Int32.Parse(drCluster["dr"].ToString()); int intHALeft = Int32.Parse(drCluster["ha"].ToString()); int intCluster = Int32.Parse(drCluster["id"].ToString()); oServer.DeleteClusters(intCluster); DataSet dsServers = oServer.GetClusters(intCluster); if (dsServers.Tables[0].Rows.Count > 0) { int intServerCopy = Int32.Parse(dsServers.Tables[0].Rows[0]["id"].ToString()); int intHA = 0; if (intHALeft > 0) { intHALeft--; intHA = 1; } int intDR = 0; if (intDRLeft > 0) { intDRLeft--; intDR = 1; } oServer.Update(intServerCopy, intHA, intDR); for (int ii = 1; ii < intNodes; ii++) { intHA = 0; if (intHALeft > 0) { intHALeft--; intHA = 1; } intDR = 0; if (intDRLeft > 0) { intDRLeft--; intDR = 1; } int intOS = Int32.Parse(dsServers.Tables[0].Rows[0]["osid"].ToString()); int intSP = Int32.Parse(dsServers.Tables[0].Rows[0]["spid"].ToString()); int intTemplate = Int32.Parse(dsServers.Tables[0].Rows[0]["templateid"].ToString()); int intDomain = Int32.Parse(dsServers.Tables[0].Rows[0]["domainid"].ToString()); int intDomainTest = Int32.Parse(dsServers.Tables[0].Rows[0]["test_domainid"].ToString()); int intINF = Int32.Parse(dsServers.Tables[0].Rows[0]["infrastructure"].ToString()); int intDRExist = Int32.Parse(dsServers.Tables[0].Rows[0]["dr_exist"].ToString()); string strDRName = dsServers.Tables[0].Rows[0]["dr_name"].ToString(); int intDRCons = Int32.Parse(dsServers.Tables[0].Rows[0]["dr_consistency"].ToString()); int intDRConsID = Int32.Parse(dsServers.Tables[0].Rows[0]["dr_consistencyid"].ToString()); int intLocal = Int32.Parse(dsServers.Tables[0].Rows[0]["local_storage"].ToString()); int intAccounts = Int32.Parse(dsServers.Tables[0].Rows[0]["accounts"].ToString()); int intF = Int32.Parse(dsServers.Tables[0].Rows[0]["fdrive"].ToString()); int intDBA = Int32.Parse(dsServers.Tables[0].Rows[0]["dba"].ToString()); int intPNC = Int32.Parse(dsServers.Tables[0].Rows[0]["pnc"].ToString()); int intDNSAuto = Int32.Parse(dsServers.Tables[0].Rows[0]["dns_auto"].ToString()); int intServer = oServer.Add(intRequest, intID, 0, 0, intCluster, ii, intOS, intSP, intTemplate, intDomain, intDomainTest, intINF, intHA, intDR, intDRExist, strDRName, intDRCons, intDRConsID, 1, intLocal, intAccounts, intF, intDBA, intPNC, 0, intDNSAuto); ServerName oServerName = new ServerName(0, dsn); DataSet dsComponents = oServerName.GetComponentDetailSelected(intServerCopy, 1); foreach (DataRow drComponent in dsComponents.Tables[0].Rows) { oServerName.AddComponentDetailSelected(intServer, Int32.Parse(drComponent["detailid"].ToString()), Int32.Parse(drComponent["prerequisiteid"].ToString()), false); } } } } // Add the server entries for each node. Response.Redirect(Request.Path + "?id=" + intID.ToString() + "&forward=true"); }