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); oService = new Services(intProfile, dsn); 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 (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 boolApproved = true; imgStep.ImageUrl = "/images/wizard.gif"; if (intID > 0) { DataSet ds = oForecast.GetAnswer(intID); if (ds.Tables[0].Rows.Count > 0) { int intRequest = Int32.Parse(ds.Tables[0].Rows[0]["serviceid"].ToString()); DataSet dsApproval = oService.GetSelected(intRequest); foreach (DataRow drApproval in dsApproval.Tables[0].Rows) { if (drApproval["approved"].ToString() == "0") { boolApproved = false; break; } } int intQuantity = Int32.Parse(ds.Tables[0].Rows[0]["quantity"].ToString()); lblForecastCount.Text = ds.Tables[0].Rows[0]["quantity"].ToString(); lblCurrentCount.Text = oForecast.TotalWorkstationCount(intID).ToString(); if (lblCurrentCount.Text != lblForecastCount.Text) { lblCurrentCount.CssClass = "biggerreddefault"; } 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"] != "") { int _step = Int32.Parse(Request.QueryString["step"]); if (_step <= dsSteps.Tables[0].Rows.Count) { intStep = _step; } } else { if (dsStepsDone.Tables[0].Rows.Count > 0) { intStep = Int32.Parse(dsStepsDone.Tables[0].Rows[0]["id"].ToString()); } } } 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>"); } if (boolApproved == false) { panPending.Visible = true; } else { DataSet dsStep = oOnDemand.GetWizardStep(intStep); if (dsStep.Tables[0].Rows.Count > 0) { lblTitle.Text = dsStep.Tables[0].Rows[0]["name"].ToString(); lblSubTitle.Text = dsStep.Tables[0].Rows[0]["subtitle"].ToString(); string strPath = dsStep.Tables[0].Rows[0]["path"].ToString(); 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"]); } } } }
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); oModel = new Models(intProfile, dsn); oModelsProperties = new ModelsProperties(intProfile, dsn); oWorkstation = new Workstations(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; } if (intID > 0) { 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 (!IsPostBack) { LoadDevices(intModel); } if (boolConfigured == true) { panValid.Visible = true; } // else // panInvalid.Visible = true; } } btnClose.Attributes.Add("onclick", "return window.close();"); btnNext.Attributes.Add("onclick", "return ValidateBoolean(" + (boolConfigured ? "true" : "false") + ",'You cannot continue until you have configured all devices.\\n\\nClick OK to close this window. Then click [Edit] to configure each device.');"); btnUpdate.Attributes.Add("onclick", "return ValidateBoolean(" + (boolConfigured ? "true" : "false") + ",'You cannot continue until you have configured all devices.\\n\\nClick OK to close this window. Then click [Edit] to configure each device.');"); }
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) { 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 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) { Page.Title = "ClearView Application 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); oUser = new Users(intProfile, dsn); oVariable = new Variables(intEnvironment); oClass = new Classes(intProfile, dsn); oMnemonic = new Mnemonic(intProfile, dsn); oCostCenter = new CostCenter(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"; } string strPNC = ""; int intClass = 0; if (intID > 0) { Page.Title = "ClearView Application Information | Design # " + intID.ToString(); DataSet ds = oForecast.GetAnswer(intID); if (ds.Tables[0].Rows.Count > 0) { intRequest = oForecast.GetRequestID(intID, true); txtName.Text = ds.Tables[0].Rows[0]["appname"].ToString(); intClass = Int32.Parse(ds.Tables[0].Rows[0]["classid"].ToString()); if (oClass.Get(intClass, "pnc") == "1") { boolPNC = true; } if (boolPNC == true) { panMnemonic.Visible = true; strPNC = " && ValidateHidden0('" + hdnMnemonic.ClientID + "','" + txtMnemonic.ClientID + "','Please enter the mnemonic of this design\\n\\n(Start typing and a list will be presented...)')"; int intMnemonic = Int32.Parse(ds.Tables[0].Rows[0]["mnemonicid"].ToString()); if (intMnemonic > 0) { txtMnemonic.Text = oMnemonic.Get(intMnemonic, "factory_code") + " - " + oMnemonic.Get(intMnemonic, "name"); } hdnMnemonic.Value = intMnemonic.ToString(); int intCostCenter = 0; if (boolUseCostCenter == true) { panCostCenter.Visible = true; strPNC = " && ValidateHidden0('" + hdnCostCenter.ClientID + "','" + txtCostCenter.ClientID + "','Please enter the cost center of this design\\n\\n(Start typing and a list will be presented...)')"; if (Int32.TryParse(ds.Tables[0].Rows[0]["costcenterid"].ToString(), out intCostCenter) == true) { txtCostCenter.Text = oCostCenter.GetName(intCostCenter); } } hdnCostCenter.Value = intCostCenter.ToString(); } else { panCode.Visible = true; strPNC = " && ValidateText('" + txtCode.ClientID + "','Please enter an application code')"; txtCode.Text = ds.Tables[0].Rows[0]["appcode"].ToString(); } int intDR = Int32.Parse(ds.Tables[0].Rows[0]["dr_criticality"].ToString()); if (intDR == 1) { radHigh.Checked = true; } if (intDR == 2) { radLow.Checked = true; } int intOwner = Int32.Parse(ds.Tables[0].Rows[0]["appcontact"].ToString()); int intPrimary = Int32.Parse(ds.Tables[0].Rows[0]["admin1"].ToString()); int intSecondary = Int32.Parse(ds.Tables[0].Rows[0]["admin2"].ToString()); int intAppOwner = Int32.Parse(ds.Tables[0].Rows[0]["appowner"].ToString()); int intEngineer = Int32.Parse(ds.Tables[0].Rows[0]["networkengineer"].ToString()); if (intOwner > 0) { txtOwner.Text = oUser.GetFullName(intOwner) + " (" + oUser.GetName(intOwner) + ")"; } if (intPrimary > 0) { txtPrimary.Text = oUser.GetFullName(intPrimary) + " (" + oUser.GetName(intPrimary) + ")"; } if (intSecondary > 0) { txtSecondary.Text = oUser.GetFullName(intSecondary) + " (" + oUser.GetName(intSecondary) + ")"; } if (intAppOwner > 0) { txtAppOwner.Text = oUser.GetFullName(intAppOwner) + " (" + oUser.GetName(intAppOwner) + ")"; } if (intEngineer > 0) { txtEngineer.Text = oUser.GetFullName(intEngineer) + " (" + oUser.GetName(intEngineer) + ")"; } hdnOwner.Value = intOwner.ToString(); hdnPrimary.Value = intPrimary.ToString(); hdnSecondary.Value = intSecondary.ToString(); hdnAppOwner.Value = intAppOwner.ToString(); hdnEngineer.Value = intEngineer.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; } } } txtOwner.Attributes.Add("onkeyup", "return AJAXTextBoxGet(this,'300','195','" + divOwner.ClientID + "','" + lstOwner.ClientID + "','" + hdnOwner.ClientID + "','" + oVariable.URL() + "/frame/users.aspx',2);"); lstOwner.Attributes.Add("ondblclick", "AJAXClickRow();"); txtPrimary.Attributes.Add("onkeyup", "return AJAXTextBoxGet(this,'300','195','" + divPrimary.ClientID + "','" + lstPrimary.ClientID + "','" + hdnPrimary.ClientID + "','" + oVariable.URL() + "/frame/users.aspx',2);"); lstPrimary.Attributes.Add("ondblclick", "AJAXClickRow();"); txtSecondary.Attributes.Add("onkeyup", "return AJAXTextBoxGet(this,'300','195','" + divSecondary.ClientID + "','" + lstSecondary.ClientID + "','" + hdnSecondary.ClientID + "','" + oVariable.URL() + "/frame/users.aspx',2);"); lstSecondary.Attributes.Add("ondblclick", "AJAXClickRow();"); txtAppOwner.Attributes.Add("onkeyup", "return AJAXTextBoxGet(this,'300','195','" + divAppOwner.ClientID + "','" + lstAppOwner.ClientID + "','" + hdnAppOwner.ClientID + "','" + oVariable.URL() + "/frame/users.aspx',2);"); lstAppOwner.Attributes.Add("ondblclick", "AJAXClickRow();"); txtEngineer.Attributes.Add("onkeyup", "return AJAXTextBoxGet(this,'300','195','" + divEngineer.ClientID + "','" + lstEngineer.ClientID + "','" + hdnEngineer.ClientID + "','" + oVariable.URL() + "/frame/users.aspx',2);"); lstEngineer.Attributes.Add("ondblclick", "AJAXClickRow();"); txtMnemonic.Attributes.Add("onkeyup", "return AJAXTextBoxGet(this,'500','195','" + divMnemonic.ClientID + "','" + lstMnemonic.ClientID + "','" + hdnMnemonic.ClientID + "','" + oVariable.URL() + "/frame/ajax/ajax_mnemonics.aspx',2);"); lstMnemonic.Attributes.Add("ondblclick", "AJAXClickRow();"); txtCostCenter.Attributes.Add("onkeyup", "return AJAXTextBoxGet(this,'200','195','" + divCostCenter.ClientID + "','" + lstCostCenter.ClientID + "','" + hdnCostCenter.ClientID + "','" + oVariable.URL() + "/frame/ajax/ajax_cost_centers.aspx',5);"); lstCostCenter.Attributes.Add("ondblclick", "AJAXClickRow();"); btnClose.Attributes.Add("onclick", "return window.close();"); string strEngineer = ""; if (oForecast.IsHACSM(intID) == true) { panEngineer.Visible = true; strEngineer = " && ValidateHidden0('" + hdnEngineer.ClientID + "','" + txtEngineer.ClientID + "','Please enter the LAN ID of your network engineer')"; } string strAppOwner = ""; if (boolPNC == true) { panAppOwner.Visible = true; strAppOwner = " && ValidateHidden0('" + hdnAppOwner.ClientID + "','" + txtAppOwner.ClientID + "','Please enter the LAN ID of your application owner')"; } if (oClass.IsProd(intClass)) { panDR.Visible = true; btnNext.Attributes.Add("onclick", "return ValidateText('" + txtName.ClientID + "','Please enter an application name')" + strPNC + " && ValidateRadioButtons('" + radHigh.ClientID + "','" + radLow.ClientID + "','Please select the disaster recovery criticality')" + " && ValidateHidden0('" + hdnOwner.ClientID + "','" + txtOwner.ClientID + "','Please enter the LAN ID of your Departmental Manager')" + " && ValidateHidden0('" + hdnPrimary.ClientID + "','" + txtPrimary.ClientID + "','Please enter the LAN ID of your Application Technical Lead')" + //" && ValidateHidden0('" + hdnSecondary.ClientID + "','" + txtSecondary.ClientID + "','Please enter the LAN ID of your secondary administrator')" + strAppOwner + strEngineer + ";"); btnUpdate.Attributes.Add("onclick", "return ValidateText('" + txtName.ClientID + "','Please enter an application name')" + strPNC + " && ValidateRadioButtons('" + radHigh.ClientID + "','" + radLow.ClientID + "','Please select the disaster recovery criticality')" + " && ValidateHidden0('" + hdnOwner.ClientID + "','" + txtOwner.ClientID + "','Please enter the LAN ID of your Departmental Manager')" + " && ValidateHidden0('" + hdnPrimary.ClientID + "','" + txtPrimary.ClientID + "','Please enter the LAN ID of your Application Technical Lead')" + //" && ValidateHidden0('" + hdnSecondary.ClientID + "','" + txtSecondary.ClientID + "','Please enter the LAN ID of your secondary administrator')" + strAppOwner + strEngineer + ";"); } else { btnNext.Attributes.Add("onclick", "return ValidateText('" + txtName.ClientID + "','Please enter an application name')" + strPNC + " && ValidateHidden0('" + hdnOwner.ClientID + "','" + txtOwner.ClientID + "','Please enter the LAN ID of your Departmental Manager')" + " && ValidateHidden0('" + hdnPrimary.ClientID + "','" + txtPrimary.ClientID + "','Please enter the LAN ID of your Application Technical Lead')" + //" && ValidateHidden0('" + hdnSecondary.ClientID + "','" + txtSecondary.ClientID + "','Please enter the LAN ID of your secondary administrator')" + strAppOwner + strEngineer + ";"); btnUpdate.Attributes.Add("onclick", "return ValidateText('" + txtName.ClientID + "','Please enter an application name')" + strPNC + " && ValidateHidden0('" + hdnOwner.ClientID + "','" + txtOwner.ClientID + "','Please enter the LAN ID of your Departmental Manager')" + " && ValidateHidden0('" + hdnPrimary.ClientID + "','" + txtPrimary.ClientID + "','Please enter the LAN ID of your Application Technical Lead')" + //" && ValidateHidden0('" + hdnSecondary.ClientID + "','" + txtSecondary.ClientID + "','Please enter the LAN ID of your secondary administrator')" + strAppOwner + strEngineer + ";"); } btnManager.Attributes.Add("onclick", "return OpenWindow('NEW_USER','');"); }
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); oModel = new Models(intProfile, dsn); oModelsProperties = new ModelsProperties(intProfile, dsn); oUser = new Users(intProfile, dsn); oVariable = new Variables(intEnvironment); oWorkstation = new Workstations(intProfile, dsn); oClass = new Classes(intProfile, dsn); oCostCenter = new CostCenter(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 intClass = 0; string strPool = ""; if (intID > 0) { DataSet ds = oForecast.GetAnswer(intID); if (ds.Tables[0].Rows.Count > 0) { if (!IsPostBack) { LoadLists(); } intRequest = oForecast.GetRequestID(intID, true); //ddlCost.SelectedValue = ds.Tables[0].Rows[0]["costid"].ToString(); int intCostCenter = 0; if (Int32.TryParse(ds.Tables[0].Rows[0]["costcenterid"].ToString(), out intCostCenter) == true && intCostCenter > 0) { txtCostCenter.Text = oCostCenter.GetName(intCostCenter); } hdnCostCenter.Value = intCostCenter.ToString(); intClass = Int32.Parse(ds.Tables[0].Rows[0]["classid"].ToString()); if (oClass.IsProd(intClass)) { if (ds.Tables[0].Rows[0]["poolid"].ToString() != "" && ds.Tables[0].Rows[0]["poolid"].ToString() != "0") { radExisting.Checked = true; divExisting.Style["display"] = "inline"; ddlExisting.SelectedValue = ds.Tables[0].Rows[0]["poolid"].ToString(); } else { radNone.Checked = true; } panPool.Visible = true; strPool = " && EnsurePool('" + radNone.ClientID + "','" + radNew.ClientID + "','" + txtName.ClientID + "','" + txtDescription.ClientID + "','" + radExisting.ClientID + "','" + ddlExisting.ClientID + "')"; } int intManager = Int32.Parse(ds.Tables[0].Rows[0]["appcontact"].ToString()); if (intManager > 0) { txtManager.Text = oUser.GetFullName(intManager) + " (" + oUser.GetName(intManager) + ")"; } hdnManager.Value = intManager.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; } } } txtManager.Attributes.Add("onkeyup", "return AJAXTextBoxGet(this,'300','195','" + divManager.ClientID + "','" + lstManager.ClientID + "','" + hdnManager.ClientID + "','" + oVariable.URL() + "/frame/users.aspx',2);"); lstManager.Attributes.Add("ondblclick", "AJAXClickRow();"); btnManager.Attributes.Add("onclick", "return OpenWindow('NEW_USER','');"); btnClose.Attributes.Add("onclick", "return window.close();"); btnNext.Attributes.Add("onclick", "return ValidateHidden0('" + hdnManager.ClientID + "','" + txtManager.ClientID + "','Please enter the LAN ID of your user access administrator')" + " && ValidateHidden0('" + hdnCostCenter.ClientID + "','" + txtCostCenter.ClientID + "','Please enter the cost center to be billed for this workstation')" + strPool + ";"); btnUpdate.Attributes.Add("onclick", "return ValidateHidden0('" + hdnManager.ClientID + "','" + txtManager.ClientID + "','Please enter the LAN ID of your user access administrator')" + " && ValidateHidden0('" + hdnCostCenter.ClientID + "','" + txtCostCenter.ClientID + "','Please enter the cost center to be billed for this workstation')" + strPool + ";"); radNone.Attributes.Add("onclick", "ShowHideDiv('" + divNew.ClientID + "','none');ShowHideDiv('" + divExisting.ClientID + "','none');"); radNew.Attributes.Add("onclick", "ShowHideDiv('" + divNew.ClientID + "','inline');ShowHideDiv('" + divExisting.ClientID + "','none');"); radExisting.Attributes.Add("onclick", "ShowHideDiv('" + divNew.ClientID + "','none');ShowHideDiv('" + divExisting.ClientID + "','inline');"); txtCostCenter.Attributes.Add("onkeyup", "return AJAXTextBoxGet(this,'200','195','" + divCostCenter.ClientID + "','" + lstCostCenter.ClientID + "','" + hdnCostCenter.ClientID + "','" + oVariable.URL() + "/frame/ajax/ajax_cost_centers.aspx',5);"); lstCostCenter.Attributes.Add("ondblclick", "AJAXClickRow();"); }