Beispiel #1
0
        private void LoopRepeater()
        {
            panView.Visible = true;
            DataSet  ds = oOperatingSystem.GetGroups(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";
                }
            }
        }
Beispiel #2
0
 private void LoadLists()
 {
     ddlOperatingSystemGroup.DataTextField  = "name";
     ddlOperatingSystemGroup.DataValueField = "id";
     ddlOperatingSystemGroup.DataSource     = oOperatingSystems.GetGroups(1);
     ddlOperatingSystemGroup.DataBind();
     ddlOperatingSystemGroup.Items.Insert(0, new ListItem("-- ALL OS's --", "0"));
 }
Beispiel #3
0
        public void LoadLists()
        {
            Classes oClasses = new Classes(intProfile, dsn);

            ddlClass.DataValueField = "id";
            ddlClass.DataTextField  = "name";
            ddlClass.DataSource     = oClasses.Gets(1);
            ddlClass.DataBind();
            ddlClass.Items.Insert(0, new ListItem("-- SELECT --", "0"));
            int intAddress = 0;

            if (Request.QueryString["aid"] != null && Request.QueryString["aid"] != "")
            {
                intAddress = Int32.Parse(Request.QueryString["aid"]);
            }
            Locations oLocation = new Locations(intProfile, dsn);

            //ddlLocation.DataValueField = "id";
            //ddlLocation.DataTextField = "fullname";
            //if (intAddress == 0)
            //    ddlLocation.DataSource = oLocation.GetAddressCommon();
            //else
            //    ddlLocation.DataSource = oLocation.GetAddresss(1);
            //ddlLocation.DataBind();
            //ddlLocation.SelectedValue = intAddress.ToString();
            //if (intAddress == 0)
            //    ddlLocation.Items.Add(new ListItem("-- NOT LISTED --", "-1"));
            //ddlLocation.Items.Insert(0, new ListItem("-- SELECT --", "0"));
            //Rooms oRooms = new Rooms(intProfile, dsn);
            //ddlRoom.DataValueField = "id";
            //ddlRoom.DataTextField = "name";
            //ddlRoom.DataSource = oRooms.Gets(1);
            //ddlRoom.DataBind();
            //ddlRoom.Items.Insert(0, new ListItem("-- SELECT --", "0"));
            //Racks oRacks = new Racks(intProfile, dsn);
            //ddlRack.DataValueField = "id";
            //ddlRack.DataTextField = "name";
            //ddlRack.DataSource = oRacks.Gets(1);
            //ddlRack.DataBind();
            //ddlRack.Items.Insert(0, new ListItem("-- SELECT --", "0"));
            ddlBuildNetwork.DataValueField = "id";
            ddlBuildNetwork.DataTextField  = "name";
            ddlBuildNetwork.DataSource     = oSolaris.GetBuildNetworks(1);
            ddlBuildNetwork.DataBind();
            ddlBuildNetwork.Items.Insert(0, new ListItem("-- SELECT --", "0"));

            ddlResiliency.DataValueField = "id";
            ddlResiliency.DataTextField  = "name";
            ddlResiliency.DataSource     = oResiliency.Gets(1);
            ddlResiliency.DataBind();
            ddlResiliency.Items.Insert(0, new ListItem("-- SELECT --", "0"));

            ddlOperatingSystemGroup.DataValueField = "id";
            ddlOperatingSystemGroup.DataTextField  = "name";
            ddlOperatingSystemGroup.DataSource     = oOperatingSystem.GetGroups(1);
            ddlOperatingSystemGroup.DataBind();
            ddlOperatingSystemGroup.Items.Insert(0, new ListItem("-- SELECT --", "0"));
        }
