private void LoadLists()
        {
            //Menu
            int intMenuTab = 0;

            if (Request.QueryString["menu_tab"] != null && Request.QueryString["menu_tab"] != "")
            {
                intMenuTab = Int32.Parse(Request.QueryString["menu_tab"]);
            }
            Tab oTab = new Tab(hdnType.ClientID, intMenuTab, "divMenu1", true, false);

            //End Menu

            ddlPlatform.DataValueField = "platformid";
            ddlPlatform.DataTextField  = "name";
            ddlPlatform.DataSource     = oPlatform.GetAssets(1);
            ddlPlatform.DataBind();
            ddlPlatform.Items.Insert(0, new ListItem("-- SELECT --", "0"));
            ddlPlatformDepot.DataValueField = "platformid";
            ddlPlatformDepot.DataTextField  = "name";
            ddlPlatformDepot.DataSource     = oPlatform.GetAssets(1);
            ddlPlatformDepot.DataBind();
            ddlPlatformDepot.Items.Insert(0, new ListItem("-- SELECT --", "0"));
            ddlPlatformClass.DataValueField = "platformid";
            ddlPlatformClass.DataTextField  = "name";
            ddlPlatformClass.DataSource     = oPlatform.GetAssets(1);
            ddlPlatformClass.DataBind();
            ddlPlatformClass.Items.Insert(0, new ListItem("-- SELECT --", "0"));
            int intPlatform = 0;

            if (Request.QueryString["pid"] != null && Request.QueryString["pid"] != "")
            {
                intPlatform = Int32.Parse(Request.QueryString["pid"]);
            }
            if (oPlatform.Get(intPlatform).Tables[0].Rows.Count > 0)
            {
                ddlPlatform.SelectedValue      = intPlatform.ToString();
                ddlPlatformDepot.SelectedValue = intPlatform.ToString();
                ddlPlatformClass.SelectedValue = intPlatform.ToString();
                // Types
                ddlTypes.DataValueField = "id";
                ddlTypes.DataTextField  = "name";
                ddlTypes.DataSource     = oType.Gets(intPlatform, 1);
                ddlTypes.DataBind();
                ddlTypes.Items.Insert(0, new ListItem("-- ALL --", "0"));
                // Classes
                ddlClass.DataValueField = "id";
                ddlClass.DataTextField  = "name";
                ddlClass.DataSource     = oClasses.Gets(1);
                ddlClass.DataBind();
                ddlClass.Items.Insert(0, new ListItem("-- SELECT --", "0"));
                int intClass = 0;
                if (Request.QueryString["cid"] != null && Request.QueryString["cid"] != "")
                {
                    intClass = Int32.Parse(Request.QueryString["cid"]);
                }
                if (oClasses.Get(intClass).Tables[0].Rows.Count > 0)
                {
                    ddlClass.SelectedValue        = intClass.ToString();
                    ddlEnvironment.DataValueField = "id";
                    ddlEnvironment.DataTextField  = "name";
                    ddlEnvironment.DataSource     = oClasses.GetEnvironment(intClass, 0);
                    ddlEnvironment.DataBind();
                    ddlEnvironment.Items.Insert(0, new ListItem("-- ALL --", "0"));
                }
                else
                {
                    ddlEnvironment.Items.Insert(0, new ListItem("-- SELECT --", "0"));
                    ddlEnvironment.Enabled = false;
                }
                // Depot
                ddlDepot.DataValueField = "id";
                ddlDepot.DataTextField  = "name";
                ddlDepot.DataSource     = oDepot.Gets(1);
                ddlDepot.DataBind();
                ddlDepot.Items.Insert(0, new ListItem("-- SELECT --", "0"));
                int intType = 0;
                if (Request.QueryString["tid"] != null && Request.QueryString["tid"] != "")
                {
                    intType = Int32.Parse(Request.QueryString["tid"]);
                }
                if (oType.Get(intType).Tables[0].Rows.Count > 0)
                {
                    ddlTypes.SelectedValue  = intType.ToString();
                    ddlModel.DataValueField = "id";
                    ddlModel.DataTextField  = "name";
                    ddlModel.DataSource     = oModel.Gets(intType, 1);
                    ddlModel.DataBind();
                    ddlModel.Items.Insert(0, new ListItem("-- ALL --", "0"));
                }
                else
                {
                    ddlModel.Items.Insert(0, new ListItem("-- ALL --", "0"));
                    ddlModel.Enabled = false;
                }
            }
            else
            {
                ddlTypes.Items.Insert(0, new ListItem("-- SELECT --", "0"));
                ddlTypes.Enabled = false;
                ddlModel.Items.Insert(0, new ListItem("-- SELECT --", "0"));
                ddlModel.Enabled = false;
                ddlDepot.Items.Insert(0, new ListItem("-- SELECT --", "0"));
                ddlDepot.Enabled = false;
                ddlClass.Items.Insert(0, new ListItem("-- SELECT --", "0"));
                ddlClass.Enabled = false;
                ddlEnvironment.Items.Insert(0, new ListItem("-- SELECT --", "0"));
                ddlEnvironment.Enabled = false;
            }

            //if (boolClass == false && boolType == false && boolDepot == false)
            //{
            //    boolName = true;
            //    hdnType.Value = "N";
            //strMenuTab1 += "<td><img src=\"/images/TabOnLeftCap.gif\"></td><td nowrap background=\"/images/TabOnBackground.gif\"><a href=\"javascript:void(0);\" onclick=\"ChangeTab(this,'divTab1','" + hdnType.ClientID + "','N',true);\" class=\"tabheader\">Search By Name / Serial / Asset</a></td><td><img src=\"/images/TabOnRightCap.gif\"></td>";
            //strMenuTab1 += "<td><img src=\"/images/TabOffLeftCap.gif\"></td><td nowrap background=\"/images/TabOffBackground.gif\"><a href=\"javascript:void(0);\" onclick=\"ChangeTab(this,'divTab2','" + hdnType.ClientID + "','C',true);\" class=\"tabheader\">Search By Class / Environment</a></td><td><img src=\"/images/TabOffRightCap.gif\"></td>";
            //strMenuTab1 += "<td><img src=\"/images/TabOffLeftCap.gif\"></td><td nowrap background=\"/images/TabOffBackground.gif\"><a href=\"javascript:void(0);\" onclick=\"ChangeTab(this,'divTab3','" + hdnType.ClientID + "','T',true);\" class=\"tabheader\">Search By Type / Model</a></td><td><img src=\"/images/TabOffRightCap.gif\"></td>";
            //strMenuTab1 += "<td><img src=\"/images/TabOffLeftCap.gif\"></td><td nowrap background=\"/images/TabOffBackground.gif\"><a href=\"javascript:void(0);\" onclick=\"ChangeTab(this,'divTab4','" + hdnType.ClientID + "','D',true);\" class=\"tabheader\">Search By Depot</a></td><td><img src=\"/images/TabOffRightCap.gif\"></td>";
            oTab.AddTab("Search By Name / Serial / Asset", "");
            oTab.AddTab("Search By Class / Environment", "");
            oTab.AddTab("Search By Type / Model", "");
            oTab.AddTab("Search By Depot", "");

            //}
            //else
            //{
            //    //strMenuTab1 += "<td><img src=\"/images/TabOffLeftCap.gif\"></td><td nowrap background=\"/images/TabOffBackground.gif\"><a href=\"javascript:void(0);\" onclick=\"ChangeTab(this,'divTab1','" + hdnType.ClientID + "','N',true);\" class=\"tabheader\">Search By Name / Serial / Asset</a></td><td><img src=\"/images/TabOffRightCap.gif\"></td>";
            //    oTab.AddTab("Search By Name / Serial / Asset", "");
            //    if (boolClass == true)
            //        //strMenuTab1 += "<td><img src=\"/images/TabOnLeftCap.gif\"></td><td nowrap background=\"/images/TabOnBackground.gif\"><a href=\"javascript:void(0);\" onclick=\"ChangeTab(this,'divTab2','" + hdnType.ClientID + "','C',true);\" class=\"tabheader\">Search By Class / Environment</a></td><td><img src=\"/images/TabOnRightCap.gif\"></td>";
            //        oTab.AddTab("Search By Class / Environment", "");
            //    else
            //        //strMenuTab1 += "<td><img src=\"/images/TabOffLeftCap.gif\"></td><td nowrap background=\"/images/TabOffBackground.gif\"><a href=\"javascript:void(0);\" onclick=\"ChangeTab(this,'divTab2','" + hdnType.ClientID + "','C',true);\" class=\"tabheader\">Search By Class / Environment</a></td><td><img src=\"/images/TabOffRightCap.gif\"></td>";
            //        oTab.AddTab("Search By Class / Environment", "");
            //    if (boolType == true)
            //        //strMenuTab1 += "<td><img src=\"/images/TabOnLeftCap.gif\"></td><td nowrap background=\"/images/TabOnBackground.gif\"><a href=\"javascript:void(0);\" onclick=\"ChangeTab(this,'divTab3','" + hdnType.ClientID + "','T',true);\" class=\"tabheader\">Search By Type / Model</a></td><td><img src=\"/images/TabOnRightCap.gif\"></td>";
            //        oTab.AddTab("Search By Type / Model", "");
            //    else
            //        //strMenuTab1 += "<td><img src=\"/images/TabOffLeftCap.gif\"></td><td nowrap background=\"/images/TabOffBackground.gif\"><a href=\"javascript:void(0);\" onclick=\"ChangeTab(this,'divTab3','" + hdnType.ClientID + "','T',true);\" class=\"tabheader\">Search By Type / Model</a></td><td><img src=\"/images/TabOffRightCap.gif\"></td>";
            //        oTab.AddTab("Search By Type / Model", "");
            //    if (boolDepot == true)
            //        //strMenuTab1 += "<td><img src=\"/images/TabOnLeftCap.gif\"></td><td nowrap background=\"/images/TabOnBackground.gif\"><a href=\"javascript:void(0);\" onclick=\"ChangeTab(this,'divTab4','" + hdnType.ClientID + "','D',true);\" class=\"tabheader\">Search By Depot</a></td><td><img src=\"/images/TabOnRightCap.gif\"></td>";
            //         oTab.AddTab("Search By Depot", "");
            //    else
            //        //strMenuTab1 += "<td><img src=\"/images/TabOffLeftCap.gif\"></td><td nowrap background=\"/images/TabOffBackground.gif\"><a href=\"javascript:void(0);\" onclick=\"ChangeTab(this,'divTab4','" + hdnType.ClientID + "','D',true);\" class=\"tabheader\">Search By Depot</a></td><td><img src=\"/images/TabOffRightCap.gif\"></td>";
            //        oTab.AddTab("Search By Depot", "");
            //}
            strMenuTab1 = oTab.GetTabs();
        }
Exemple #2
0
        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();
        }