Esempio n. 1
0
 private void LoadLists()
 {
     ddlConfidence.DataValueField = "id";
     ddlConfidence.DataTextField  = "name";
     ddlConfidence.DataSource     = oConfidence.Gets(1);
     ddlConfidence.DataBind();
 }
        private void LoadList()
        {
            DataSet dsStatus = SqlHelper.ExecuteDataset(dsn, CommandType.Text, oStatusLevel.RequestStatusList());

            ddlReqStatus.DataTextField  = "name";
            ddlReqStatus.DataValueField = "id";
            ddlReqStatus.DataSource     = dsStatus;
            ddlReqStatus.DataBind();
            ddlReqStatus.Items.Insert(0, new ListItem("--All--", "-100"));


            DataSet dsApp = oApplications.Gets(1);

            ddlReqAssingmentGrp.DataTextField  = "name";
            ddlReqAssingmentGrp.DataValueField = "applicationid";
            ddlReqAssingmentGrp.DataSource     = dsApp;
            ddlReqAssingmentGrp.DataBind();
            ddlReqAssingmentGrp.Items.Insert(0, new ListItem("--All--", "0"));

            ddlDesignStatus.Items.Insert(0, new ListItem("--All--", "-100"));
            ddlDesignStatus.Items.Insert(1, new ListItem("Design", "0"));
            ddlDesignStatus.Items.Insert(2, new ListItem("Executed", "1"));
            ddlDesignStatus.Items.Insert(3, new ListItem("QA", "2"));
            ddlDesignStatus.Items.Insert(4, new ListItem("Completed", "3"));
            ddlDesignStatus.Items.Insert(5, new ListItem("Deleted", "-10"));

            DataSet dsConfidence = oConfidence.Gets(1);

            ddlDesignConfidenceLevel.DataTextField  = "name";
            ddlDesignConfidenceLevel.DataValueField = "id";
            ddlDesignConfidenceLevel.DataSource     = dsConfidence;
            ddlDesignConfidenceLevel.DataBind();
            ddlDesignConfidenceLevel.Items.Insert(0, new ListItem("--All--", "-1"));
        }
Esempio n. 3
0
        private void LoopRepeater()
        {
            DataSet  ds = oConfidence.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 item?');");
                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 item?');");
                }
                else
                {
                    oEnable.ToolTip = "Click to enable";
                }
            }
        }
Esempio n. 4
0
        public void LoadLists(int _platformid)
        {
            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"));
            ddlHost.DataTextField  = "name";
            ddlHost.DataValueField = "id";
            ddlHost.DataSource     = oHost.Gets(_platformid, 1);
            ddlHost.DataBind();
            ddlHost.Items.Insert(0, new ListItem("-- SELECT --", "0"));
            ddlClass.DataTextField  = "name";
            ddlClass.DataValueField = "id";
            ddlClass.DataSource     = oClass.Gets(1);
            ddlClass.DataBind();
            ddlClass.Items.Insert(0, new ListItem("-- SELECT --", "0"));
            MaintenanceWindow oMaintenanceWindow = new MaintenanceWindow(intProfile, dsn);

            ddlMaintenance.DataTextField  = "name";
            ddlMaintenance.DataValueField = "id";
            ddlMaintenance.DataSource     = oMaintenanceWindow.Gets(1);
            ddlMaintenance.DataBind();
            ddlMaintenance.Items.Insert(0, new ListItem("-- SELECT --", "0"));
            ddlConfidence.DataValueField = "id";
            ddlConfidence.DataTextField  = "name";
            ddlConfidence.DataSource     = oConfidence.Gets(1);
            ddlConfidence.DataBind();
        }