Beispiel #4
0
        protected void LoadLists(int _platformid)
        {
            //Model
            ddlModel.DataTextField  = "name";
            ddlModel.DataValueField = "id";
            ddlModel.DataSource     = oModelsProperties.GetPlatforms(1, _platformid, 1);
            ddlModel.DataBind();
            ddlModel.Items.Insert(0, new ListItem("-- SELECT --", "0"));

            //Class
            ddlClass.DataTextField  = "name";
            ddlClass.DataValueField = "id";
            ddlClass.DataSource     = oClass.Gets(1);
            ddlClass.DataBind();
            ddlClass.Items.Insert(0, new ListItem("-- SELECT --", "0"));

            //Enclosure
            ddlEnclosure.DataTextField  = "name";
            ddlEnclosure.DataValueField = "id";
            ddlEnclosure.DataSource     = oAsset.GetEnclosures((int)AssetStatus.InUse);
            ddlEnclosure.DataBind();
            ddlEnclosure.Items.Insert(0, new ListItem("*** UNKNOWN ***", "-1"));
            ddlEnclosure.Items.Insert(0, new ListItem("-- SELECT --", "0"));

            ddlResiliency.DataValueField = "id";
            ddlResiliency.DataTextField  = "name";
            ddlResiliency.DataSource     = oResiliency.Gets(1);
            ddlResiliency.DataBind();
            ddlResiliency.Items.Insert(0, new ListItem("*** UNKNOWN ***", "-1"));
            ddlResiliency.Items.Insert(0, new ListItem("-- SELECT --", "0"));

            ddlOperatingSystemGroup.DataValueField = "id";
            ddlOperatingSystemGroup.DataTextField  = "name";
            ddlOperatingSystemGroup.DataSource     = oOperatingSystem.GetGroups(1);
            ddlOperatingSystemGroup.DataBind();
            ddlOperatingSystemGroup.Items.Insert(0, new ListItem("*** UNKNOWN ***", "-1"));
            ddlOperatingSystemGroup.Items.Insert(0, new ListItem("-- SELECT --", "0"));

            DataSet dsSwitches = oAsset.GetSwitchsByRack(0, 1);

            ddlSwitch1.DataTextField  = ddlSwitch2.DataTextField = "name";
            ddlSwitch1.DataValueField = ddlSwitch2.DataValueField = "id";
            ddlSwitch1.DataSource     = ddlSwitch2.DataSource = dsSwitches;
            ddlSwitch1.DataBind();
            ddlSwitch2.DataBind();
            ddlSwitch1.Items.Insert(0, new ListItem("-- SELECT --", "0"));
            ddlSwitch2.Items.Insert(0, new ListItem("-- SELECT --", "0"));
        }
        private void LoadList()
        {
            //Class
            ddlClass.DataTextField  = "name";
            ddlClass.DataValueField = "id";
            ddlClass.DataSource     = oClass.Gets(1);
            ddlClass.DataBind();
            ddlClass.Items.Insert(0, new ListItem("-- SELECT --", "0"));

            //Enclosure
            ddlEnclosure.DataTextField  = "name";
            ddlEnclosure.DataValueField = "id";
            ddlEnclosure.DataSource     = oAsset.GetEnclosures((int)AssetStatus.InUse);
            ddlEnclosure.DataBind();
            ddlEnclosure.Items.Insert(0, new ListItem("-- SELECT --", "0"));

            //Build Network
            ddlBuildNetwork.DataValueField = "id";
            ddlBuildNetwork.DataTextField  = "name";
            ddlBuildNetwork.DataSource     = oSolaris.GetBuildNetworks(1);
            ddlBuildNetwork.DataBind();
            ddlBuildNetwork.Items.Insert(0, new ListItem("-- SELECT --", "0"));

            //Resiliency
            ddlResiliency.DataValueField = "id";
            ddlResiliency.DataTextField  = "name";
            ddlResiliency.DataSource     = oResiliency.Gets(1);
            ddlResiliency.DataBind();
            ddlResiliency.Items.Insert(0, new ListItem("-- SELECT --", "0"));

            //Operating System Group
            ddlOperatingSystemGroup.DataValueField = "id";
            ddlOperatingSystemGroup.DataTextField  = "name";
            ddlOperatingSystemGroup.DataSource     = oOperatingSystem.GetGroups(1);
            ddlOperatingSystemGroup.DataBind();
            ddlOperatingSystemGroup.Items.Insert(0, new ListItem("-- ANY --", "0"));
        }
