private void LoopRepeater() { DataSet ds = oSolaris.GetBuildNetworks(0); DataView dv = ds.Tables[0].DefaultView; if (Request.QueryString["sort"] != null) { dv.Sort = Request.QueryString["sort"].ToString(); } rptView.DataSource = dv; rptView.DataBind(); foreach (RepeaterItem ri in rptView.Items) { ImageButton oDelete = (ImageButton)ri.FindControl("btnDelete"); oDelete.Attributes.Add("onClick", "return confirm('Are you sure you want to delete this item?');"); ImageButton oEnable = (ImageButton)ri.FindControl("btnEnable"); if (oEnable.ImageUrl == "/admin/images/enabled.gif") { oEnable.ToolTip = "Click to disable"; oEnable.Attributes.Add("onClick", "return confirm('Are you sure you want to disable this item?');"); } else { oEnable.ToolTip = "Click to enable"; } } }
public void LoadLists() { Classes oClasses = new Classes(intProfile, dsn); ddlClass.DataValueField = "id"; ddlClass.DataTextField = "name"; ddlClass.DataSource = oClasses.Gets(1); ddlClass.DataBind(); ddlClass.Items.Insert(0, new ListItem("-- SELECT --", "0")); int intAddress = 0; if (Request.QueryString["aid"] != null && Request.QueryString["aid"] != "") { intAddress = Int32.Parse(Request.QueryString["aid"]); } Locations oLocation = new Locations(intProfile, dsn); //ddlLocation.DataValueField = "id"; //ddlLocation.DataTextField = "fullname"; //if (intAddress == 0) // ddlLocation.DataSource = oLocation.GetAddressCommon(); //else // ddlLocation.DataSource = oLocation.GetAddresss(1); //ddlLocation.DataBind(); //ddlLocation.SelectedValue = intAddress.ToString(); //if (intAddress == 0) // ddlLocation.Items.Add(new ListItem("-- NOT LISTED --", "-1")); //ddlLocation.Items.Insert(0, new ListItem("-- SELECT --", "0")); //Rooms oRooms = new Rooms(intProfile, dsn); //ddlRoom.DataValueField = "id"; //ddlRoom.DataTextField = "name"; //ddlRoom.DataSource = oRooms.Gets(1); //ddlRoom.DataBind(); //ddlRoom.Items.Insert(0, new ListItem("-- SELECT --", "0")); //Racks oRacks = new Racks(intProfile, dsn); //ddlRack.DataValueField = "id"; //ddlRack.DataTextField = "name"; //ddlRack.DataSource = oRacks.Gets(1); //ddlRack.DataBind(); //ddlRack.Items.Insert(0, new ListItem("-- SELECT --", "0")); ddlBuildNetwork.DataValueField = "id"; ddlBuildNetwork.DataTextField = "name"; ddlBuildNetwork.DataSource = oSolaris.GetBuildNetworks(1); ddlBuildNetwork.DataBind(); ddlBuildNetwork.Items.Insert(0, new ListItem("-- SELECT --", "0")); ddlResiliency.DataValueField = "id"; ddlResiliency.DataTextField = "name"; ddlResiliency.DataSource = oResiliency.Gets(1); ddlResiliency.DataBind(); ddlResiliency.Items.Insert(0, new ListItem("-- SELECT --", "0")); ddlOperatingSystemGroup.DataValueField = "id"; ddlOperatingSystemGroup.DataTextField = "name"; ddlOperatingSystemGroup.DataSource = oOperatingSystem.GetGroups(1); ddlOperatingSystemGroup.DataBind(); ddlOperatingSystemGroup.Items.Insert(0, new ListItem("-- SELECT --", "0")); }
private void LoadList() { //Class ddlClass.DataTextField = "name"; ddlClass.DataValueField = "id"; ddlClass.DataSource = oClass.Gets(1); ddlClass.DataBind(); ddlClass.Items.Insert(0, new ListItem("-- SELECT --", "0")); //Enclosure ddlEnclosure.DataTextField = "name"; ddlEnclosure.DataValueField = "id"; ddlEnclosure.DataSource = oAsset.GetEnclosures((int)AssetStatus.InUse); ddlEnclosure.DataBind(); ddlEnclosure.Items.Insert(0, new ListItem("-- SELECT --", "0")); //Build Network ddlBuildNetwork.DataValueField = "id"; ddlBuildNetwork.DataTextField = "name"; ddlBuildNetwork.DataSource = oSolaris.GetBuildNetworks(1); ddlBuildNetwork.DataBind(); ddlBuildNetwork.Items.Insert(0, new ListItem("-- SELECT --", "0")); //Resiliency ddlResiliency.DataValueField = "id"; ddlResiliency.DataTextField = "name"; ddlResiliency.DataSource = oResiliency.Gets(1); ddlResiliency.DataBind(); ddlResiliency.Items.Insert(0, new ListItem("-- SELECT --", "0")); //Operating System Group ddlOperatingSystemGroup.DataValueField = "id"; ddlOperatingSystemGroup.DataTextField = "name"; ddlOperatingSystemGroup.DataSource = oOperatingSystem.GetGroups(1); ddlOperatingSystemGroup.DataBind(); ddlOperatingSystemGroup.Items.Insert(0, new ListItem("-- ANY --", "0")); }
protected void Page_Load(object sender, EventArgs e) { AuthenticateUser(); if (Request.Cookies["profileid"] != null && Request.Cookies["profileid"].Value != "") { intProfile = Int32.Parse(Request.Cookies["profileid"].Value); } if (Request.QueryString["applicationid"] != null && Request.QueryString["applicationid"] != "") { intApplication = Int32.Parse(Request.QueryString["applicationid"]); } if (Request.Cookies["application"] != null && Request.Cookies["application"].Value != "") { intApplication = Int32.Parse(Request.Cookies["application"].Value); } oDataPoint = new DataPoint(intProfile, dsn); oUser = new Users(intProfile, dsn); oServer = new Servers(intProfile, dsn); oAsset = new Asset(intProfile, dsnAsset); oForecast = new Forecast(intProfile, dsn); oPlatform = new Platforms(intProfile, dsn); oType = new Types(intProfile, dsn); oModel = new Models(intProfile, dsn); oModelsProperties = new ModelsProperties(intProfile, dsn); oIPAddresses = new IPAddresses(intProfile, dsnIP, dsn); oFunction = new Functions(intProfile, dsn, intEnvironment); oOperatingSystem = new OperatingSystems(intProfile, dsn); oServicePack = new ServicePacks(intProfile, dsn); oClass = new Classes(intProfile, dsn); oEnvironment = new Environments(intProfile, dsn); oResiliency = new Resiliency(intProfile, dsn); oSolaris = new Solaris(intProfile, dsn); oStatusList = new StatusLevels(intProfile, dsn); if (oUser.IsAdmin(intProfile) == true || (oDataPoint.GetPagePermission(intApplication, "ASSET") == true || intDataPointAvailableAsset == 1)) { panAllow.Visible = true; if (Request.QueryString["save"] != null) { panSave.Visible = true; } if (Request.QueryString["error"] != null) { panError.Visible = true; } if (Request.QueryString["close"] != null) { Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "close", "<script type=\"text/javascript\">window.close();<" + "/" + "script>"); } else if (Request.QueryString["id"] != null && Request.QueryString["id"] != "") { string strID = oFunction.decryptQueryString(Request.QueryString["id"]); DataSet ds = oDataPoint.GetAsset(Int32.Parse(strID)); if (ds.Tables[0].Rows.Count == 1) { // Load General Information intAsset = Int32.Parse(ds.Tables[0].Rows[0]["id"].ToString()); lblAssetID.Text = "#" + intAsset.ToString(); string strSerial = ds.Tables[0].Rows[0]["serial"].ToString(); string strAsset = ds.Tables[0].Rows[0]["asset"].ToString(); string strHeader = (strSerial.Length > 15 ? strSerial.Substring(0, 15) + "..." : strSerial); lblHeader.Text = """ + strHeader.ToUpper() + """; Master.Page.Title = "DataPoint | Physical Deploy (" + strHeader + ")"; lblHeaderSub.Text = "Complete the following information to deploy a physical server..."; int intMenuTab = 0; if (Request.QueryString["menu_tab"] != null && Request.QueryString["menu_tab"] != "") { intMenuTab = Int32.Parse(Request.QueryString["menu_tab"]); } Tab oTab = new Tab(hdnTab.ClientID, intMenuTab, "divMenu1", true, false); oTab.AddTab("Asset Information", ""); oTab.AddTab("Location Information", ""); oTab.AddTab("World Wide Port Names", ""); oTab.AddTab("Resource Dependencies", ""); oTab.AddTab("Provisioning History", ""); strMenuTab1 = oTab.GetTabs(); if (oUser.IsAdmin(intProfile) == true || oDataPoint.GetFieldPermission(intProfile, "SERVER_ADMIN") == true) { panOldLocationInfo.Visible = true; } if (!IsPostBack) { LoadList(); // Asset Information oDataPoint.LoadTextBox(txtPlatformSerial, intProfile, null, "", lblPlatformSerial, fldPlatformSerial, "PHYSICAL_SERIAL", strSerial, "", false, true); oDataPoint.LoadTextBox(txtPlatformAsset, intProfile, null, "", lblPlatformAsset, fldPlatformAsset, "PHYSICAL_ASSET", strAsset, "", false, true); int intAssetAttribute = Int32.Parse(oAsset.Get(intAsset, "asset_attribute")); oDataPoint.LoadDropDown(ddlAssetAttribute, intProfile, null, "", lblAssetAttribute, fldAssetAttribute, "ASSET_ATTRIBUTE", "Name", "AttributeId", oAsset.getAssetAttributes(null, "", 1), intAssetAttribute, true, false, false); oDataPoint.LoadTextBox(txtAssetAttributeComment, intProfile, null, "", lblAssetAttributeComment, fldAssetAttributeComment, "ASSET_ATTRIBUTE_COMMENT", oAsset.getAssetAttributesComments(intAsset), "", false, true); ddlAssetAttribute.Attributes.Add("onclick", "return SetControlsForAssetAttributes()"); ddlPlatform.Attributes.Add("onchange", "PopulatePlatformTypes('" + ddlPlatform.ClientID + "','" + ddlPlatformType.ClientID + "','" + ddlPlatformModel.ClientID + "','" + ddlPlatformModelProperty.ClientID + "');ResetDropDownHidden('" + hdnModel.ClientID + "');"); ddlPlatformType.Attributes.Add("onchange", "PopulatePlatformModels('" + ddlPlatformType.ClientID + "','" + ddlPlatformModel.ClientID + "','" + ddlPlatformModelProperty.ClientID + "');ResetDropDownHidden('" + hdnModel.ClientID + "');"); ddlPlatformModel.Attributes.Add("onchange", "PopulatePlatformModelProperties('" + ddlPlatformModel.ClientID + "','" + ddlPlatformModelProperty.ClientID + "');ResetDropDownHidden('" + hdnModel.ClientID + "');"); ddlPlatformModelProperty.Attributes.Add("onchange", "UpdateDropDownHidden('" + ddlPlatformModelProperty.ClientID + "','" + hdnModel.ClientID + "');"); int intModel = Int32.Parse(oAsset.Get(intAsset, "modelid")); int intParent = Int32.Parse(oModelsProperties.Get(intModel, "modelid")); if (oDataPoint.GetDeployModel(intProfile, intParent) == false && oUser.IsAdmin(intProfile) == false) { panAllow.Visible = false; panDenied.Visible = true; } hdnModel.Value = intModel.ToString(); int intModelParent = Int32.Parse(oModelsProperties.Get(intModel, "modelid")); int intType = oModel.GetType(intModelParent); int intPlatform = oType.GetPlatform(intType); oDataPoint.LoadDropDown(ddlPlatform, intProfile, null, "", lblPlatform, fldPlatform, "PHYSICAL_PLATFORM", "name", "platformid", oPlatform.Gets(1), intPlatform, false, false, true); oDataPoint.LoadDropDown(ddlPlatformType, intProfile, null, "", lblPlatformType, fldPlatformType, "PHYSICAL_TYPE", "name", "id", oType.Gets(intPlatform, 1), intType, false, false, true); oDataPoint.LoadDropDown(ddlPlatformModel, intProfile, null, "", lblPlatformModel, fldPlatformModel, "PHYSICAL_MODEL", "name", "id", oModel.Gets(intType, 1), intModelParent, false, false, true); oDataPoint.LoadDropDown(ddlPlatformModelProperty, intProfile, null, "", lblPlatformModelProperty, fldPlatformModelProperty, "PHYSICAL_MODEL_PROP", "name", "id", oModelsProperties.GetModels(0, intModelParent, 1), intModel, false, false, true); // Get Asset DataSet dsAsset = oAsset.GetServerOrBlade(intAsset); if (dsAsset.Tables[0].Rows.Count > 0) { Response.Redirect("/datapoint/asset/physical.aspx?t=serial&q=" + oFunction.encryptQueryString(strSerial) + "&id=" + oFunction.encryptQueryString(intAsset.ToString()) + "&r=0"); } oDataPoint.LoadDropDown(ddlPlatformClass, intProfile, null, "", lblPlatformClass, fldPlatformClass, "PHYSICAL_CLASS", "name", "id", oClass.Gets(1), 0, false, false, true); oDataPoint.LoadDropDown(ddlPlatformEnvironment, intProfile, null, "", lblPlatformEnvironment, fldPlatformEnvironment, "PHYSICAL_ENVIRONMENT", "name", "id", oClass.GetEnvironment(0, 0), 0, false, false, true); oDataPoint.LoadTextBox(txtPlatformILO, intProfile, null, "", lblPlatformILO, fldPlatformILO, "PHYSICAL_ILO", "", "", false, true); oDataPoint.LoadTextBox(txtPlatformDummy, intProfile, null, "", lblPlatformDummy, fldPlatformDummy, "PHYSICAL_DUMMY", "", "", false, true); oDataPoint.LoadTextBox(txtPlatformMAC, intProfile, null, "", lblPlatformMAC, fldPlatformMAC, "PHYSICAL_MAC", "", "", false, true); oDataPoint.LoadTextBox(txtPlatformVLAN, intProfile, null, "", lblPlatformVLAN, fldPlatformVLAN, "PHYSICAL_VLAN", "", "", false, true); oDataPoint.LoadDropDown(ddlPlatformBuildNetwork, intProfile, null, "", lblPlatformBuildNetwork, fldPlatformBuildNetwork, "PHYSICAL_BUILD_NETWORK", "name", "id", oSolaris.GetBuildNetworks(1), 0, false, false, false); oDataPoint.LoadDropDown(ddlPlatformResiliency, intProfile, null, "", lblPlatformResiliency, fldPlatformResiliency, "PHYSICAL_RESILIENCY", "name", "id", oResiliency.Gets(1), 0, false, false, true); oDataPoint.LoadDropDown(ddlPlatformOperatingSystemGroup, intProfile, null, "", lblPlatformOperatingSystemGroup, fldPlatformOperatingSystemGroup, "PHYSICAL_OS_GROUP", "name", "id", oOperatingSystem.GetGroups(1), 0, false, false, false); if (dsAsset.Tables[0].Rows.Count > 0) { lblOldlocation.Text = dsAsset.Tables[0].Rows[0]["OldLocation"].ToString(); lblOldRoom.Text = dsAsset.Tables[0].Rows[0]["OldRoom"].ToString(); lblOldRack.Text = dsAsset.Tables[0].Rows[0]["OldRack"].ToString(); txtLocation.Text = dsAsset.Tables[0].Rows[0]["Location"].ToString(); txtRoom.Text = dsAsset.Tables[0].Rows[0]["Room"].ToString(); txtZone.Text = dsAsset.Tables[0].Rows[0]["Zone"].ToString(); txtRack.Text = dsAsset.Tables[0].Rows[0]["Rack"].ToString(); txtRackPosition.Text = dsAsset.Tables[0].Rows[0]["Rackposition"].ToString(); oDataPoint.LoadTextBox(txtRackPosition, intProfile, null, "", lblRackPositionValue, fldLocation, "CHANGE_LOCATION", dsAsset.Tables[0].Rows[0]["rackposition"].ToString(), "", false, true); hdnRackId.Value = dsAsset.Tables[0].Rows[0]["RackId"].ToString(); } oDataPoint.LoadButton(btnSelectLocation, intProfile, fldLocation, "CHANGE_LOCATION", "return LoadLocationRoomRack('" + "rack" + "','" + hdnRackId.ClientID + "', '" + txtLocation.ClientID + "','" + txtRoom.ClientID + "','" + txtZone.ClientID + "','" + txtRack.ClientID + "');"); ddlPlatformStatus.SelectedValue = oAsset.GetStatus(intAsset, "status"); // Resource Dependencies AssetOrder oAssetOrder = new AssetOrder(0, dsn, dsnAsset, intEnvironment); Services oService = new Services(0, dsn); ServiceRequests oServiceRequest = new ServiceRequests(0, dsn); rptServiceRequests.DataSource = oAssetOrder.GetByAsset(intAsset, false); rptServiceRequests.DataBind(); trServiceRequests.Visible = (rptServiceRequests.Items.Count == 0); foreach (RepeaterItem ri in rptServiceRequests.Items) { Label lblServiceID = (Label)ri.FindControl("lblServiceID"); int intService = Int32.Parse(lblServiceID.Text); Label lblDetails = (Label)ri.FindControl("lblDetails"); Label lblProgress = (Label)ri.FindControl("lblProgress"); if (lblProgress.Text == "") { lblProgress.Text = "<i>Unavailable</i>"; } else { int intResource = Int32.Parse(lblProgress.Text); double dblAllocated = 0.00; double dblUsed = 0.00; int intStatus = 0; bool boolAssigned = false; DataSet dsResource = oDataPoint.GetServiceRequestResource(intResource); if (dsResource.Tables[0].Rows.Count > 0) { Int32.TryParse(dsResource.Tables[0].Rows[0]["status"].ToString(), out intStatus); } foreach (DataRow drResource in dsResource.Tables[1].Rows) { boolAssigned = true; dblAllocated += double.Parse(drResource["allocated"].ToString()); dblUsed += double.Parse(drResource["used"].ToString()); intStatus = Int32.Parse(drResource["status"].ToString()); } if (intStatus == (int)ResourceRequestStatus.Closed) { lblProgress.Text = oServiceRequest.GetStatusBar(100.00, "100", "12", true); } else if (intStatus == (int)ResourceRequestStatus.Cancelled) { lblProgress.Text = "Cancelled"; } else if (boolAssigned == false) { string strManager = ""; DataSet dsManager = oService.GetUser(intService, 1); // Managers foreach (DataRow drManager in dsManager.Tables[0].Rows) { if (strManager != "") { strManager += "\\n"; } int intManager = Int32.Parse(drManager["userid"].ToString()); strManager += " - " + oUser.GetFullName(intManager) + " [" + oUser.GetName(intManager) + "]"; } lblProgress.Text = "<a href=\"javascript:void(0);\" class=\"lookup\" onclick=\"alert('This request is pending assignment by the following...\\n\\n" + strManager + "');\">Pending Assignment</a>"; } else if (dblAllocated > 0.00) { lblProgress.Text = oServiceRequest.GetStatusBar((dblUsed / dblAllocated) * 100.00, "100", "12", true); } else { lblProgress.Text = "<i>N / A</i>"; } lblDetails.Text = "<a href=\"javascript:void(0);\" class=\"lookup\" onclick=\"OpenNewWindowMenu('/datapoint/service/resource.aspx?id=" + oFunction.encryptQueryString(intResource.ToString()) + "', '800', '600');\">" + lblDetails.Text + "</a>"; } } // Provioning History rptHistory.DataSource = oAsset.GetProvisioningHistory(intAsset); rptHistory.DataBind(); lblHistory.Visible = (rptHistory.Items.Count == 0); // WWW rptWWW.DataSource = oAsset.GetHBA(intAsset); rptWWW.DataBind(); lblWWW.Visible = (rptWWW.Items.Count == 0); oDataPoint.LoadButton(btnWWW, intProfile, fldWWW, "PHYSICAL_WWW", "return OpenWindow('ASSET_DEPLOY_HBAs','" + intAsset.ToString() + "');"); } } else { if (Request.QueryString["t"] != null && Request.QueryString["q"] != null) { Response.Redirect("/datapoint/asset/datapoint_asset_search.aspx?t=" + Request.QueryString["t"] + "&q=" + Request.QueryString["q"] + "&r=0"); } else { Response.Redirect("/datapoint/asset/datapoint_asset_search.aspx"); } } } else { Response.Redirect("/datapoint/asset/datapoint_asset_search.aspx"); } btnClose.Attributes.Add("onclick", "window.close();return false;"); btnPrint.Attributes.Add("onclick", "window.print();return false;"); btnDeploy.Attributes.Add("onclick", oDataPoint.LoadValidation()); ddlPlatformClass.Attributes.Add("onchange", "PopulateEnvironments('" + ddlPlatformClass.ClientID + "','" + ddlPlatformEnvironment.ClientID + "',0);"); ddlPlatformEnvironment.Attributes.Add("onchange", "UpdateDropDownHidden('" + ddlPlatformEnvironment.ClientID + "','" + hdnEnvironment.ClientID + "');"); } else { panDenied.Visible = true; } }
private void LoadList() { string strBind = ""; if (lblType.Text == "PLAT") { ds = oPlatform.Gets(1); lstOrder.DataValueField = "platformid"; } if (lblType.Text == "ORG") { ds = oOrganization.Gets(1); lstOrder.DataValueField = "organizationid"; } if (lblType.Text == "COST") { ds = oCost.Gets(1); lstOrder.DataValueField = "costid"; } if (lblType.Text == "AT") { ds = oUserAt.Gets(1); lstOrder.DataValueField = "atid"; } if (lblType.Text == "ITEMS") { ds = oRequestItem.GetItems(Int32.Parse(lblId.Text), 0, 1); lstOrder.DataValueField = "itemid"; } if (lblType.Text == "SERVICEDETAIL") { ds = oServiceDetail.Gets(Int32.Parse(lblId.Text), 1); lstOrder.DataValueField = "id"; } if (lblType.Text == "SERVICES") { int intFolder = Int32.Parse(oService.GetFolders(Int32.Parse(lblId.Text), "folderid")); ds = oService.Gets(intFolder, 1, 1, 1, 0); lstOrder.DataValueField = "id"; } if (lblType.Text == "SERVICE_FOLDERS") { ds = oService.GetFolders(Int32.Parse(lblId.Text), 1); lstOrder.DataValueField = "id"; } if (lblType.Text == "REPORTS") { ds = oReport.Gets(Int32.Parse(lblId.Text), 1); lstOrder.DataValueField = "reportid"; strBind = "title"; } if (lblType.Text == "A_SITE") { ds = oSites.Gets(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "A_TYPE") { ds = oType.Gets(Int32.Parse(lblId.Text), 1); lstOrder.DataValueField = "id"; } if (lblType.Text == "A_MODEL") { ds = oModel.Gets(Int32.Parse(lblId.Text), 1); lstOrder.DataValueField = "id"; } if (lblType.Text == "A_LOCATION_S") { ds = oDepot.Gets(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "A_SHELF") { ds = oShelf.Gets(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "A_RACK") { ds = oRacks.Gets(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "CLASS") { ds = oClasses.Gets(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "A_ROOM") { ds = oRooms.Gets(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "A_FLOOR") { ds = oFloor.Gets(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "ENVIRONMENT") { ds = oEnvironment.Gets(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "S_CODE") { ds = oSolution.GetCodes(1); lstOrder.DataValueField = "id"; strBind = "code"; } if (lblType.Text == "F_QUESTION") { ds = oForecast.GetQuestions(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "F_RESPONSE") { ds = oForecast.GetResponses(Int32.Parse(lblId.Text), 1); lstOrder.DataValueField = "id"; } if (lblType.Text == "F_LINE_ITEMS") { ds = oForecast.GetLineItems(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "CONFIDENCE") { ds = oConfidence.Gets(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "LOCATION_S") { ds = oLocation.GetStates(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "F_STEPS") { ds = oForecast.GetSteps(Int32.Parse(lblId.Text), 1); lstOrder.DataValueField = "id"; } if (lblType.Text == "F_STEPS_ADD") { ds = oForecast.GetStepAdditionals(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "FIELD") { ds = oField.Gets(Int32.Parse(lblId.Text), 1); lstOrder.DataValueField = "id"; strBind = "fieldname"; } if (lblType.Text == "DOMAIN_CONTROLLER") { ds = oDomainController.Gets(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "DOMAIN") { ds = oDomain.Gets(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "SERVERNAME_A") { ds = oServerName.GetApplications(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "SERVERNAME_SUBA") { ds = oServerName.GetSubApplications(Int32.Parse(lblId.Text), 1); lstOrder.DataValueField = "id"; } if (lblType.Text == "SERVERNAME_C") { ds = oServerName.GetComponents(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "WORKSTATION_C") { ds = oWorkstation.GetComponents(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "OPERATING_SYSTEM") { ds = oOperatingSystems.Gets(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "OD_W_STEPS") { ds = oOnDemand.GetWizardSteps(Int32.Parse(lblId.Text), 1); lstOrder.DataValueField = "id"; } if (lblType.Text == "OD_STEPS") { ds = oOnDemand.GetSteps(Int32.Parse(lblId.Text), 1); lstOrder.DataValueField = "id"; } if (lblType.Text == "SERVICE_PACK") { ds = oServicePack.Gets(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "COMPONENT_SCRIPTS") { ds = oServerName.GetComponentDetailScripts(Int32.Parse(lblId.Text), 1); lstOrder.DataValueField = "id"; } if (lblType.Text == "HOST") { ds = oHost.Gets(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "VIRTUAL_HDD") { ds = oVirtualHDD.Gets(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "VIRTUAL_RAM") { ds = oVirtualRam.Gets(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "RESTART") { ds = oRestart.Gets(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "SEGMENT") { ds = oSegment.Gets(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "DOMAIN_SUFFIX") { ds = oDomain.GetSuffixs(Int32.Parse(lblId.Text), 1); lstOrder.DataValueField = "id"; } if (lblType.Text == "DOMAIN_ADMIN_GROUP") { ds = oDomain.GetAdminGroups(Int32.Parse(lblId.Text), 1); lstOrder.DataValueField = "id"; } if (lblType.Text == "SERVICE_EDITOR_FIELDS") { ds = oServiceEditor.GetFields(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "PROJECT_REQUEST_QUESTION") { ds = oProjectRequest.GetQuestions(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "PROJECT_REQUEST_RESPONSE") { ds = oProjectRequest.GetResponses(Int32.Parse(lblId.Text), 1); lstOrder.DataValueField = "id"; } if (lblType.Text == "PROJECT_REQUEST_CLASS") { ds = oProjectRequest.GetClasses(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "VMWARE_TEMPLATE") { ds = oVMWare.GetTemplates(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "ORDER_REPORT_DATASOURCE") { ds = oReport.GetDataSources(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "ORDER_REPORT_CHARTS") { ds = oReport.GetCharts(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "PLATFORM_FORM") { ds = oPlatform.GetForms(Int32.Parse(lblId.Text), 1); lstOrder.DataValueField = "id"; } //if (lblType.Text == "NEW") //{ // ds = oNew.Gets(1); // lstOrder.DataValueField = "id"; // strBind = "title"; //} if (lblType.Text == "WHATSNEW") { ds = oWhatsNew.Gets(1); lstOrder.DataValueField = "id"; strBind = "title"; } //if (lblType.Text == "RECOVERY_LOCATIONS") //{ // ds = oRecoveryLocations.Gets(1); // lstOrder.DataValueField = "id"; //} if (lblType.Text == "MAINTENANCE_WINDOW") { ds = oMaintenanceWindow.Gets(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "TSM") { ds = oTSM.Gets(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "TSM_DOMAINS") { ds = oTSM.GetDomains(Int32.Parse(lblId.Text), 1); lstOrder.DataValueField = "id"; } if (lblType.Text == "TSM_SCHEDULES") { ds = oTSM.GetSchedules(Int32.Parse(lblId.Text), 1); lstOrder.DataValueField = "id"; } if (lblType.Text == "DNS") { ds = oDNS.Gets(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "SOLARIS_BUILD_NETWORKS") { ds = oSolaris.GetBuildNetworks(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "SOLARIS_BUILD_TYPES") { ds = oSolaris.GetBuildTypes(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "SOLARIS_INTERFACES") { ds = oSolaris.GetInterfaces(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "ZEUS_ARRAY_CONFIGS") { ds = oZeus.GetArrayConfigs(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "ZEUS_BUILD_TYPES") { ds = oZeus.GetBuildTypes(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "ERROR_TYPES") { ds = oError.GetTypes(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "ERROR_TYPES_TYPES") { ds = oError.GetTypeTypes(Int32.Parse(lblId.Text), 1); lstOrder.DataValueField = "id"; } if (lblType.Text == "D_PHASES") { ds = oDesign.GetPhases(1); strBind = "title"; lstOrder.DataValueField = "id"; } if (lblType.Text == "D_QUESTIONS") { ds = oDesign.GetQuestions(Int32.Parse(lblId.Text), 1); strBind = "summary"; lstOrder.DataValueField = "id"; } if (lblType.Text == "D_RESPONSES") { ds = oDesign.GetResponses(Int32.Parse(lblId.Text), 0, 1); strBind = "admin"; lstOrder.DataValueField = "id"; } if (lblType.Text == "D_MODELS") { ds = oDesign.GetModels(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "RESILIENCY") { ds = oResiliency.Gets(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "ENHANCEMENT_MODULES") { ds = oEnhancement.GetModules(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "OPERATING_SYSTEM_GROUPS") { ds = oOperatingSystems.GetGroups(1); lstOrder.DataValueField = "id"; } if (lblType.Text == "DESIGN_APPROVE_CONDITION") { ds = oDesign.GetApprovalConditionals(1); lstOrder.DataValueField = "id"; } if (strBind == "") { strBind = "name"; } lstOrder.DataTextField = strBind; lstOrder.DataSource = ds; lstOrder.DataBind(); }