Esempio n. 5
0
        protected void LoadLists()
        {
            Projects oProject = new Projects(intProfile, dsn);

            lstProjects.DataValueField = "projectid";
            lstProjects.DataTextField  = "name";
            lstProjects.DataSource     = oProject.GetActive();
            lstProjects.DataBind();
            lstProjects.Items.Insert(0, new ListItem("-- ALL --", "0"));

            //Locations oLocation = new Locations(intProfile, dsn);
            lstLocations.DataValueField = "id";
            lstLocations.DataTextField  = "fullname";
            lstLocations.DataSource     = oLocation.GetAddresssOrdered(1);
            lstLocations.DataBind();
            lstLocations.Items.Insert(0, new ListItem("-- ALL --", "0"));

            Confidence oConfidence = new Confidence(intProfile, dsn);

            lstConfidences.DataValueField = "id";
            lstConfidences.DataTextField  = "name";
            lstConfidences.DataSource     = oConfidence.Gets(1);
            lstConfidences.DataBind();
            lstConfidences.Items.Insert(0, new ListItem("-- ALL --", "0"));

            Classes oClass    = new Classes(intProfile, dsn);
            DataSet dsClasses = oClass.Gets(1);

            lstClasses.DataValueField = "id";
            lstClasses.DataTextField  = "name";
            lstClasses.DataSource     = dsClasses;
            lstClasses.DataBind();
            lstClasses.Items.Insert(0, new ListItem("-- ALL --", "0"));


            lstEnvironments.Items.Insert(0, new ListItem("-- Please select a Class --", "0"));
            lstEnvironments.Enabled = false;


            for (int i = 1; i <= 4; i++)
            {
                DropDownList ddl = this.FindControl("ddlGroup" + i.ToString()) as System.Web.UI.WebControls.DropDownList;
                ddl.Items.Insert(0, new ListItem("Confidence", "ConfidenceId"));
                ddl.Items.Insert(0, new ListItem("Environment", "EnvironmentId"));
                ddl.Items.Insert(0, new ListItem("Class", "ClassId"));
                ddl.Items.Insert(0, new ListItem("Project", "ProjectId"));
                ddl.Items.Insert(0, new ListItem("-- NONE --", "0"));
            }
        }