Beispiel #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            StringBuilder sb = new StringBuilder();

            intProfile = Int32.Parse(Request.Cookies["profileid"].Value);
            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);
            }

            oPage             = new Pages(intProfile, dsn);
            oVMWare           = new VMWare(intProfile, dsn);
            oResiliency       = new Resiliency(intProfile, dsn);
            oOperatingSystems = new OperatingSystems(intProfile, dsn);

            if (!IsPostBack)
            {
                if (String.IsNullOrEmpty(Request.QueryString["v"]) == false)
                {
                    int     v   = Int32.Parse(Request.QueryString["v"]);
                    DataSet rec = oVMWare.GetVlan(v);
                    if (rec.Tables[0].Rows.Count > 0)
                    {
                        lblVParent.ToolTip  = rec.Tables[0].Rows[0]["clusterid"].ToString();
                        lblVParent.Text     = oVMWare.GetCluster(Int32.Parse(lblVParent.ToolTip), "name");
                        txtVName.Text       = rec.Tables[0].Rows[0]["name"].ToString();
                        chkVEnabled.Checked = (rec.Tables[0].Rows[0]["enabled"].ToString() == "1");
                        btnUpdateV.Text     = "Update";
                    }
                    else if (String.IsNullOrEmpty(Request.QueryString["c"]) == false)
                    {
                        lblVParent.ToolTip = Request.QueryString["c"];
                        lblVParent.Text    = oVMWare.GetCluster(Int32.Parse(lblVParent.ToolTip), "name");
                    }
                    panVLAN.Visible = true;
                }
                else if (String.IsNullOrEmpty(Request.QueryString["ds"]) == false)
                {
                    ddlOperatingSystemGroup.DataTextField  = "name";
                    ddlOperatingSystemGroup.DataValueField = "id";
                    ddlOperatingSystemGroup.DataSource     = oOperatingSystems.GetGroups(1);
                    ddlOperatingSystemGroup.DataBind();
                    ddlOperatingSystemGroup.Items.Insert(0, new ListItem("-- ALL OS's --", "0"));

                    ddlPartner.DataTextField  = "name";
                    ddlPartner.DataValueField = "id";

                    int c = 0;
                    if (String.IsNullOrEmpty(Request.QueryString["c"]) == false)
                    {
                        Int32.TryParse(Request.QueryString["c"], out c);
                        ddlPartner.DataSource = oVMWare.GetDatastores(c, 1);
                        ddlPartner.DataBind();
                        ddlPartner.Items.Insert(0, new ListItem("-- NONE --", "0"));
                    }

                    int     ds  = Int32.Parse(Request.QueryString["ds"]);
                    DataSet rec = oVMWare.GetDatastore(ds);
                    if (rec.Tables[0].Rows.Count > 0)
                    {
                        c = Int32.Parse(rec.Tables[0].Rows[0]["clusterid"].ToString());
                        ddlPartner.DataSource = oVMWare.GetDatastores(c, 1);
                        ddlPartner.DataBind();
                        ddlPartner.Items.Insert(0, new ListItem("-- NONE --", "0"));

                        txtDSName.Text        = rec.Tables[0].Rows[0]["name"].ToString();
                        ddlType.SelectedValue = rec.Tables[0].Rows[0]["storage_type"].ToString();
                        ddlOperatingSystemGroup.SelectedValue = rec.Tables[0].Rows[0]["osgroupid"].ToString();
                        chkReplicated.Checked         = (rec.Tables[0].Rows[0]["replicated"].ToString() == "1");
                        txtDSMaximum.Text             = rec.Tables[0].Rows[0]["maximum"].ToString();
                        chkServer.Checked             = (rec.Tables[0].Rows[0]["server"].ToString() == "1");
                        chkPagefile.Checked           = (rec.Tables[0].Rows[0]["pagefile"].ToString() == "1");
                        chkOverridePermission.Checked = (rec.Tables[0].Rows[0]["override_permission"].ToString() == "1");
                        ddlPartner.SelectedValue      = rec.Tables[0].Rows[0]["partner"].ToString();
                        chkDSEnabled.Checked          = (rec.Tables[0].Rows[0]["enabled"].ToString() == "1");
                        btnUpdateDS.Text = "Update";
                    }

                    lblDSParent.ToolTip  = c.ToString();
                    lblDSParent.Text     = oVMWare.GetCluster(c, "name");
                    panDatastore.Visible = true;
                }
                else if (String.IsNullOrEmpty(Request.QueryString["h"]) == false)
                {
                    int     h   = Int32.Parse(Request.QueryString["h"]);
                    DataSet rec = oVMWare.GetHost(h);
                    if (rec.Tables[0].Rows.Count > 0)
                    {
                        lblHParent.ToolTip  = rec.Tables[0].Rows[0]["clusterid"].ToString();
                        lblHParent.Text     = oVMWare.GetCluster(Int32.Parse(lblHParent.ToolTip), "name");
                        txtHName.Text       = rec.Tables[0].Rows[0]["name"].ToString();
                        txtHMaximum.Text    = rec.Tables[0].Rows[0]["maximum"].ToString();
                        chkHEnabled.Checked = (rec.Tables[0].Rows[0]["enabled"].ToString() == "1");
                        btnUpdateH.Text     = "Update";
                    }
                    else if (String.IsNullOrEmpty(Request.QueryString["c"]) == false)
                    {
                        lblHParent.ToolTip = Request.QueryString["c"];
                        lblHParent.Text    = oVMWare.GetCluster(Int32.Parse(lblHParent.ToolTip), "name");
                    }
                    panHost.Visible = true;
                }
                else if (String.IsNullOrEmpty(Request.QueryString["c"]) == false)
                {
                    ddlResiliency.DataTextField  = "name";
                    ddlResiliency.DataValueField = "id";
                    ddlResiliency.DataSource     = oResiliency.Gets(1);
                    ddlResiliency.DataBind();

                    int     c   = Int32.Parse(Request.QueryString["c"]);
                    DataSet rec = oVMWare.GetCluster(c);
                    if (rec.Tables[0].Rows.Count > 0)
                    {
                        lblCParent.ToolTip            = rec.Tables[0].Rows[0]["folderid"].ToString();
                        lblCParent.Text               = oVMWare.GetFolder(Int32.Parse(lblCParent.ToolTip), "name");
                        txtCName.Text                 = rec.Tables[0].Rows[0]["name"].ToString();
                        ddlVersion.SelectedValue      = rec.Tables[0].Rows[0]["version"].ToString();
                        ddlAntiAffinity.SelectedValue = rec.Tables[0].Rows[0]["anti_affinity"].ToString();
                        txtCMaximum.Text              = rec.Tables[0].Rows[0]["maximum"].ToString();
                        txtResourcePool.Text          = rec.Tables[0].Rows[0]["resource_pool"].ToString();
                        txtDatastoreNotify.Text       = rec.Tables[0].Rows[0]["datastores_notify"].ToString();
                        txtDatastoreLeft.Text         = rec.Tables[0].Rows[0]["datastores_left"].ToString();
                        txtDatastoreSize.Text         = rec.Tables[0].Rows[0]["datastores_size"].ToString();
                        chkFull.Checked               = (rec.Tables[0].Rows[0]["at_max"].ToString() == "1");
                        chkAPoff.Checked              = (rec.Tables[0].Rows[0]["auto_provision_off"].ToString() == "1");
                        chkAPoffDR.Checked            = (rec.Tables[0].Rows[0]["auto_provision_dr_off"].ToString() == "1");
                        chkDell.Checked               = (rec.Tables[0].Rows[0]["dell"].ToString() == "1");
                        ddlResiliency.SelectedValue   = rec.Tables[0].Rows[0]["resiliencyid"].ToString();
                        chkOracle.Checked             = (rec.Tables[0].Rows[0]["can_oracle"].ToString() == "1");
                        chkOracleCluster.Checked      = (rec.Tables[0].Rows[0]["can_oracle_cluster"].ToString() == "1");
                        chkSQL.Checked                = (rec.Tables[0].Rows[0]["can_sql"].ToString() == "1");
                        chkSQLCluster.Checked         = (rec.Tables[0].Rows[0]["can_sql_cluster"].ToString() == "1");
                        chkCluster.Checked            = (rec.Tables[0].Rows[0]["can_cluster"].ToString() == "1");
                        chkCEnabled.Checked           = (rec.Tables[0].Rows[0]["enabled"].ToString() == "1");

                        txtFailures.Text       = rec.Tables[0].Rows[0]["input_failures"].ToString();
                        txtCPUUtilization.Text = rec.Tables[0].Rows[0]["input_cpu_utilization"].ToString();
                        txtRAMUtilization.Text = rec.Tables[0].Rows[0]["input_ram_utilization"].ToString();
                        txtMaxRAM.Text         = rec.Tables[0].Rows[0]["input_max_ram"].ToString();
                        txtAvgUtilization.Text = rec.Tables[0].Rows[0]["input_avg_utilization"].ToString();
                        txtLunSize.Text        = rec.Tables[0].Rows[0]["input_lun_size"].ToString();
                        txtLunUtilization.Text = rec.Tables[0].Rows[0]["input_lun_utilization"].ToString();
                        txtVMsPerLun.Text      = rec.Tables[0].Rows[0]["input_vms_per_lun"].ToString();
                        txtTimeLUN.Text        = rec.Tables[0].Rows[0]["input_time_lun"].ToString();
                        txtTimeCluster.Text    = rec.Tables[0].Rows[0]["input_time_cluster"].ToString();
                        txtMaxVMsServer.Text   = rec.Tables[0].Rows[0]["input_max_vms_server"].ToString();
                        txtMaxVMsLUN.Text      = rec.Tables[0].Rows[0]["input_max_vms_lun"].ToString();

                        btnUpdateC.Text = "Update";

                        rptHosts.DataSource = oVMWare.GetHosts(c, 0);
                        rptHosts.DataBind();
                        rptDatastores.DataSource = oVMWare.GetDatastores(c, 0);
                        rptDatastores.DataBind();
                        rptVLANs.DataSource = oVMWare.GetVlans(c, 0);
                        rptVLANs.DataBind();

                        int intMenuTab = 0;
                        if (Request.QueryString["menu_tab"] != null && Request.QueryString["menu_tab"] != "")
                        {
                            intMenuTab = Int32.Parse(Request.QueryString["menu_tab"]);
                        }
                        Tab oTab = new Tab(hdnTab.ClientID, intMenuTab, "divMenu1", true, false);
                        oTab.AddTab("Hosts", "");
                        oTab.AddTab("Datastores", "");
                        oTab.AddTab("VLANs", "");
                        strMenuTab1 = oTab.GetTabs();
                    }
                    else if (String.IsNullOrEmpty(Request.QueryString["f"]) == false)
                    {
                        lblCParent.ToolTip = Request.QueryString["f"];
                        lblCParent.Text    = oVMWare.GetFolder(Int32.Parse(lblCParent.ToolTip), "name");
                    }
                    panCluster.Visible = true;
                }
                else if (String.IsNullOrEmpty(Request.QueryString["f"]) == false)
                {
                    int     f   = Int32.Parse(Request.QueryString["f"]);
                    DataSet rec = oVMWare.GetFolder(f);
                    if (rec.Tables[0].Rows.Count > 0)
                    {
                        lblFParent.ToolTip    = rec.Tables[0].Rows[0]["datacenterid"].ToString();
                        lblFParent.Text       = oVMWare.GetDatacenter(Int32.Parse(lblFParent.ToolTip), "name");
                        txtFName.Text         = rec.Tables[0].Rows[0]["name"].ToString();
                        txtFNotification.Text = rec.Tables[0].Rows[0]["notification"].ToString();
                        chkFEnabled.Checked   = (rec.Tables[0].Rows[0]["enabled"].ToString() == "1");
                        btnUpdateF.Text       = "Update";

                        rptClusters.DataSource = oVMWare.GetClusters(f, 0);
                        rptClusters.DataBind();
                    }
                    else if (String.IsNullOrEmpty(Request.QueryString["dc"]) == false)
                    {
                        lblFParent.ToolTip = Request.QueryString["dc"];
                        lblFParent.Text    = oVMWare.GetDatacenter(Int32.Parse(lblFParent.ToolTip), "name");
                    }
                    panFolder.Visible = true;
                }
                else if (String.IsNullOrEmpty(Request.QueryString["dc"]) == false)
                {
                    ddlDCParent.DataTextField  = "name";
                    ddlDCParent.DataValueField = "id";
                    ddlDCParent.DataSource     = oVMWare.GetVirtualCenters(1);
                    ddlDCParent.DataBind();

                    int     dc  = Int32.Parse(Request.QueryString["dc"]);
                    DataSet rec = oVMWare.GetDatacenter(dc);
                    if (rec.Tables[0].Rows.Count > 0)
                    {
                        ddlDCParent.SelectedValue      = rec.Tables[0].Rows[0]["virtualcenterid"].ToString();
                        txtDCName.Text                 = rec.Tables[0].Rows[0]["name"].ToString();
                        txtDCBuildFolder.Text          = rec.Tables[0].Rows[0]["build_folder"].ToString();
                        txtDCDesktopNetwork.Text       = rec.Tables[0].Rows[0]["desktop_network"].ToString();
                        txtDCWorkstationDecomVLAN.Text = rec.Tables[0].Rows[0]["workstation_decom_vlan"].ToString();
                        chkDCEnabled.Checked           = (rec.Tables[0].Rows[0]["enabled"].ToString() == "1");
                        btnUpdateDC.Text               = "Update";

                        rptFolders.DataSource = oVMWare.GetFolders(dc, 0);
                        rptFolders.DataBind();
                    }
                    else if (String.IsNullOrEmpty(Request.QueryString["vc"]) == false)
                    {
                        ddlDCParent.SelectedValue = Request.QueryString["vc"];
                    }
                    panDC.Visible = true;
                }
                else if (String.IsNullOrEmpty(Request.QueryString["vc"]) == false)
                {
                    int     vc  = Int32.Parse(Request.QueryString["vc"]);
                    DataSet rec = oVMWare.GetVirtualCenter(vc);
                    if (rec.Tables[0].Rows.Count > 0)
                    {
                        txtName.Text = rec.Tables[0].Rows[0]["name"].ToString();
                        txtUrl.Text  = rec.Tables[0].Rows[0]["url"].ToString();
                        ddlEnvironment.SelectedValue = rec.Tables[0].Rows[0]["environment"].ToString();
                        chkEnabled.Checked           = (rec.Tables[0].Rows[0]["enabled"].ToString() == "1");
                        btnUpdateVC.Text             = "Update";

                        rptDCs.DataSource = oVMWare.GetDatacenters(vc, 0);
                        rptDCs.DataBind();
                    }
                    panVC.Visible = true;
                }
                else
                {
                    panVCs.Visible    = true;
                    rptVCs.DataSource = oVMWare.GetVirtualCenters(0);
                    rptVCs.DataBind();
                }
            }
        }
