private void LoopRepeater() { panView.Visible = true; DataSet ds = oEnhancement.GetModules(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"; } } }
protected void Page_Load(object sender, EventArgs e) { intProfile = Int32.Parse(Request.Cookies["profileid"].Value); oProjectRequest = new ProjectRequest(intProfile, dsn); oResourceRequest = new ResourceRequest(intProfile, dsn); oProjectNumber = new ProjectNumber(intProfile, dsn); oPage = new Pages(intProfile, dsn); oUser = new Users(intProfile, dsn); oRequestItem = new RequestItems(intProfile, dsn); oApplication = new Applications(intProfile, dsn); oRequest = new Requests(intProfile, dsn); oVariable = new Variables(intEnvironment); oService = new Services(intProfile, dsn); oDelegate = new Delegates(intProfile, dsn); oStatusLevel = new StatusLevels(); oEnhancement = new Enhancements(intProfile, dsn); oLog = new Log(intProfile, dsn); oFunction = new Functions(intProfile, dsn, intEnvironment); if (Request.QueryString["pageid"] != null && Request.QueryString["pageid"] != "") { intPage = Int32.Parse(Request.QueryString["pageid"]); } if (Request.QueryString["action"] != null && Request.QueryString["action"] != "") { panFinish.Visible = true; } else { 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); } if (!IsPostBack) { if (Request.QueryString["rrid"] != null && Request.QueryString["rrid"] != "") { lblResourceParent.Text = Request.QueryString["rrid"]; int intResourceParent = Int32.Parse(lblResourceParent.Text); ds = oResourceRequest.Get(intResourceParent); if (ds.Tables[0].Rows.Count > 0) { int intItem = Int32.Parse(ds.Tables[0].Rows[0]["itemid"].ToString()); int intService = Int32.Parse(ds.Tables[0].Rows[0]["serviceid"].ToString()); int intNumber = Int32.Parse(ds.Tables[0].Rows[0]["number"].ToString()); int intRequest = Int32.Parse(ds.Tables[0].Rows[0]["requestid"].ToString()); Forecast oForecast = new Forecast(intProfile, dsn); if (intService == intStorageService) { try { OnDemandTasks oOnDemandTask = new OnDemandTasks(0, dsn); Locations oLocation = new Locations(0, dsn); DataSet dsDesign = oOnDemandTask.GetServerStorage(intRequest, intItem, intNumber); if (dsDesign.Tables[0].Rows.Count == 1) { int intAnswer = Int32.Parse(dsDesign.Tables[0].Rows[0]["answerid"].ToString()); int intAddress = Int32.Parse(oForecast.GetAnswer(intAnswer, "addressid")); lblLocation.Text = oLocation.GetFull(intAddress); panLocation.Visible = true; } } catch { } } int intProject = Int32.Parse(oRequest.Get(intRequest, "projectid")); int intApp = oRequestItem.GetItemApplication(intItem); int intForecast = 0; DataSet dsForecast = oForecast.GetProject(intProject); if (dsForecast.Tables[0].Rows.Count > 0) { intForecast = Int32.Parse(dsForecast.Tables[0].Rows[0]["id"].ToString()); } if (intForecast > 0) { btnView.Attributes.Add("oncontextmenu", "return OpenWindow('NEW_WINDOW','" + oPage.GetFullLink(intDesignBuilder) + "?id=" + intForecast.ToString() + "');"); } else { btnView.Attributes.Add("oncontextmenu", "alert('There is no design for this project');return false;"); } if (ds.Tables[0].Rows[0]["solo"].ToString() == "0") { btnView.Attributes.Add("onclick", "return OpenWindow('PRINTER_FRIENDLY','?page=" + intViewRequest.ToString() + "&rid=" + intRequest.ToString() + "');"); btnView.Text = "Click here to view the project details"; lblType.Text = "Project Request"; } else { btnView.Attributes.Add("onclick", "return OpenWindow('PRINTER_FRIENDLY','?page=" + intViewResourceRequest.ToString() + "&rrid=" + intResourceParent.ToString() + "');"); if (oApplication.Get(intApp, "tpm") == "1") { btnView.Text = "Click here to view the project details"; } else { btnView.Text = "Click here to view this request"; } lblType.Text = "Service Request"; } btnAssignments.Attributes.Add("onclick", "return OpenWindow('PRINTER_FRIENDLY','?page=" + intSearchPage.ToString() + "&pid=" + intProject + "&aid=" + intApp.ToString() + "&sort=userid');"); //btnAssignments.Attributes.Add("onclick", "return OpenNewWindowMenu('/datapoint/projects/datapoint_projects.aspx?id=" + oFunction.encryptQueryString(intProject.ToString()) + "', '800', '600');"); lblItem.Text = intItem.ToString(); lblService.Text = oService.GetName(intService); if (oApplication.Get(intApp, "request_items") == "1") { lblGroup.Text = oApplication.GetName(intApp) + " | " + oRequestItem.GetItemName(intItem); } else { lblGroup.Text = oApplication.GetName(intApp); } int intUser = Int32.Parse(oRequest.Get(intRequest, "userid")); int intAppManager = oApplication.GetManager(intApp); if (ds.Tables[0].Rows[0]["accepted"].ToString() == "-1" && oApplication.Get(intApp, "tpm") == "1") { if (intUser == intProfile || oDelegate.Get(intUser, intProfile) > 0) { panRequest.Visible = true; panAssignSingle.Visible = true; txtHours.Text = double.Parse(ds.Tables[0].Rows[0]["allocated"].ToString()).ToString("F"); panHours.Visible = !(oApplication.Get(intApp, "tpm") == "1"); txtHours.Enabled = (oService.Get(intService, "disable_hours") == "1" ? false : true); lblQuantity.Text = ds.Tables[0].Rows[0]["devices"].ToString(); lblStatus.Text = oStatusLevel.HTML(Int32.Parse(ds.Tables[0].Rows[0]["status"].ToString())); panQuantity.Visible = (lblQuantity.Text != "0"); txtQuantity.Text = lblQuantity.Text; txtQuantity.Enabled = (txtQuantity.Text != "0"); txtQuantity.Enabled = false; lblAssign.Text = oUser.GetFullName(intProfile); strSummary = oResourceRequest.GetBodyOverallFix(intResourceParent, 0, intEnvironment, false); } else { Response.Write("no rights"); panDenied.Visible = true; } btnSubmit.Attributes.Add("onclick", "return ValidateNumber0('" + txtHours.ClientID + "','Please enter a valid number for the hours allocated') && ValidateHidden('" + hdnManager.ClientID + "','" + txtManager.ClientID + "','Please enter a valid LAN ID') && ProcessButton(this);"); } else { string strValidate = ""; if (oUser.IsAdmin(intProfile) || oService.IsManager(intService, intProfile) || (oApplication.IsManager(intApp, intProfile) && oApplication.Get(intApp, "disable_manager") != "1")) { panRequest.Visible = true; panAssignMultiple.Visible = true; btnSubmit.Enabled = (ds.Tables[0].Rows[0]["assigned"].ToString() == ""); if (ds.Tables[0].Rows[0]["status"].ToString() == "5") { radHold.Checked = true; divChoice.Style["display"] = "inline"; divHold.Style["display"] = "inline"; txtHold.Text = ds.Tables[0].Rows[0]["reason"].ToString(); } else { divChoice.Style["display"] = (ds.Tables[0].Rows[0]["accepted"].ToString() == "0" ? "inline" : "none"); divAccept.Style["display"] = (ds.Tables[0].Rows[0]["accepted"].ToString() == "1" ? "inline" : "none"); } int intEnhancementService = 0; Int32.TryParse(ConfigurationManager.AppSettings["HELP_ENHANCEMENT_SERVICEID"], out intEnhancementService); if (intService == intEnhancementService) { panEnhancement.Visible = true; ddlModule.DataTextField = "name"; ddlModule.DataValueField = "id"; ddlModule.DataSource = oEnhancement.GetModules(1); ddlModule.DataBind(); ddlModule.Items.Insert(0, new ListItem("-- SELECT --", "0")); strValidate += "ValidateDropDown('" + ddlModule.ClientID + "','Select a classification') && "; radEnhancementShort.Checked = true; radEnhancementReject.Attributes.Add("onclick", "ShowHideDiv('" + trEnhancementReject.ClientID + "','inline');ShowHideDiv('" + trEnhancementClassification.ClientID + "','none');ShowHideDiv('" + divAccept.ClientID + "','none');"); radEnhancementDuplicate.Attributes.Add("onclick", "ShowHideDiv('" + trEnhancementReject.ClientID + "','inline');ShowHideDiv('" + trEnhancementClassification.ClientID + "','none');ShowHideDiv('" + divAccept.ClientID + "','none');"); radEnhancementShort.Attributes.Add("onclick", "ShowHideDiv('" + trEnhancementReject.ClientID + "','none');ShowHideDiv('" + trEnhancementClassification.ClientID + "','inline');ShowHideDiv('" + divAccept.ClientID + "','inline');"); radEnhancementLong.Attributes.Add("onclick", "ShowHideDiv('" + trEnhancementReject.ClientID + "','inline');ShowHideDiv('" + trEnhancementClassification.ClientID + "','inline');ShowHideDiv('" + divAccept.ClientID + "','inline');"); } panDelete.Visible = (intItem == intImplementorDistributed || intItem == intImplementorMidrange); btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this request');"); txtHours.Text = double.Parse(ds.Tables[0].Rows[0]["allocated"].ToString()).ToString("F"); panHours.Visible = !(oApplication.Get(intApp, "tpm") == "1"); txtHours.Enabled = (oService.Get(intService, "disable_hours") == "1" ? false : true); lblQuantity.Text = ds.Tables[0].Rows[0]["devices"].ToString(); panQuantity.Visible = (lblQuantity.Text != "0"); txtQuantity.Text = lblQuantity.Text; txtQuantity.Enabled = (txtQuantity.Text != "0"); txtQuantity.Enabled = false; lblStatus.Text = oStatusLevel.HTML(Int32.Parse(ds.Tables[0].Rows[0]["status"].ToString())); trAssigned.Visible = !(btnSubmit.Enabled); string strAssign = ""; DataSet dsManager = oService.GetUser(intService, 1); foreach (DataRow drManager in dsManager.Tables[0].Rows) { if (strAssign != "") { strAssign += ", "; } strAssign += oUser.GetFullName(Int32.Parse(drManager["userid"].ToString())); } lblAssign.Text = strAssign; DataSet dsReports = oUser.GetManagerReports(intAppManager, intRequest, intService, intNumber); DataTable dtReports = dsReports.Tables[0].Copy(); dtReports.Clear(); DataSet dsAssignment = oService.GetUser(intService, -100); foreach (DataRow drAssignment in dsAssignment.Tables[0].Rows) { int intAssignment = Int32.Parse(drAssignment["userid"].ToString()); DataSet dsAssignees = oUser.GetManagerReports(intAssignment, intRequest, intService, intNumber); foreach (DataRow drAssignee in dsAssignees.Tables[0].Rows) { dtReports.ImportRow(drAssignee); } } if (dtReports.Rows.Count > 0) { // Use custom assignment list // First, remove duplicates Hashtable hTable = new Hashtable(); ArrayList duplicateList = new ArrayList(); foreach (DataRow drow in dtReports.Rows) { if (hTable.Contains(drow["userid"])) { duplicateList.Add(drow); } else { hTable.Add(drow["userid"], string.Empty); } } foreach (DataRow dRow in duplicateList) { dtReports.Rows.Remove(dRow); } // Next, sort by username dtReports.DefaultView.Sort = "username"; // Now add to dataset dsReports = new DataSet(); dsReports.Tables.Add(dtReports.DefaultView.ToTable()); } LoadList(dsReports, intApp); LoadAvailable(dsReports, intApp); strSummary = oResourceRequest.GetBodyOverallFix(intResourceParent, 0, intEnvironment, false); } else { Response.Write("no delegate"); panDenied.Visible = true; } btnSubmit.Attributes.Add("onclick", "return " + strValidate + "ValidateChoice('" + divChoice.ClientID + "','" + radAccept.ClientID + "','" + radReject.ClientID + "','" + radHold.ClientID + "','" + ddlUser.ClientID + "','" + txtHours.ClientID + "') && ProcessButton(this);"); } } else { panDenied.Visible = true; } } else { panDenied.Visible = true; } } } btnClose.Attributes.Add("onclick", "return CloseWindow();"); lnkAvailable.Attributes.Add("onclick", "return ShowHideAvailable('" + divAvailable.ClientID + "');"); radAccept.Attributes.Add("onclick", "ShowHideDiv('" + divAccept.ClientID + "','inline');ShowHideDiv('" + divReject.ClientID + "','none');ShowHideDiv('" + divHold.ClientID + "','none');"); radReject.Attributes.Add("onclick", "ShowHideDiv('" + divReject.ClientID + "','inline');ShowHideDiv('" + divAccept.ClientID + "','none');ShowHideDiv('" + divHold.ClientID + "','none');"); radHold.Attributes.Add("onclick", "ShowHideDiv('" + divHold.ClientID + "','inline');ShowHideDiv('" + divAccept.ClientID + "','none');ShowHideDiv('" + divReject.ClientID + "','none');"); 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();"); }
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(); }