Esempio n. 6
0
        private string ShowGroup(int _platformid, DataTable _demand, int _group_num, string _existing_filters)
        {
            string strGroup = "";
            string strQuery = Request.QueryString["g" + _group_num.ToString()];

            _group_num = _group_num + 1;
            object oNext = Request.QueryString["g" + _group_num.ToString()];

            switch (strQuery)
            {
            case "pro":
                string strProject = LoadFilter("pid", "projectid");
                if (strProject.StartsWith(" AND ") == true)
                {
                    strProject = strProject.Substring(5);
                }
                Projects  oProject   = new Projects(intProfile, dsn);
                DataSet   dsProjects = oProject.GetActive();
                DataRow[] drProjects = dsProjects.Tables[0].Select(strProject);
                foreach (DataRow drProject in drProjects)
                {
                    int intID = Int32.Parse(drProject["projectid"].ToString());
                    intGroup++;
                    strGroup += "<tr><td><a href=\"javascript:void(0);\" onclick=\"ShowDetail('imgGroup_" + intGroup.ToString() + "','divGroup_" + intGroup.ToString() + "');\"><img id=\"imgGroup_" + intGroup.ToString() + "\" src=\"/images/biggerPlus.gif\" border=\"0\" align=\"absmiddle\" /></a></td><td width=\"100%\">" + oProject.Get(intID, "name") + "</td></tr>";
                    if (oNext == null || oNext.ToString() == "" || oNext.ToString() == "0")
                    {
                        strGroup += "<tr><td></td><td width=\"100%\" id=\"divGroup_" + intGroup.ToString() + "\" style=\"display:none\">" + LoadGroup(_platformid, _demand, _existing_filters + " AND projectid = " + drProject["projectid"].ToString()) + "</td></tr>";
                    }
                    else
                    {
                        strGroup += "<tr><td></td><td width=\"100%\" id=\"divGroup_" + intGroup.ToString() + "\" style=\"display:none\">" + ShowGroup(_platformid, _demand, _group_num, _existing_filters + " AND projectid = " + drProject["projectid"].ToString()) + "</td></tr>";
                    }
                }
                break;

            case "con":
                string strConfidence = LoadFilter("xid", "id");
                if (strConfidence.StartsWith(" AND ") == true)
                {
                    strConfidence = strConfidence.Substring(5);
                }
                Confidence oConfidence   = new Confidence(intProfile, dsn);
                DataSet    dsConfidences = oConfidence.Gets(1);
                DataRow[]  drConfidences = dsConfidences.Tables[0].Select(strConfidence);
                foreach (DataRow drConfidence in drConfidences)
                {
                    intGroup++;
                    strGroup += "<tr><td><a href=\"javascript:void(0);\" onclick=\"ShowDetail('imgGroup_" + intGroup.ToString() + "','divGroup_" + intGroup.ToString() + "');\"><img id=\"imgGroup_" + intGroup.ToString() + "\" src=\"/images/biggerPlus.gif\" border=\"0\" align=\"absmiddle\" /></a></td><td width=\"100%\">" + drConfidence["name"].ToString() + "</td></tr>";
                    if (oNext == null || oNext.ToString() == "" || oNext.ToString() == "0")
                    {
                        strGroup += "<tr><td></td><td width=\"100%\" id=\"divGroup_" + intGroup.ToString() + "\" style=\"display:none\">" + LoadGroup(_platformid, _demand, _existing_filters + " AND confidenceid = " + drConfidence["id"].ToString()) + "</td></tr>";
                    }
                    else
                    {
                        strGroup += "<tr><td></td><td width=\"100%\" id=\"divGroup_" + intGroup.ToString() + "\" style=\"display:none\">" + ShowGroup(_platformid, _demand, _group_num, _existing_filters + " AND confidenceid = " + drConfidence["id"].ToString()) + "</td></tr>";
                    }
                }
                break;

            case "loc":
                string strLocation = LoadFilter("lid", "id");
                if (strLocation.StartsWith(" AND ") == true)
                {
                    strLocation = strLocation.Substring(5);
                }
                Locations oLocation   = new Locations(intProfile, dsn);
                DataSet   dsLocations = oLocation.GetAddresss(1);
                DataRow[] drLocations = dsLocations.Tables[0].Select(strLocation);
                foreach (DataRow drLocation in drLocations)
                {
                    intGroup++;
                    strGroup += "<tr><td><a href=\"javascript:void(0);\" onclick=\"ShowDetail('imgGroup_" + intGroup.ToString() + "','divGroup_" + intGroup.ToString() + "');\"><img id=\"imgGroup_" + intGroup.ToString() + "\" src=\"/images/biggerPlus.gif\" border=\"0\" align=\"absmiddle\" /></a></td><td width=\"100%\">" + drLocation["fullname"].ToString() + "</td></tr>";
                    if (oNext == null || oNext.ToString() == "" || oNext.ToString() == "0")
                    {
                        strGroup += "<tr><td></td><td width=\"100%\" id=\"divGroup_" + intGroup.ToString() + "\" style=\"display:none\">" + LoadGroup(_platformid, _demand, _existing_filters + " AND addressid = " + drLocation["id"].ToString()) + "</td></tr>";
                    }
                    else
                    {
                        strGroup += "<tr><td></td><td width=\"100%\" id=\"divGroup_" + intGroup.ToString() + "\" style=\"display:none\">" + ShowGroup(_platformid, _demand, _group_num, _existing_filters + " AND addressid = " + drLocation["id"].ToString()) + "</td></tr>";
                    }
                }
                break;

            case "cla":
                string strClass = LoadFilter("cid", "id");
                if (strClass.StartsWith(" AND ") == true)
                {
                    strClass = strClass.Substring(5);
                }
                Classes   oClass    = new Classes(intProfile, dsn);
                DataSet   dsClasses = oClass.Gets(1);
                DataRow[] drClasses = dsClasses.Tables[0].Select(strClass);
                foreach (DataRow drClass in drClasses)
                {
                    intGroup++;
                    strGroup += "<tr><td><a href=\"javascript:void(0);\" onclick=\"ShowDetail('imgGroup_" + intGroup.ToString() + "','divGroup_" + intGroup.ToString() + "');\"><img id=\"imgGroup_" + intGroup.ToString() + "\" src=\"/images/biggerPlus.gif\" border=\"0\" align=\"absmiddle\" /></a></td><td width=\"100%\">" + drClass["name"].ToString() + "</td></tr>";
                    if (oNext == null || oNext.ToString() == "" || oNext.ToString() == "0")
                    {
                        strGroup += "<tr><td></td><td width=\"100%\" id=\"divGroup_" + intGroup.ToString() + "\" style=\"display:none\">" + LoadGroup(_platformid, _demand, _existing_filters + " AND classid = " + drClass["id"].ToString()) + "</td></tr>";
                    }
                    else
                    {
                        strGroup += "<tr><td></td><td width=\"100%\" id=\"divGroup_" + intGroup.ToString() + "\" style=\"display:none\">" + ShowGroup(_platformid, _demand, _group_num, _existing_filters + " AND classid = " + drClass["id"].ToString()) + "</td></tr>";
                    }
                }
                break;

            case "env":
                string strEnvironment = LoadFilter("eid", "id");
                if (strEnvironment.StartsWith(" AND ") == true)
                {
                    strEnvironment = strEnvironment.Substring(5);
                }
                Environments oEnvironment   = new Environments(intProfile, dsn);
                DataSet      dsEnvironments = oEnvironment.Gets(1);
                DataRow[]    drEnvironments = dsEnvironments.Tables[0].Select(strEnvironment);
                foreach (DataRow drEnvironment in drEnvironments)
                {
                    intGroup++;
                    strGroup += "<tr><td><a href=\"javascript:void(0);\" onclick=\"ShowDetail('imgGroup_" + intGroup.ToString() + "','divGroup_" + intGroup.ToString() + "');\"><img id=\"imgGroup_" + intGroup.ToString() + "\" src=\"/images/biggerPlus.gif\" border=\"0\" align=\"absmiddle\" /></a></td><td width=\"100%\">" + drEnvironment["name"].ToString() + "</td></tr>";
                    if (oNext == null || oNext.ToString() == "" || oNext.ToString() == "0")
                    {
                        strGroup += "<tr><td></td><td width=\"100%\" id=\"divGroup_" + intGroup.ToString() + "\" style=\"display:none\">" + LoadGroup(_platformid, _demand, _existing_filters + " AND environmentid = " + drEnvironment["id"].ToString()) + "</td></tr>";
                    }
                    else
                    {
                        strGroup += "<tr><td></td><td width=\"100%\" id=\"divGroup_" + intGroup.ToString() + "\" style=\"display:none\">" + ShowGroup(_platformid, _demand, _group_num, _existing_filters + " AND environmentid = " + drEnvironment["id"].ToString()) + "</td></tr>";
                    }
                }
                break;
            }
            if (strGroup != "")
            {
                strGroup = "<table width=\"100%\" cellpadding=\"4\" cellspacing=\"0\" border=\"0\">" + strGroup + "</table>";
            }
            return(strGroup);
        }
