protected void Page_Load(object sender, EventArgs e) { intProfile = Int32.Parse(Request.Cookies["profileid"].Value); oDesign = new Design(intProfile, dsn); oPage = new Pages(intProfile, dsn); oMnemonic = new Mnemonic(intProfile, dsn); oCostCenter = new CostCenter(intProfile, dsn); oClass = new Classes(intProfile, dsn); oEnvironment = new Environments(intProfile, dsn); oLocation = new Locations(intProfile, dsn); oOperatingSystem = new OperatingSystems(intProfile, dsn); oHoliday = new Holidays(intProfile, dsn); oModelsProperties = new ModelsProperties(intProfile, dsn); oUser = new Users(intProfile, dsn); oFunction = new Functions(intProfile, dsn, intEnvironment); oForecast = new Forecast(intProfile, dsn); oRequest = new Requests(intProfile, dsn); oProject = new Projects(intProfile, dsn); //if (Request.QueryString["id"] != null && Request.QueryString["id"] != "") //intID = Int32.Parse(Request.QueryString["id"]); if (!IsPostBack) { DataSet dsSummary = oDesign.Get(this.DesignId); if (dsSummary.Tables[0].Rows.Count > 0) { int intModel = oDesign.GetModelProperty(this.DesignId); lblSummarySolution.Text = oModelsProperties.Get(intModel, "name"); DataRow drSummary = dsSummary.Tables[0].Rows[0]; bool boolWeb = (drSummary["web"].ToString() == "1"); bool boolSQL = oDesign.IsSQL(this.DesignId); bool boolOracle = oDesign.IsOracle(this.DesignId); bool boolOtherDB = (drSummary["other_db"].ToString() == "1"); DataSet dsSubmitted = oDesign.GetSubmitted(this.DesignId); if (dsSubmitted.Tables[0].Rows.Count > 0) { trSubmitted.Visible = true; int intUser = Int32.Parse(dsSubmitted.Tables[0].Rows[0]["userid"].ToString()); lblSummarySubmittedBy.Text = oUser.GetFullName(intUser) + " (" + oUser.GetName(intUser) + ")"; lblSummarySubmittedOn.Text = dsSubmitted.Tables[0].Rows[0]["created"].ToString(); if (dsSubmitted.Tables[0].Rows[0]["comments"].ToString() != "") { trException1.Visible = true; trException2.Visible = true; trException3.Visible = true; lblException.Text = oFunction.FormatText(dsSubmitted.Tables[0].Rows[0]["comments"].ToString()); lblExceptionID.Text = dsSubmitted.Tables[0].Rows[0]["exceptionID"].ToString(); } } // Project int intForecast = 0; int intRequest = 0; int intProject = 0; Int32.TryParse(drSummary["forecastid"].ToString(), out intForecast); if (intForecast > 0) { Int32.TryParse(oForecast.Get(intForecast, "requestid"), out intRequest); if (intRequest > 0) { intProject = oRequest.GetProjectNumber(intRequest); if (intProject > 0) { lblSummaryProjectName.Text = oProject.Get(intProject, "name"); string strNumber = oProject.Get(intProject, "number"); lblSummaryProjectNumber.Text = strNumber; // Check to see if Demo DataSet dsDemo = oFunction.GetSetupValuesByKey("DEMO_PROJECT"); foreach (DataRow drDemo in dsDemo.Tables[0].Rows) { if (strNumber == drDemo["Value"].ToString()) { boolDemo = true; break; } } } } } // Mnemonic int intMnemonic = 0; Int32.TryParse(drSummary["mnemonicid"].ToString(), out intMnemonic); if (intMnemonic > 0) { lblSummaryMnemonic.Text = oMnemonic.Get(intMnemonic, "factory_code") + " - " + oMnemonic.Get(intMnemonic, "name"); } // Class + Environment + Location int intClass = 0; int intEnv = 0; int intAddress = 0; Int32.TryParse(drSummary["classid"].ToString(), out intClass); if (intClass > 0) { lblSummaryLocation.Text = oClass.Get(intClass, "name") + ", "; Int32.TryParse(drSummary["environmentid"].ToString(), out intEnv); if (intEnv > 0) { lblSummaryLocation.Text += oEnvironment.Get(intEnv, "name"); Int32.TryParse(drSummary["addressid"].ToString(), out intAddress); if (intAddress > 0) { lblSummaryLocation.Text += " at <a href=\"javascript:void(0);\" onclick=\"ShowHideDiv2('divLocation');\">" + oLocation.GetFull(intAddress) + " <img src=\"/images/help.gif\" border=\"0\" align=\"absmiddle\"/></a>"; } else { bool boolProd = oClass.IsProd(intClass); bool boolQA = oClass.IsQA(intClass); bool boolTest = oClass.IsTestDev(intClass); bool boolDR = oClass.IsDR(intClass); DataSet dsLocations = oLocation.GetAddressClass((boolDR ? 1 : 0), (boolProd ? 1 : 0), (boolQA ? 1 : 0), (boolTest ? 1 : 0)); if (dsLocations.Tables[0].Rows.Count > 0) { StringBuilder strLocation = new StringBuilder(); int intLocationCount = 0; foreach (DataRow drLocation in dsLocations.Tables[0].Rows) { intLocationCount++; if (intLocationCount > 1) { if (intLocationCount > 2) { strLocation.Insert(0, ", "); } else { strLocation.Insert(0, " or "); } } if (drLocation["commonname"].ToString() != "") { strLocation.Insert(0, drLocation["commonname"].ToString()); } else { strLocation.Insert(0, oLocation.GetFull(Int32.Parse(drLocation["id"].ToString()))); } } lblSummaryLocation.Text += " at <a href=\"javascript:void(0);\" onclick=\"ShowHideDiv2('divLocation');\">" + strLocation.ToString() + " <img src=\"/images/help.gif\" border=\"0\" align=\"absmiddle\"/></a>"; } } } } // Server Type if (oDesign.IsDatabase(this.DesignId) == false) { if (boolWeb) { lblSummaryServerType.Text = "Web"; } else { lblSummaryServerType.Text = "Application"; } } else { lblSummaryServerType.Text = "Database"; if (boolSQL || boolOracle || boolOtherDB) { string strDatabase = ""; if (boolSQL == true) { strDatabase = "SQL"; } if (boolOracle == true) { strDatabase = "Oracle"; } if (boolOtherDB == true) { strDatabase = "Other"; } lblSummaryServerType.Text += " (" + strDatabase + ")"; } if (boolWeb) { lblSummaryServerType.Text += " + Web"; } } // Quantity int intQuantity = 0; Int32.TryParse(drSummary["quantity"].ToString(), out intQuantity); if (intQuantity > 0) { lblSummaryQuantity.Text = intQuantity.ToString(); } // OS int intOS = 0; Int32.TryParse(drSummary["osid"].ToString(), out intOS); if (intOS > 0) { lblSummaryOS.Text = oOperatingSystem.Get(intOS, "name"); } // SIZE string strSize = drSummary["cores"].ToString() + " CPU(s), " + drSummary["ram"].ToString() + " GB(s) RAM"; lblSummarySize.Text = strSize; // STORAGE if (drSummary["storage"].ToString() == "1") { if (drSummary["persistent"].ToString() == "1") { int intPersistent = oDesign.GetStorageTotal(this.DesignId); if (intPersistent > 0) { lblSummaryStorage.Text = "Persistent, " + intPersistent.ToString() + " GB(s)"; } } else if (drSummary["persistent"].ToString() == "0") { int intNonPersistent = 0; Int32.TryParse(drSummary["non_persistent"].ToString(), out intNonPersistent); if (intNonPersistent > 0) { lblSummaryStorage.Text = "Non-Persistent, " + intNonPersistent.ToString() + " GB(s)"; } } else { int intStorage = oDesign.GetStorageTotal(this.DesignId); if (intStorage > 0) { lblSummaryStorage.Text = intStorage.ToString() + " GB(s)"; } } } else if (drSummary["storage"].ToString() == "0") { lblSummaryStorage.Text = "No"; } // HA if (drSummary["ha"].ToString() == "1") { if (oModelsProperties.IsSUNVirtual(intModel) == true) { lblSummaryHA.Text = "Sun Virtual Environment (SVE)"; } else if (drSummary["ha_clustering"].ToString() == "1") { lblSummaryHA.Text = "Clustered"; if (drSummary["active_passive"].ToString() == "1") { lblSummaryHA.Text += " (Active / Passive)"; } else if (drSummary["active_passive"].ToString() == "2") { lblSummaryHA.Text += " (Active / Active)"; } } else if (drSummary["ha_load_balancing"].ToString() == "1") { lblSummaryHA.Text = "Load Balancing"; } } else if (drSummary["ha"].ToString() == "0") { lblSummaryHA.Text = "No"; } else { lblSummaryHA.Text = "<i>N / A</i>"; } // SPECIAL if (oModelsProperties.IsVMwareVirtual(intModel)) { lblSummaryBootType.Text = "Virtual Hard Disk (VHD)"; } else if (oModelsProperties.IsStorageDB_BootLocal(intModel)) { lblSummaryBootType.Text = "Local Disk"; } else { lblSummaryBootType.Text = "SAN Disk"; } // DATE DateTime datDate = DateTime.Now; if (DateTime.TryParse(drSummary["commitment"].ToString(), out datDate) == true) { lblSummaryDate.Text = datDate.ToShortDateString(); // Target completion date = 2 weeks later than commitment DateTime datTarget = oHoliday.GetDays(dblSLA, datDate); string strTarget = datTarget.ToShortDateString(); if (strTarget != "") { lblSummaryTarget.Text = strTarget + " (<a href=\"javascript:void(0);\" onclick=\"alert('" + strTarget + " is " + dblSLA.ToString() + " business days from your build date (" + lblSummaryDate.Text + ").\\n\\nBusiness days exclude weekends and holidays.');\">How is this calculated?</a>)"; } } // CONFIDENCE lblSummaryConfidence.Text = drSummary["confidence"].ToString(); //if (oDesign.IsOther(this.DesignId, 1, 0, 0) == true) // btnUnlock.Visible = true; btnUnlock.Attributes.Add("onclick", "return OpenWindow('DESIGN_UNLOCK','" + this.DesignId.ToString() + "')"); /* * if (drSummary["answerid"].ToString() == "") * lblSummaryAnswerID.Text = "N / A"; * else * lblSummaryAnswerID.Text = "<a href=\"javascript:void(0);\" onclick=\"OpenNewWindow('/datapoint/service/design.aspx?t=design&q=" + oFunction.encryptQueryString(drSummary["answerid"].ToString()) + "',800,600);\">" + drSummary["answerid"].ToString() + "</a>"; */ if (this.ExceptionServiceFolder > 0) { this.ExceptionRadio.Visible = false; } if (this.ExceptionServiceFolder > 0 && oDesign.IsOther(this.DesignId, 0, 0, 1)) { this.ExceptionServiceFolderPanel.Visible = true; this.CompleteRadio.Enabled = false; } else { string strValidation = oDesign.GetValid(this.DesignId); if (strValidation != "") { // Invalid Design if (this.InvalidPanel != null) { this.InvalidPanel.Style["display"] = "inline"; } // Hide the Rejection screen (if shown) if (this.RejectPanel != null) { this.RejectPanel.Style["display"] = "none"; } if (this.Demo == false && this.CompleteRadio != null) { this.CompleteRadio.Text += " <i>(Incomplete)</i>"; this.CompleteRadio.Enabled = false; } if (this.ValidationLabel != null) { string[] strValidations = strValidation.Split(new char[] { ',' }); foreach (string strError in strValidations) { if (strError.Trim() != "") { if (this.ValidationLabel.Text != "") { this.ValidationLabel.Text += "<br/>"; } this.ValidationLabel.Text += " - " + strError.Trim(); } } } } else { btnUnlock.Visible = false; // Valid Design if (this.RejectPanel == null || this.RejectPanel.Style["display"] != "inline") { if (oDesign.IsOther(this.DesignId, 0, 0, 1) == true) { if (this.ExceptionPanel != null) { this.ExceptionPanel.Style["display"] = "inline"; } } else if (this.ValidPanel != null) { this.ValidPanel.Style["display"] = "inline"; } } // Check confidence and Date string strCanExecute = oDesign.CanExecute(this.DesignId); if (this.Demo == true) { if (strCanExecute != "") { this.InvalidPanel.Style["display"] = "inline"; } if (this.ValidationLabel != null) { this.ValidationLabel.Text = " - " + strCanExecute; } } else if (this.CompleteRadio != null) { if (strCanExecute != "") { this.CompleteRadio.Text += " <i>(" + strCanExecute + ")</i>"; } if (this.CompleteRadio.Text.Contains("<i>")) { this.CompleteRadio.Enabled = false; this.CompleteRadio.Checked = false; } } } if (this.Demo == true && InvalidPanel.Style["display"] == "inline") { ValidPanel.Style["display"] = "none"; CompleteRadio.Enabled = false; ScheduleRadio.Enabled = false; } } } } }
protected void Page_Load(object sender, EventArgs e) { intProfile = Int32.Parse(Request.Cookies["profileid"].Value); oForecast = new Forecast(intProfile, dsn); oPlatform = new Platforms(intProfile, dsn); oModel = new Models(intProfile, dsn); oModelsProperties = new ModelsProperties(intProfile, dsn); if (Request.QueryString["id"] != null && Request.QueryString["id"] != "") { intID = Int32.Parse(Request.QueryString["id"]); } if (intID > 0) { DataSet ds = oForecast.GetAnswer(intID); if (ds.Tables[0].Rows.Count > 0) { int intPlatform = Int32.Parse(ds.Tables[0].Rows[0]["platformid"].ToString()); int intQuantity = Int32.Parse(ds.Tables[0].Rows[0]["quantity"].ToString()); // Get Model int intModel = oForecast.GetModel(intID); int intParent = 0; if (intModel > 0) { panContinue.Visible = true; if (oModelsProperties.Get(intModel).Tables[0].Rows.Count > 0) { intParent = Int32.Parse(oModelsProperties.Get(intModel, "modelid")); } if (oModelsProperties.IsStorageDB_BootSANWindows(intModel) == true) { panBlade.Visible = true; lblQuantity.Text = intQuantity.ToString(); int intMinimumOS = intQuantity * intStoragePerBladeOs; int intMinimumApp = intQuantity * intStoragePerBladeApp; lblMinimumOS.Text = intMinimumOS.ToString(); lblMinimumApp.Text = intMinimumApp.ToString(); } string strPath = "/controls/sys/sys_default.ascx"; if (oModelsProperties.IsStorageDB_BootLocal(intModel) == true) { strPath = "/controls/fore/fore_storage_old.ascx"; } else if (oModelsProperties.IsStorageDB_BootSANWindows(intModel) == true) { strPath = "/controls/fore/fore_storage_new.ascx"; } else if (oModelsProperties.IsStorageDB_BootSANUnix(intModel) == true) { strPath = "/controls/fore/fore_storage_new_unix.ascx"; } else { Response.Write("MODEL: " + intModel.ToString()); } PHStorage.Controls.Add((UserControl)LoadControl(strPath)); } else { DataSet dsStorage = oForecast.GetStorage(intID); if (dsStorage.Tables[0].Rows.Count > 0) { panReset.Visible = true; btnReset.Attributes.Add("onclick", "return OpenWindow('RESET_STORAGE', '?id=" + intID.ToString() + "');"); } else { panStop.Visible = true; } } } } }
protected void Page_Load(object sender, EventArgs e) { intProfile = Int32.Parse(Request.Cookies["profileid"].Value); oDesign = new Design(intProfile, dsn); oUser = new Users(intProfile, dsn); oModelsProperties = new ModelsProperties(intProfile, dsn); oFunction = new Functions(intProfile, dsn, intEnvironment); if (Request.QueryString["id"] != null) { Int32.TryParse(Request.QueryString["id"], out intID); } if (intID > 0) { lblID.Text = intID.ToString(); DataSet dsSummary = oDesign.Get(intID); if (dsSummary.Tables[0].Rows.Count > 0) { DataRow drSummary = dsSummary.Tables[0].Rows[0]; Mnemonic oMnemonic = new Mnemonic(intProfile, dsn); CostCenter oCostCenter = new CostCenter(intProfile, dsn); OperatingSystems oOperatingSystem = new OperatingSystems(intProfile, dsn); Classes oClass = new Classes(intProfile, dsn); Environments oEnvironment = new Environments(intProfile, dsn); Locations oLocation = new Locations(intProfile, dsn); bool boolWeb = (drSummary["web"].ToString() == "1"); bool boolSQL = oDesign.IsSQL(intID); bool boolOracle = oDesign.IsOracle(intID); bool boolOtherDB = (drSummary["other_db"].ToString() == "1"); boolWindows = oDesign.IsWindows(intID); DataSet dsSubmitted = oDesign.GetSubmitted(intID); if (dsSubmitted.Tables[0].Rows.Count > 0) { int intUser = Int32.Parse(dsSubmitted.Tables[0].Rows[0]["userid"].ToString()); lblRequestedBy.Text = oUser.GetFullName(intUser) + " (" + oUser.GetName(intUser) + ")"; lblRequestedOn.Text = dsSubmitted.Tables[0].Rows[0]["created"].ToString(); if (dsSubmitted.Tables[0].Rows[0]["comments"].ToString() != "") { trException1.Visible = true; trException2.Visible = true; lblException.Text = dsSubmitted.Tables[0].Rows[0]["comments"].ToString(); } } else { lblRequestedBy.Text = oUser.GetFullName(intProfile) + " (" + oUser.GetName(intProfile) + ")"; lblRequestedOn.Text = dsSummary.Tables[0].Rows[0]["modified"].ToString(); } // Mnemonic int intMnemonic = 0; Int32.TryParse(drSummary["mnemonicid"].ToString(), out intMnemonic); if (intMnemonic > 0) { lblMnemonic.Text = oMnemonic.Get(intMnemonic, "factory_code") + " - " + oMnemonic.Get(intMnemonic, "name"); string strMnemonicCode = oMnemonic.Get(intMnemonic, "factory_code"); string strMnemonicStatus = oMnemonic.GetFeed(strMnemonicCode, MnemonicFeed.Status); if (strMnemonicStatus == "") { strMnemonicStatus = oMnemonic.Get(intMnemonic, "status"); } lblMnemonicStatus.Text = strMnemonicStatus; string strMnemonicRTO = oMnemonic.GetFeed(strMnemonicCode, MnemonicFeed.ResRating); if (strMnemonicRTO == "") { strMnemonicRTO = oMnemonic.Get(intMnemonic, "ResRating"); } lblMnemonicRTO.Text = strMnemonicRTO; } // Server Type if (oDesign.IsDatabase(intID) == false) { if (boolWeb) { lblServerType.Text = "Web"; } else { lblServerType.Text = "Application"; } } else { lblServerType.Text = "Database"; if (boolSQL || boolOracle || boolOtherDB) { string strDatabase = ""; if (boolSQL == true) { strDatabase = "SQL"; } if (boolOracle == true) { strDatabase = "Oracle"; } if (boolOtherDB == true) { strDatabase = "Other"; } lblServerType.Text += " (" + strDatabase + ")"; } if (boolWeb) { lblServerType.Text += " + Web"; } } // OS int intOS = 0; Int32.TryParse(drSummary["osid"].ToString(), out intOS); if (intOS > 0) { lblOS.Text = oOperatingSystem.Get(intOS, "name"); } // SIZE string strSize = drSummary["cores"].ToString() + " CPU(s), " + drSummary["ram"].ToString() + " GB(s) RAM"; lblSize.Text = strSize; // MAINFRAME if (drSummary["mainframe"].ToString() == "1") { lblMainframe.Text = "Yes"; } else if (drSummary["mainframe"].ToString() == "0") { lblMainframe.Text = "No"; } // SPECIAL lblSpecial.Text = drSummary["special"].ToString(); if (lblSpecial.Text == "") { lblSpecial.Text = "None"; } // HA if (drSummary["ha"].ToString() == "1") { if (drSummary["ha_clustering"].ToString() == "1") { lblHA.Text = "Clustering"; if (drSummary["active_passive"].ToString() == "1") { lblHA.Text += " (Active / Passive)"; } else if (drSummary["active_passive"].ToString() == "2") { lblHA.Text += " (Active / Active)"; } lblHA.Text += "<br/>" + drSummary["instances"].ToString() + " Instances"; //lblHA.Text += ", " + drSummary["nodes"].ToString() + " Nodes"; } else if (drSummary["ha_load_balancing"].ToString() == "1") { lblHA.Text = "Load Balancing"; if (drSummary["middleware"].ToString() == "1") { lblHA.Text += " (Middleware)"; } else if (boolWeb == true) { if (drSummary["application"].ToString() == "1") { lblHA.Text += " (Web + App)"; } else { lblHA.Text += " (Web)"; } } else { lblHA.Text += " (App)"; } } } else if (drSummary["ha"].ToString() == "0") { lblHA.Text = "No"; } // SOFTWARE if (drSummary["ndm"].ToString() == "1") { lblSoftware.Text += "ConnectDirect"; } if (drSummary["ca7"].ToString() == "1") { lblSoftware.Text += (lblSoftware.Text != "" ? "<br/>" : "") + "CA7"; } if (lblSoftware.Text == "") { lblSoftware.Text = "None"; } // Middlware DataSet dsSoftware = oDesign.GetSoftwareComponents(intID); foreach (DataRow drSoftware in dsSoftware.Tables[0].Rows) { // Loop through select components int intComponentID = Int32.Parse(drSoftware["componentid"].ToString()); int intResponse = Int32.Parse(drSoftware["responseid"].ToString()); lblMiddleware.Text += (lblMiddleware.Text != "" ? "<br/>" : "") + oDesign.GetResponse(intResponse, "response"); } if (lblMiddleware.Text == "") { lblMiddleware.Text = "None"; } // Legacy Design ID if (drSummary["answerid"].ToString() == "") { lblAnswerID.Text = "N / A"; } else { lblAnswerID.Text = "<a href=\"javascript:void(0);\" onclick=\"OpenNewWindow('/datapoint/service/design.aspx?t=design&q=" + oFunction.encryptQueryString(drSummary["answerid"].ToString()) + "',800,600);\">" + drSummary["answerid"].ToString() + "</a>"; } // Quantity int intQuantity = 0; Int32.TryParse(drSummary["quantity"].ToString(), out intQuantity); if (intQuantity > 0) { lblQuantity.Text = intQuantity.ToString(); } if (oDesign.IsProd(intID) == true && oDesign.IsUnder48(intID, true) == true) { lblQuantity.Text += " ( + " + intQuantity.ToString() + " for DR)"; } // DATE DateTime datDate = DateTime.Now; if (DateTime.TryParse(drSummary["commitment"].ToString(), out datDate) == true) { lblDate.Text = datDate.ToShortDateString(); } // CONFIDENCE lblConfidence.Text = drSummary["confidence"].ToString(); // LOCATION int intClass = 0; int intEnv = 0; int intAddress = 0; Int32.TryParse(drSummary["classid"].ToString(), out intClass); if (intClass > 0) { lblLocation.Text = oClass.Get(intClass, "name") + ", "; Int32.TryParse(drSummary["environmentid"].ToString(), out intEnv); if (intEnv > 0) { lblLocation.Text += oEnvironment.Get(intEnv, "name"); Int32.TryParse(drSummary["addressid"].ToString(), out intAddress); if (intAddress > 0) { lblLocation.Text += " at " + oLocation.GetFull(intAddress); } else { lblLocation.Text += " at <a href=\"javascript:void(0);\" onclick=\"alert('The datacenter will be either the Cleveland Data Center or the Summit Data Center.\\n\\nThis will be decided during execution. It is based on the available inventory at that time.');\">Cleveland or Summit Data Center</a>"; } } } // SOLUTION int intModel = oDesign.GetModelProperty(intID); lblSolution.Text = oModelsProperties.Get(intModel, "name"); // Server Boot Type if (oModelsProperties.IsVMwareVirtual(intModel)) { lblServerBootType.Text = "Virtual Hard Disk (VHD)"; } else if (oModelsProperties.IsStorageDB_BootLocal(intModel)) { lblServerBootType.Text = "Local Disk"; } else { lblServerBootType.Text = "SAN Disk"; } // ACCOUNTS rptAccounts.DataSource = oDesign.GetAccounts(intID); rptAccounts.DataBind(); foreach (RepeaterItem ri in rptAccounts.Items) { Label _permissions = (Label)ri.FindControl("lblPermissions"); switch (_permissions.Text) { case "0": _permissions.Text = "-----"; break; case "D": _permissions.Text = "Developer"; break; case "P": _permissions.Text = "Promoter"; break; case "S": _permissions.Text = "AppSupport"; break; case "U": _permissions.Text = "AppUsers"; break; } if (_permissions.ToolTip == "1") { _permissions.Text += " (R/D)"; } } lblNone.Visible = (rptAccounts.Items.Count == 0); // STORAGE if (drSummary["storage"].ToString() == "1") { if (drSummary["persistent"].ToString() == "1") { panStorage.Visible = true; int intPersistent = oDesign.GetStorageTotal(intID); if (intPersistent > 0) { lblStorage.Text = "Persistent, " + intPersistent.ToString() + " GB(s)"; } } else if (drSummary["persistent"].ToString() == "0") { int intNonPersistent = 0; Int32.TryParse(drSummary["non_persistent"].ToString(), out intNonPersistent); if (intNonPersistent > 0) { lblStorage.Text = "Non-Persistent, " + intNonPersistent.ToString() + " GB(s)"; } } else { panStorage.Visible = true; int intStorage = oDesign.GetStorageTotal(intID); if (intStorage > 0) { lblStorage.Text = intStorage.ToString() + " GB(s)"; } } } else if (drSummary["storage"].ToString() == "0") { lblStorage.Text = "No"; } // STORAGE LUNs rptStorage.DataSource = oDesign.GetStorageDrives(intID); rptStorage.DataBind(); foreach (RepeaterItem ri in rptStorage.Items) { CheckBox _shared = (CheckBox)ri.FindControl("chkStorageSize"); _shared.Checked = (_shared.Text == "1"); _shared.Text = ""; } if (boolWindows) { trStorageApp.Visible = true; DataSet dsApp = oDesign.GetStorageDrive(intID, -1000); if (dsApp.Tables[0].Rows.Count > 0) { int intTemp = 0; if (Int32.TryParse(dsApp.Tables[0].Rows[0]["size"].ToString(), out intTemp) == true) { txtStorageSizeE.Text = intTemp.ToString(); } } } if (oDesign.IsProd(intID) == true || oDesign.IsQA(intID) == true) { // BACKUP panBackup.Visible = true; lblFrequency.Text = (drSummary["backup_frequency"].ToString() == "D" ? "Daily" : (drSummary["backup_frequency"].ToString() == "W" ? "Weekly" : (drSummary["backup_frequency"].ToString() == "M" ? "Monthly" : "N / A"))); strBackup = new StringBuilder(); DataSet dsBackup = oDesign.GetBackup(intID); if (dsBackup.Tables[0].Rows.Count > 0) { DataRow drBackup = dsBackup.Tables[0].Rows[0]; for (int ii = 0; ii < 7; ii++) { strBackup.Append("<tr>"); strBackup.Append("<td>"); string strCheck = ""; if (ii == 0) { strBackup.Append("Sunday"); strCheck = drBackup["sun"].ToString(); } else if (ii == 1) { strBackup.Append("Monday"); strCheck = drBackup["mon"].ToString(); } else if (ii == 2) { strBackup.Append("Tuesday"); strCheck = drBackup["tue"].ToString(); } else if (ii == 3) { strBackup.Append("Wednesday"); strCheck = drBackup["wed"].ToString(); } else if (ii == 4) { strBackup.Append("Thursday"); strCheck = drBackup["thu"].ToString(); } else if (ii == 5) { strBackup.Append("Friday"); strCheck = drBackup["fri"].ToString(); } else { strBackup.Append("Saturday"); strCheck = drBackup["sat"].ToString(); } strBackup.Append("</td>"); for (int jj = 0; jj < 24; jj++) { strBackup.Append("<td>"); if (strCheck[jj] == '1') { strBackup.Append("<b>B</b>"); } else { strBackup.Append("-"); } strBackup.Append("</td>"); } strBackup.Append("</tr>"); } } // BACKUP EXCLUSIONS panExclusions.Visible = true; rptExclusions.DataSource = oDesign.GetExclusions(intID); rptExclusions.DataBind(); lblExclusion.Visible = (rptExclusions.Items.Count == 0); // MAINTENANCE WINDOW panMaintenance.Visible = true; strMaintenance = new StringBuilder(); DataSet dsMaintenance = oDesign.GetMaintenance(intID); if (dsMaintenance.Tables[0].Rows.Count > 0) { DataRow drMaintenance = dsMaintenance.Tables[0].Rows[0]; for (int ii = 0; ii < 7; ii++) { strMaintenance.Append("<tr>"); strMaintenance.Append("<td>"); string strCheck = ""; if (ii == 0) { strMaintenance.Append("Sunday"); strCheck = drMaintenance["sun"].ToString(); } else if (ii == 1) { strMaintenance.Append("Monday"); strCheck = drMaintenance["mon"].ToString(); } else if (ii == 2) { strMaintenance.Append("Tuesday"); strCheck = drMaintenance["tue"].ToString(); } else if (ii == 3) { strMaintenance.Append("Wednesday"); strCheck = drMaintenance["wed"].ToString(); } else if (ii == 4) { strMaintenance.Append("Thursday"); strCheck = drMaintenance["thu"].ToString(); } else if (ii == 5) { strMaintenance.Append("Friday"); strCheck = drMaintenance["fri"].ToString(); } else { strMaintenance.Append("Saturday"); strCheck = drMaintenance["sat"].ToString(); } strMaintenance.Append("</td>"); for (int jj = 0; jj < 24; jj++) { strMaintenance.Append("<td>"); if (strCheck[jj] == '1') { strMaintenance.Append("<b>M</b>"); } else { strMaintenance.Append("-"); } strMaintenance.Append("</td>"); } strMaintenance.Append("</tr>"); } } } else { lblHA.Text = "N / A"; lblMainframe.Text = "N / A"; } // APPROVALS rptWorkflow.DataSource = oDesign.LoadWorkflow(intID); rptWorkflow.DataBind(); lblWorkflow.Visible = (rptWorkflow.Items.Count == 0); } } }