Beispiel #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            AuthenticateUser();
            if (Request.Cookies["profileid"] != null && Request.Cookies["profileid"].Value != "")
            {
                intProfile = Int32.Parse(Request.Cookies["profileid"].Value);
            }
            if (Request.QueryString["applicationid"] != null && Request.QueryString["applicationid"] != "")
            {
                intApplication = Int32.Parse(Request.QueryString["applicationid"]);
            }
            if (Request.Cookies["application"] != null && Request.Cookies["application"].Value != "")
            {
                intApplication = Int32.Parse(Request.Cookies["application"].Value);
            }
            oDataPoint        = new DataPoint(intProfile, dsn);
            oUser             = new Users(intProfile, dsn);
            oServer           = new Servers(intProfile, dsn);
            oAsset            = new Asset(intProfile, dsnAsset);
            oForecast         = new Forecast(intProfile, dsn);
            oPlatform         = new Platforms(intProfile, dsn);
            oType             = new Types(intProfile, dsn);
            oModel            = new Models(intProfile, dsn);
            oModelsProperties = new ModelsProperties(intProfile, dsn);
            oIPAddresses      = new IPAddresses(intProfile, dsnIP, dsn);
            oFunction         = new Functions(intProfile, dsn, intEnvironment);
            oOperatingSystem  = new OperatingSystems(intProfile, dsn);
            oServicePack      = new ServicePacks(intProfile, dsn);
            oClass            = new Classes(intProfile, dsn);
            oEnvironment      = new Environments(intProfile, dsn);
            oResiliency       = new Resiliency(intProfile, dsn);

            oSolaris    = new Solaris(intProfile, dsn);
            oStatusList = new StatusLevels(intProfile, dsn);
            if (oUser.IsAdmin(intProfile) == true || (oDataPoint.GetPagePermission(intApplication, "ASSET") == true || intDataPointAvailableAsset == 1))
            {
                panAllow.Visible = true;
                if (Request.QueryString["save"] != null)
                {
                    panSave.Visible = true;
                }
                if (Request.QueryString["error"] != null)
                {
                    panError.Visible = true;
                }
                if (Request.QueryString["close"] != null)
                {
                    Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "close", "<script type=\"text/javascript\">window.close();<" + "/" + "script>");
                }
                else if (Request.QueryString["id"] != null && Request.QueryString["id"] != "")
                {
                    string  strID = oFunction.decryptQueryString(Request.QueryString["id"]);
                    DataSet ds    = oDataPoint.GetAsset(Int32.Parse(strID));
                    if (ds.Tables[0].Rows.Count == 1)
                    {
                        // Load General Information
                        intAsset        = Int32.Parse(ds.Tables[0].Rows[0]["id"].ToString());
                        lblAssetID.Text = "#" + intAsset.ToString();
                        string strSerial = ds.Tables[0].Rows[0]["serial"].ToString();
                        string strAsset  = ds.Tables[0].Rows[0]["asset"].ToString();

                        string strHeader = (strSerial.Length > 15 ? strSerial.Substring(0, 15) + "..." : strSerial);
                        lblHeader.Text    = "&quot;" + strHeader.ToUpper() + "&quot;";
                        Master.Page.Title = "DataPoint | Physical Deploy (" + strHeader + ")";
                        lblHeaderSub.Text = "Complete the following information to deploy a physical server...";
                        int intMenuTab = 0;
                        if (Request.QueryString["menu_tab"] != null && Request.QueryString["menu_tab"] != "")
                        {
                            intMenuTab = Int32.Parse(Request.QueryString["menu_tab"]);
                        }
                        Tab oTab = new Tab(hdnTab.ClientID, intMenuTab, "divMenu1", true, false);
                        oTab.AddTab("Asset Information", "");
                        oTab.AddTab("Location Information", "");
                        oTab.AddTab("World Wide Port Names", "");
                        oTab.AddTab("Resource Dependencies", "");
                        oTab.AddTab("Provisioning History", "");
                        strMenuTab1 = oTab.GetTabs();

                        if (oUser.IsAdmin(intProfile) == true || oDataPoint.GetFieldPermission(intProfile, "SERVER_ADMIN") == true)
                        {
                            panOldLocationInfo.Visible = true;
                        }

                        if (!IsPostBack)
                        {
                            LoadList();

                            // Asset Information
                            oDataPoint.LoadTextBox(txtPlatformSerial, intProfile, null, "", lblPlatformSerial, fldPlatformSerial, "PHYSICAL_SERIAL", strSerial, "", false, true);
                            oDataPoint.LoadTextBox(txtPlatformAsset, intProfile, null, "", lblPlatformAsset, fldPlatformAsset, "PHYSICAL_ASSET", strAsset, "", false, true);

                            int intAssetAttribute = Int32.Parse(oAsset.Get(intAsset, "asset_attribute"));
                            oDataPoint.LoadDropDown(ddlAssetAttribute, intProfile, null, "", lblAssetAttribute, fldAssetAttribute, "ASSET_ATTRIBUTE", "Name", "AttributeId", oAsset.getAssetAttributes(null, "", 1), intAssetAttribute, true, false, false);
                            oDataPoint.LoadTextBox(txtAssetAttributeComment, intProfile, null, "", lblAssetAttributeComment, fldAssetAttributeComment, "ASSET_ATTRIBUTE_COMMENT", oAsset.getAssetAttributesComments(intAsset), "", false, true);
                            ddlAssetAttribute.Attributes.Add("onclick", "return SetControlsForAssetAttributes()");

                            ddlPlatform.Attributes.Add("onchange", "PopulatePlatformTypes('" + ddlPlatform.ClientID + "','" + ddlPlatformType.ClientID + "','" + ddlPlatformModel.ClientID + "','" + ddlPlatformModelProperty.ClientID + "');ResetDropDownHidden('" + hdnModel.ClientID + "');");
                            ddlPlatformType.Attributes.Add("onchange", "PopulatePlatformModels('" + ddlPlatformType.ClientID + "','" + ddlPlatformModel.ClientID + "','" + ddlPlatformModelProperty.ClientID + "');ResetDropDownHidden('" + hdnModel.ClientID + "');");
                            ddlPlatformModel.Attributes.Add("onchange", "PopulatePlatformModelProperties('" + ddlPlatformModel.ClientID + "','" + ddlPlatformModelProperty.ClientID + "');ResetDropDownHidden('" + hdnModel.ClientID + "');");
                            ddlPlatformModelProperty.Attributes.Add("onchange", "UpdateDropDownHidden('" + ddlPlatformModelProperty.ClientID + "','" + hdnModel.ClientID + "');");
                            int intModel  = Int32.Parse(oAsset.Get(intAsset, "modelid"));
                            int intParent = Int32.Parse(oModelsProperties.Get(intModel, "modelid"));
                            if (oDataPoint.GetDeployModel(intProfile, intParent) == false && oUser.IsAdmin(intProfile) == false)
                            {
                                panAllow.Visible  = false;
                                panDenied.Visible = true;
                            }

                            hdnModel.Value = intModel.ToString();
                            int intModelParent = Int32.Parse(oModelsProperties.Get(intModel, "modelid"));
                            int intType        = oModel.GetType(intModelParent);
                            int intPlatform    = oType.GetPlatform(intType);
                            oDataPoint.LoadDropDown(ddlPlatform, intProfile, null, "", lblPlatform, fldPlatform, "PHYSICAL_PLATFORM", "name", "platformid", oPlatform.Gets(1), intPlatform, false, false, true);
                            oDataPoint.LoadDropDown(ddlPlatformType, intProfile, null, "", lblPlatformType, fldPlatformType, "PHYSICAL_TYPE", "name", "id", oType.Gets(intPlatform, 1), intType, false, false, true);
                            oDataPoint.LoadDropDown(ddlPlatformModel, intProfile, null, "", lblPlatformModel, fldPlatformModel, "PHYSICAL_MODEL", "name", "id", oModel.Gets(intType, 1), intModelParent, false, false, true);
                            oDataPoint.LoadDropDown(ddlPlatformModelProperty, intProfile, null, "", lblPlatformModelProperty, fldPlatformModelProperty, "PHYSICAL_MODEL_PROP", "name", "id", oModelsProperties.GetModels(0, intModelParent, 1), intModel, false, false, true);

                            // Get Asset
                            DataSet dsAsset = oAsset.GetServerOrBlade(intAsset);
                            if (dsAsset.Tables[0].Rows.Count > 0)
                            {
                                Response.Redirect("/datapoint/asset/physical.aspx?t=serial&q=" + oFunction.encryptQueryString(strSerial) + "&id=" + oFunction.encryptQueryString(intAsset.ToString()) + "&r=0");
                            }

                            oDataPoint.LoadDropDown(ddlPlatformClass, intProfile, null, "", lblPlatformClass, fldPlatformClass, "PHYSICAL_CLASS", "name", "id", oClass.Gets(1), 0, false, false, true);
                            oDataPoint.LoadDropDown(ddlPlatformEnvironment, intProfile, null, "", lblPlatformEnvironment, fldPlatformEnvironment, "PHYSICAL_ENVIRONMENT", "name", "id", oClass.GetEnvironment(0, 0), 0, false, false, true);
                            oDataPoint.LoadTextBox(txtPlatformILO, intProfile, null, "", lblPlatformILO, fldPlatformILO, "PHYSICAL_ILO", "", "", false, true);
                            oDataPoint.LoadTextBox(txtPlatformDummy, intProfile, null, "", lblPlatformDummy, fldPlatformDummy, "PHYSICAL_DUMMY", "", "", false, true);
                            oDataPoint.LoadTextBox(txtPlatformMAC, intProfile, null, "", lblPlatformMAC, fldPlatformMAC, "PHYSICAL_MAC", "", "", false, true);
                            oDataPoint.LoadTextBox(txtPlatformVLAN, intProfile, null, "", lblPlatformVLAN, fldPlatformVLAN, "PHYSICAL_VLAN", "", "", false, true);
                            oDataPoint.LoadDropDown(ddlPlatformBuildNetwork, intProfile, null, "", lblPlatformBuildNetwork, fldPlatformBuildNetwork, "PHYSICAL_BUILD_NETWORK", "name", "id", oSolaris.GetBuildNetworks(1), 0, false, false, false);
                            oDataPoint.LoadDropDown(ddlPlatformResiliency, intProfile, null, "", lblPlatformResiliency, fldPlatformResiliency, "PHYSICAL_RESILIENCY", "name", "id", oResiliency.Gets(1), 0, false, false, true);
                            oDataPoint.LoadDropDown(ddlPlatformOperatingSystemGroup, intProfile, null, "", lblPlatformOperatingSystemGroup, fldPlatformOperatingSystemGroup, "PHYSICAL_OS_GROUP", "name", "id", oOperatingSystem.GetGroups(1), 0, false, false, false);

                            if (dsAsset.Tables[0].Rows.Count > 0)
                            {
                                lblOldlocation.Text = dsAsset.Tables[0].Rows[0]["OldLocation"].ToString();
                                lblOldRoom.Text     = dsAsset.Tables[0].Rows[0]["OldRoom"].ToString();
                                lblOldRack.Text     = dsAsset.Tables[0].Rows[0]["OldRack"].ToString();

                                txtLocation.Text     = dsAsset.Tables[0].Rows[0]["Location"].ToString();
                                txtRoom.Text         = dsAsset.Tables[0].Rows[0]["Room"].ToString();
                                txtZone.Text         = dsAsset.Tables[0].Rows[0]["Zone"].ToString();
                                txtRack.Text         = dsAsset.Tables[0].Rows[0]["Rack"].ToString();
                                txtRackPosition.Text = dsAsset.Tables[0].Rows[0]["Rackposition"].ToString();
                                oDataPoint.LoadTextBox(txtRackPosition, intProfile, null, "", lblRackPositionValue, fldLocation, "CHANGE_LOCATION", dsAsset.Tables[0].Rows[0]["rackposition"].ToString(), "", false, true);
                                hdnRackId.Value = dsAsset.Tables[0].Rows[0]["RackId"].ToString();
                            }
                            oDataPoint.LoadButton(btnSelectLocation, intProfile, fldLocation, "CHANGE_LOCATION",
                                                  "return LoadLocationRoomRack('" + "rack" + "','" + hdnRackId.ClientID + "', '" + txtLocation.ClientID + "','" + txtRoom.ClientID + "','" + txtZone.ClientID + "','" + txtRack.ClientID + "');");

                            ddlPlatformStatus.SelectedValue = oAsset.GetStatus(intAsset, "status");

                            // Resource Dependencies
                            AssetOrder      oAssetOrder     = new AssetOrder(0, dsn, dsnAsset, intEnvironment);
                            Services        oService        = new Services(0, dsn);
                            ServiceRequests oServiceRequest = new ServiceRequests(0, dsn);
                            rptServiceRequests.DataSource = oAssetOrder.GetByAsset(intAsset, false);
                            rptServiceRequests.DataBind();
                            trServiceRequests.Visible = (rptServiceRequests.Items.Count == 0);
                            foreach (RepeaterItem ri in rptServiceRequests.Items)
                            {
                                Label lblServiceID = (Label)ri.FindControl("lblServiceID");
                                int   intService   = Int32.Parse(lblServiceID.Text);
                                Label lblDetails   = (Label)ri.FindControl("lblDetails");
                                Label lblProgress  = (Label)ri.FindControl("lblProgress");

                                if (lblProgress.Text == "")
                                {
                                    lblProgress.Text = "<i>Unavailable</i>";
                                }
                                else
                                {
                                    int     intResource  = Int32.Parse(lblProgress.Text);
                                    double  dblAllocated = 0.00;
                                    double  dblUsed      = 0.00;
                                    int     intStatus    = 0;
                                    bool    boolAssigned = false;
                                    DataSet dsResource   = oDataPoint.GetServiceRequestResource(intResource);
                                    if (dsResource.Tables[0].Rows.Count > 0)
                                    {
                                        Int32.TryParse(dsResource.Tables[0].Rows[0]["status"].ToString(), out intStatus);
                                    }
                                    foreach (DataRow drResource in dsResource.Tables[1].Rows)
                                    {
                                        boolAssigned  = true;
                                        dblAllocated += double.Parse(drResource["allocated"].ToString());
                                        dblUsed      += double.Parse(drResource["used"].ToString());
                                        intStatus     = Int32.Parse(drResource["status"].ToString());
                                    }
                                    if (intStatus == (int)ResourceRequestStatus.Closed)
                                    {
                                        lblProgress.Text = oServiceRequest.GetStatusBar(100.00, "100", "12", true);
                                    }
                                    else if (intStatus == (int)ResourceRequestStatus.Cancelled)
                                    {
                                        lblProgress.Text = "Cancelled";
                                    }
                                    else if (boolAssigned == false)
                                    {
                                        string  strManager = "";
                                        DataSet dsManager  = oService.GetUser(intService, 1); // Managers
                                        foreach (DataRow drManager in dsManager.Tables[0].Rows)
                                        {
                                            if (strManager != "")
                                            {
                                                strManager += "\\n";
                                            }
                                            int intManager = Int32.Parse(drManager["userid"].ToString());
                                            strManager += " - " + oUser.GetFullName(intManager) + " [" + oUser.GetName(intManager) + "]";
                                        }
                                        lblProgress.Text = "<a href=\"javascript:void(0);\" class=\"lookup\" onclick=\"alert('This request is pending assignment by the following...\\n\\n" + strManager + "');\">Pending Assignment</a>";
                                    }
                                    else if (dblAllocated > 0.00)
                                    {
                                        lblProgress.Text = oServiceRequest.GetStatusBar((dblUsed / dblAllocated) * 100.00, "100", "12", true);
                                    }
                                    else
                                    {
                                        lblProgress.Text = "<i>N / A</i>";
                                    }
                                    lblDetails.Text = "<a href=\"javascript:void(0);\" class=\"lookup\" onclick=\"OpenNewWindowMenu('/datapoint/service/resource.aspx?id=" + oFunction.encryptQueryString(intResource.ToString()) + "', '800', '600');\">" + lblDetails.Text + "</a>";
                                }
                            }

                            // Provioning History
                            rptHistory.DataSource = oAsset.GetProvisioningHistory(intAsset);
                            rptHistory.DataBind();
                            lblHistory.Visible = (rptHistory.Items.Count == 0);

                            // WWW
                            rptWWW.DataSource = oAsset.GetHBA(intAsset);
                            rptWWW.DataBind();
                            lblWWW.Visible = (rptWWW.Items.Count == 0);
                            oDataPoint.LoadButton(btnWWW, intProfile, fldWWW, "PHYSICAL_WWW", "return OpenWindow('ASSET_DEPLOY_HBAs','" + intAsset.ToString() + "');");
                        }
                    }
                    else
                    {
                        if (Request.QueryString["t"] != null && Request.QueryString["q"] != null)
                        {
                            Response.Redirect("/datapoint/asset/datapoint_asset_search.aspx?t=" + Request.QueryString["t"] + "&q=" + Request.QueryString["q"] + "&r=0");
                        }
                        else
                        {
                            Response.Redirect("/datapoint/asset/datapoint_asset_search.aspx");
                        }
                    }
                }
                else
                {
                    Response.Redirect("/datapoint/asset/datapoint_asset_search.aspx");
                }
                btnClose.Attributes.Add("onclick", "window.close();return false;");
                btnPrint.Attributes.Add("onclick", "window.print();return false;");
                btnDeploy.Attributes.Add("onclick", oDataPoint.LoadValidation());
                ddlPlatformClass.Attributes.Add("onchange", "PopulateEnvironments('" + ddlPlatformClass.ClientID + "','" + ddlPlatformEnvironment.ClientID + "',0);");
                ddlPlatformEnvironment.Attributes.Add("onchange", "UpdateDropDownHidden('" + ddlPlatformEnvironment.ClientID + "','" + hdnEnvironment.ClientID + "');");
            }
            else
            {
                panDenied.Visible = true;
            }
        }
Beispiel #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();
        }