Esempio n. 7
0
        public void LoadLists()
        {
            Locations oLocation = new Locations(intProfile, dsn);

            lstLocations.DataValueField = "id";
            lstLocations.DataTextField  = "fullname";
            lstLocations.DataSource     = oLocation.GetAddresssOrdered(1);
            lstLocations.DataBind();
            lstLocations.Items.Insert(0, new ListItem("-- ALL --", "0"));
            LoadList("lid", "Location(s)", lstLocations, null);
            Confidence oConfidence = new Confidence(intProfile, dsn);

            lstConfidences.DataValueField = "id";
            lstConfidences.DataTextField  = "name";
            lstConfidences.DataSource     = oConfidence.Gets(1);
            lstConfidences.DataBind();
            lstConfidences.Items.Insert(0, new ListItem("-- ALL --", "0"));
            LoadList("xid", "Confidence(s)", lstConfidences, null);
            Classes oClass    = new Classes(intProfile, dsn);
            DataSet dsClasses = oClass.Gets(1);

            lstClasses.DataValueField = "id";
            lstClasses.DataTextField  = "name";
            lstClasses.DataSource     = dsClasses;
            lstClasses.DataBind();
            lstClasses.Items.Insert(0, new ListItem("-- ALL --", "0"));
            LoadList("cid", "Class(es)", lstClasses, null);
            if (Request.QueryString["cid"] != null)
            {
                string strValue = Request.QueryString["cid"];
                if (strValue == "0")
                {
                    StringBuilder sb = new StringBuilder(strValue);
                    foreach (DataRow drClass in dsClasses.Tables[0].Rows)
                    {
                        sb.Append(drClass["id"].ToString());
                        sb.Append(",");
                    }
                    strValue = sb.ToString();
                }
                string[] strValues;
                char[]   strSplit = { ',' };
                strValues = strValue.Split(strSplit);
                Functions oFunction = new Functions(intProfile, dsn, intEnvironment);
                strValue = oFunction.BuildXmlString("data", strValues);
                lstEnvironments.DataValueField = "id";
                lstEnvironments.DataTextField  = "name";
                lstEnvironments.DataSource     = oClass.GetEnvironments(strValue, 0);
                lstEnvironments.DataBind();
                lstEnvironments.Items.Insert(0, new ListItem("-- ALL --", "0"));
                LoadList("eid", "Environment(s)", lstEnvironments, hdnEnvironment);
            }
            else
            {
                lstEnvironments.Items.Insert(0, new ListItem("-- Please select a Class --", "0"));
                lstEnvironments.Enabled = false;
            }
            // Groups
            ddlGroup1.Items.Insert(0, new ListItem("Environment", "env"));
            ddlGroup1.Items.Insert(0, new ListItem("Class", "cla"));
            ddlGroup1.Items.Insert(0, new ListItem("Location", "loc"));
            ddlGroup1.Items.Insert(0, new ListItem("Confidence", "con"));
            ddlGroup1.Items.Insert(0, new ListItem("-- NONE --", "0"));
            ddlGroup2.Items.Insert(0, new ListItem("Environment", "env"));
            ddlGroup2.Items.Insert(0, new ListItem("Class", "cla"));
            ddlGroup2.Items.Insert(0, new ListItem("Location", "loc"));
            ddlGroup2.Items.Insert(0, new ListItem("Confidence", "con"));
            ddlGroup2.Items.Insert(0, new ListItem("-- NONE --", "0"));
            ddlGroup3.Items.Insert(0, new ListItem("Environment", "env"));
            ddlGroup3.Items.Insert(0, new ListItem("Class", "cla"));
            ddlGroup3.Items.Insert(0, new ListItem("Location", "loc"));
            ddlGroup3.Items.Insert(0, new ListItem("Confidence", "con"));
            ddlGroup3.Items.Insert(0, new ListItem("-- NONE --", "0"));
            ddlGroup4.Items.Insert(0, new ListItem("Environment", "env"));
            ddlGroup4.Items.Insert(0, new ListItem("Class", "cla"));
            ddlGroup4.Items.Insert(0, new ListItem("Location", "loc"));
            ddlGroup4.Items.Insert(0, new ListItem("Confidence", "con"));
            ddlGroup4.Items.Insert(0, new ListItem("-- NONE --", "0"));
            ddlGroup5.Items.Insert(0, new ListItem("Environment", "env"));
            ddlGroup5.Items.Insert(0, new ListItem("Class", "cla"));
            ddlGroup5.Items.Insert(0, new ListItem("Location", "loc"));
            ddlGroup5.Items.Insert(0, new ListItem("Confidence", "con"));
            ddlGroup5.Items.Insert(0, new ListItem("-- NONE --", "0"));
            // Views
            strViews = "";
            if (strViews == "")
            {
                strViews = "<tr><td><img src=\"/images/cancel.gif\" border=\"0\" align=\"absmiddle\" /> You have no saved views</td></tr>";
            }
            strViews = "<table cellpadding=\"3\" cellspacing=\"1\" border=\"0\">" + strViews + "</table>";
            // Load Dates and Groups
            txtStart.Text           = Request.QueryString["start"];
            txtEnd.Text             = Request.QueryString["end"];
            ddlGroup1.SelectedValue = Request.QueryString["g1"];
            ddlGroup2.SelectedValue = Request.QueryString["g2"];
            ddlGroup3.SelectedValue = Request.QueryString["g3"];
            ddlGroup4.SelectedValue = Request.QueryString["g4"];
            ddlGroup5.SelectedValue = Request.QueryString["g5"];
            if (strParameters != "")
            {
                strParameters         = "<table cellpadding=\"3\" cellspacing=\"1\" border=\"0\">" + strParameters + "</table>";
                panParameters.Visible = true;
            }
        }
Esempio n. 8
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();
        }