private void LoopRepeater() { DataSet ds = oDNS.Gets(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 DNS type?');"); ImageButton oEnable = (ImageButton)ri.FindControl("btnEnable"); if (oEnable.ImageUrl == "images/enabled.gif") { oEnable.ToolTip = "Click to disable"; oEnable.Attributes.Add("onClick", "return confirm('Are you sure you want to disable this DNS type?');"); } else { oEnable.ToolTip = "Click to enable"; } } }
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(); }
protected void Page_Load(object sender, EventArgs e) { intProfile = Int32.Parse(Request.Cookies["profileid"].Value); oPage = new Pages(intProfile, dsn); oRequestItem = new RequestItems(intProfile, dsn); oRequest = new Requests(intProfile, dsn); oServer = new Servers(intProfile, dsn); oClass = new Classes(intProfile, dsn); oApplication = new Applications(intProfile, dsn); oForecast = new Forecast(intProfile, dsn); oFunction = new Functions(intProfile, dsn, intEnvironment); oUser = new Users(intProfile, dsn); oDNS = new DNS(intProfile, dsn); Variables oVariableUser = new Variables(intEnvironment); if (intEnvironment < 3) { intEnvironment = 3; } oVariable = new Variables(intEnvironment); strDomain = "." + oVariable.DNS_Domain(); oSetting = new Settings(0, dsn); boolDNS_QIP = oSetting.IsDNS_QIP(); boolDNS_Bluecat = oSetting.IsDNS_Bluecat(); trQIP.Visible = boolDNS_QIP; if (Request.QueryString["applicationid"] != null && Request.QueryString["applicationid"] != "") { intApplication = Int32.Parse(Request.QueryString["applicationid"]); } if (Request.QueryString["pageid"] != null && Request.QueryString["pageid"] != "") { intPage = Int32.Parse(Request.QueryString["pageid"]); } if (Request.Cookies["application"] != null && Request.Cookies["application"].Value != "") { intApplication = Int32.Parse(Request.Cookies["application"].Value); } if (Request.QueryString["rid"] != "" && Request.QueryString["rid"] != null) { int intRequest = Int32.Parse(Request.QueryString["rid"]); LoadValues(); int intItem = Int32.Parse(lblItem.Text); int intNumber = Int32.Parse(lblNumber.Text); int intApp = oRequestItem.GetItemApplication(intItem); string strDeliverable = oApplication.Get(intApp, "deliverables_doc"); if (strDeliverable != "") { panDeliverable.Visible = true; btnDeliverable.Attributes.Add("onclick", "return OpenWindow('NEW_WINDOW','" + strDeliverable + "');"); } if (!IsPostBack) { ddlType.DataValueField = "id"; ddlType.DataTextField = "name"; ddlType.DataSource = oDNS.Gets(1); ddlType.DataBind(); ddlType.Items.Insert(0, new ListItem("-- SELECT --", "0")); } DataSet ds = oDNS.GetDNS(intRequest, intItem, intNumber); if (ds.Tables[0].Rows.Count > 0) { if (!IsPostBack) { LoadServer(ds.Tables[0].Rows[0]); } } else { panSearch.Visible = true; btnReset.Enabled = false; btnConfirm.Visible = false; btnNext.Visible = false; } string strQIP = ""; if (trQIP.Visible == true) { strQIP = "&& ValidateDropDown('" + ddlType.ClientID + "','Please select an object type')"; } btnContinue.Attributes.Add("onclick", "return ValidateText('" + txtName.ClientID + "','Please enter a device name')" + strQIP + " && ValidateNumberBetween('" + txtIP1.ClientID + "',1,255,'Please enter a valid IP Address')" + " && ValidateNumberBetween('" + txtIP2.ClientID + "',1,255,'Please enter a valid IP Address')" + " && ValidateNumberBetween('" + txtIP3.ClientID + "',1,255,'Please enter a valid IP Address')" + " && ValidateNumberBetween('" + txtIP4.ClientID + "',1,255,'Please enter a valid IP Address')" + " && ProcessButton(this)" + ";"); btnReset.Attributes.Add("onclick", "return ProcessButton(this)" + ";"); } txtName.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('" + btnContinue.ClientID + "').click();return false;}} else {return true}; "); txtIP1.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('" + btnContinue.ClientID + "').click();return false;}} else {return true}; "); txtIP2.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('" + btnContinue.ClientID + "').click();return false;}} else {return true}; "); txtIP3.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('" + btnContinue.ClientID + "').click();return false;}} else {return true}; "); txtIP4.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('" + btnContinue.ClientID + "').click();return false;}} else {return true}; "); txtAlias.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('" + btnAdd.ClientID + "').click();return false;}} else {return true}; "); btnCancel1.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this service request?');"); txtContact1.Attributes.Add("onkeyup", "return AJAXTextBoxGet(this,'300','195','" + divContact1.ClientID + "','" + lstContact1.ClientID + "','" + hdnContact1.ClientID + "','" + oVariableUser.URL() + "/frame/users.aspx',2);"); lstContact1.Attributes.Add("ondblclick", "AJAXClickRow();"); txtContact2.Attributes.Add("onkeyup", "return AJAXTextBoxGet(this,'300','195','" + divContact2.ClientID + "','" + lstContact2.ClientID + "','" + hdnContact2.ClientID + "','" + oVariableUser.URL() + "/frame/users.aspx',2);"); lstContact2.Attributes.Add("ondblclick", "AJAXClickRow();"); }