private void PopulateTree(int _parent, TreeView oTree)
        {
            DataSet ds = oTSM.Gets(1);

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                TreeNode oNode = new TreeNode();
                oNode.Text         = dr["name"].ToString();
                oNode.ToolTip      = dr["name"].ToString();
                oNode.SelectAction = TreeNodeSelectAction.Expand;
                oTree.Nodes.Add(oNode);
                PopulateTree(Int32.Parse(dr["id"].ToString()), oNode);
            }
        }
        private void PopulateTree(int _parent, TreeView oTree, TreeNode oParent)
        {
            DataSet ds = oTSM.Gets(1);

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                TreeNode oNode = new TreeNode();
                oNode.Text        = dr["name"].ToString();
                oNode.ToolTip     = dr["name"].ToString();
                oNode.NavigateUrl = "javascript:Select(" + dr["id"].ToString() + ",'" + hdnId.ClientID + "','" + dr["name"].ToString() + "','" + txtName.ClientID + "');";
                oTree.Nodes.Add(oNode);
                if (dr["id"].ToString() == lblId.Text)
                {
                    oSelected    = oNode;
                    txtName.Text = dr["name"].ToString();
                }
            }
        }
Ejemplo n.º 3
0
 protected void btnServerAdd_Click(Object Sender, EventArgs e)
 {
     oTSM.Add(txtServerName.Text, Int32.Parse(txtServerPort.Text), Int32.Parse(Request.Form[hdnLocation.UniqueID]), SaveFile(), 1, 0, oTSM.Gets(1, 0, 1).Tables[0].Rows.Count + 1, (chkServerEnabled.Checked ? 1 : 0));
     Redirect("saved=true");
 }
Ejemplo n.º 4
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();
        }
Ejemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            intProfile  = Int32.Parse(Request.Cookies["profileid"].Value);
            oPage       = new Pages(intProfile, dsn);
            oUser       = new Users(intProfile, dsn);
            oServer     = new Servers(intProfile, dsn);
            oTSM        = new TSM(intProfile, dsn);
            oMnemonic   = new Mnemonic(intProfile, dsn);
            oLocation   = new Locations(intProfile, dsn);
            oResiliency = new Resiliency(intProfile, dsn);
            oFunctions  = new Functions(intProfile, dsn, intEnvironment);
            if (Request.QueryString["applicationid"] != null && Request.QueryString["applicationid"] != "")
            {
                intApplication = Int32.Parse(Request.QueryString["applicationid"]);
            }
            if (Request.QueryString["pageid"] != null && Request.QueryString["pageid"] != "")
            {
                intPage = Int32.Parse(Request.QueryString["pageid"]);
            }
            if (Request.Cookies["application"] != null && Request.Cookies["application"].Value != "")
            {
                intApplication = Int32.Parse(Request.Cookies["application"].Value);
            }
            if (Request.QueryString["saved"] != null)
            {
                lblMessage.Text = oFunctions.BuildBox("/images/ico_check.gif", "Information Saved", "Your change has been saved successfully!", "box_green header");
            }
            if (Request.QueryString["deleted"] != null)
            {
                lblMessage.Text = oFunctions.BuildBox("/images/ico_check.gif", "Record Deleted", "The record has been deleted successfully!", "box_green header");
            }
            if (Request.QueryString["server"] != null && Request.QueryString["server"] != "")
            {
                intServer       = Int32.Parse(Request.QueryString["server"]);
                lblCrumbs.Text += "<a href=\"" + oPage.GetFullLink(intPage) + FormURL("") + "\">Back to Home</a>";
                if (Request.QueryString["mnemonic"] != null && Request.QueryString["mnemonic"] != "")
                {
                    panMnemonic.Visible = true;
                    Int32.TryParse(Request.QueryString["mnemonic"], out intMnemonic);
                    if (!IsPostBack)
                    {
                        DataSet ds = oTSM.GetMnemonic(intMnemonic);
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            int intMnemonicID = Int32.Parse(ds.Tables[0].Rows[0]["mnemonicid"].ToString());
                            hdnMnemonic.Value          = intMnemonicID.ToString();
                            txtMnemonic.Text           = oMnemonic.Get(intMnemonicID, "factory_code") + " - " + oMnemonic.Get(intMnemonicID, "name");
                            chkMnemonicEnabled.Checked = (ds.Tables[0].Rows[0]["enabled"].ToString() == "1");
                            btnMnemonicUpdate.Visible  = true;
                            btnMnemonicUpdate.Attributes.Add("onclick", "return ValidateHidden0('" + hdnMnemonic.ClientID + "','" + txtMnemonic.ClientID + "','Please enter a mnemonic\\n\\n(Start typing and a list will be presented...)')" +
                                                             " && ProcessButton(this)" +
                                                             ";");
                            btnMnemonicDelete.Visible = true;
                            btnMnemonicDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this item') && ProcessButton(this);");
                        }
                        else
                        {
                            btnMnemonicAdd.Visible = true;
                            btnMnemonicAdd.Attributes.Add("onclick", "return ValidateHidden0('" + hdnMnemonic.ClientID + "','" + txtMnemonic.ClientID + "','Please enter a mnemonic\\n\\n(Start typing and a list will be presented...)')" +
                                                          " && ProcessButton(this)" +
                                                          ";");
                        }
                        btnMnemonicCancel.Attributes.Add("onclick", "return ProcessButton(this);");
                    }
                }
                else if (Request.QueryString["domain"] != null && Request.QueryString["domain"] != "")
                {
                    intDomain       = Int32.Parse(Request.QueryString["domain"]);
                    lblCrumbs.Text += strSpacer + "<a href=\"" + oPage.GetFullLink(intPage) + FormURL("server=" + intServer.ToString()) + "\">" + oTSM.Get(intServer, "name") + "</a>";
                    if (Request.QueryString["schedule"] != null && Request.QueryString["schedule"] != "")
                    {
                        intSchedule         = Int32.Parse(Request.QueryString["schedule"]);
                        lblCrumbs.Text     += strSpacer + "<a href=\"" + oPage.GetFullLink(intPage) + FormURL("server=" + intServer.ToString() + "&domain=" + intDomain.ToString()) + "\">" + oTSM.GetDomain(intDomain, "name") + "</a>";
                        panSchedule.Visible = true;
                        if (!IsPostBack)
                        {
                            DataSet ds = oTSM.GetSchedule(intSchedule);
                            if (ds.Tables[0].Rows.Count > 0)
                            {
                                lblCrumbs.Text                += strSpacer + oTSM.GetSchedule(intSchedule, "name");
                                txtScheduleName.Text           = ds.Tables[0].Rows[0]["name"].ToString();
                                chkScheduleEngineering.Checked = (ds.Tables[0].Rows[0]["engineering"].ToString() == "1");
                                chkScheduleTest.Checked        = (ds.Tables[0].Rows[0]["test"].ToString() == "1");
                                chkScheduleQA.Checked          = (ds.Tables[0].Rows[0]["qa"].ToString() == "1");
                                chkScheduleProduction.Checked  = (ds.Tables[0].Rows[0]["prod"].ToString() == "1");
                                chkScheduleWindows.Checked     = (ds.Tables[0].Rows[0]["windows"].ToString() == "1");
                                chkScheduleUnix.Checked        = (ds.Tables[0].Rows[0]["unix"].ToString() == "1");
                                chkScheduleDaily.Checked       = (ds.Tables[0].Rows[0]["daily"].ToString() == "1");
                                chkScheduleWeekly.Checked      = (ds.Tables[0].Rows[0]["weekly"].ToString() == "1");
                                if (chkScheduleWeekly.Checked == true)
                                {
                                    divScheduleWeekly.Style["display"] = "inline";
                                }
                                ddlScheduleResiliency.SelectedValue = ds.Tables[0].Rows[0]["resiliencyid"].ToString();
                                chkScheduleWeeklySunday.Checked     = (ds.Tables[0].Rows[0]["sunday"].ToString() == "1");
                                chkScheduleWeeklyMonday.Checked     = (ds.Tables[0].Rows[0]["monday"].ToString() == "1");
                                chkScheduleWeeklyTuesday.Checked    = (ds.Tables[0].Rows[0]["tuesday"].ToString() == "1");
                                chkScheduleWeeklyWednesday.Checked  = (ds.Tables[0].Rows[0]["wednesday"].ToString() == "1");
                                chkScheduleWeeklyThursday.Checked   = (ds.Tables[0].Rows[0]["thursday"].ToString() == "1");
                                chkScheduleWeeklyFriday.Checked     = (ds.Tables[0].Rows[0]["friday"].ToString() == "1");
                                chkScheduleWeeklySaturday.Checked   = (ds.Tables[0].Rows[0]["saturday"].ToString() == "1");
                                chkScheduleMonthly.Checked          = (ds.Tables[0].Rows[0]["monthly"].ToString() == "1");
                                chk1200AM.Checked          = (ds.Tables[0].Rows[0]["AM1200"].ToString() == "1");
                                chk1230AM.Checked          = (ds.Tables[0].Rows[0]["AM1230"].ToString() == "1");
                                chk100AM.Checked           = (ds.Tables[0].Rows[0]["AM100"].ToString() == "1");
                                chk130AM.Checked           = (ds.Tables[0].Rows[0]["AM130"].ToString() == "1");
                                chk200AM.Checked           = (ds.Tables[0].Rows[0]["AM200"].ToString() == "1");
                                chk230AM.Checked           = (ds.Tables[0].Rows[0]["AM230"].ToString() == "1");
                                chk300AM.Checked           = (ds.Tables[0].Rows[0]["AM300"].ToString() == "1");
                                chk330AM.Checked           = (ds.Tables[0].Rows[0]["AM330"].ToString() == "1");
                                chk400AM.Checked           = (ds.Tables[0].Rows[0]["AM400"].ToString() == "1");
                                chk430AM.Checked           = (ds.Tables[0].Rows[0]["AM430"].ToString() == "1");
                                chk500AM.Checked           = (ds.Tables[0].Rows[0]["AM500"].ToString() == "1");
                                chk530AM.Checked           = (ds.Tables[0].Rows[0]["AM530"].ToString() == "1");
                                chk600AM.Checked           = (ds.Tables[0].Rows[0]["AM600"].ToString() == "1");
                                chk630AM.Checked           = (ds.Tables[0].Rows[0]["AM630"].ToString() == "1");
                                chk700AM.Checked           = (ds.Tables[0].Rows[0]["AM700"].ToString() == "1");
                                chk730AM.Checked           = (ds.Tables[0].Rows[0]["AM730"].ToString() == "1");
                                chk800AM.Checked           = (ds.Tables[0].Rows[0]["AM800"].ToString() == "1");
                                chk830AM.Checked           = (ds.Tables[0].Rows[0]["AM830"].ToString() == "1");
                                chk900AM.Checked           = (ds.Tables[0].Rows[0]["AM900"].ToString() == "1");
                                chk930AM.Checked           = (ds.Tables[0].Rows[0]["AM930"].ToString() == "1");
                                chk1000AM.Checked          = (ds.Tables[0].Rows[0]["AM1000"].ToString() == "1");
                                chk1030AM.Checked          = (ds.Tables[0].Rows[0]["AM1030"].ToString() == "1");
                                chk1100AM.Checked          = (ds.Tables[0].Rows[0]["AM1100"].ToString() == "1");
                                chk1130AM.Checked          = (ds.Tables[0].Rows[0]["AM1130"].ToString() == "1");
                                chk1200PM.Checked          = (ds.Tables[0].Rows[0]["PM1200"].ToString() == "1");
                                chk1230PM.Checked          = (ds.Tables[0].Rows[0]["PM1230"].ToString() == "1");
                                chk100PM.Checked           = (ds.Tables[0].Rows[0]["PM100"].ToString() == "1");
                                chk130PM.Checked           = (ds.Tables[0].Rows[0]["PM130"].ToString() == "1");
                                chk200PM.Checked           = (ds.Tables[0].Rows[0]["PM200"].ToString() == "1");
                                chk230PM.Checked           = (ds.Tables[0].Rows[0]["PM230"].ToString() == "1");
                                chk300PM.Checked           = (ds.Tables[0].Rows[0]["PM300"].ToString() == "1");
                                chk330PM.Checked           = (ds.Tables[0].Rows[0]["PM330"].ToString() == "1");
                                chk400PM.Checked           = (ds.Tables[0].Rows[0]["PM400"].ToString() == "1");
                                chk430PM.Checked           = (ds.Tables[0].Rows[0]["PM430"].ToString() == "1");
                                chk500PM.Checked           = (ds.Tables[0].Rows[0]["PM500"].ToString() == "1");
                                chk530PM.Checked           = (ds.Tables[0].Rows[0]["PM530"].ToString() == "1");
                                chk600PM.Checked           = (ds.Tables[0].Rows[0]["PM600"].ToString() == "1");
                                chk630PM.Checked           = (ds.Tables[0].Rows[0]["PM630"].ToString() == "1");
                                chk700PM.Checked           = (ds.Tables[0].Rows[0]["PM700"].ToString() == "1");
                                chk730PM.Checked           = (ds.Tables[0].Rows[0]["PM730"].ToString() == "1");
                                chk800PM.Checked           = (ds.Tables[0].Rows[0]["PM800"].ToString() == "1");
                                chk830PM.Checked           = (ds.Tables[0].Rows[0]["PM830"].ToString() == "1");
                                chk900PM.Checked           = (ds.Tables[0].Rows[0]["PM900"].ToString() == "1");
                                chk930PM.Checked           = (ds.Tables[0].Rows[0]["PM930"].ToString() == "1");
                                chk1000PM.Checked          = (ds.Tables[0].Rows[0]["PM1000"].ToString() == "1");
                                chk1030PM.Checked          = (ds.Tables[0].Rows[0]["PM1030"].ToString() == "1");
                                chk1100PM.Checked          = (ds.Tables[0].Rows[0]["PM1100"].ToString() == "1");
                                chk1130PM.Checked          = (ds.Tables[0].Rows[0]["PM1130"].ToString() == "1");
                                chkScheduleEnabled.Checked = (ds.Tables[0].Rows[0]["enabled"].ToString() == "1");
                                btnScheduleUpdate.Visible  = true;
                                btnScheduleUpdate.Attributes.Add("onclick", "return ValidateText('" + txtScheduleName.ClientID + "','Please enter a name for this schedule')" +
                                                                 " && ProcessButton(this)" +
                                                                 ";");
                                btnScheduleDelete.Visible = true;
                                btnScheduleDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this schedule')" +
                                                                 " && ProcessButton(this)" +
                                                                 ";");
                            }
                            else
                            {
                                btnScheduleAdd.Visible = true;
                                btnScheduleAdd.Attributes.Add("onclick", "return ValidateText('" + txtScheduleName.ClientID + "','Please enter a name for this schedule')" +
                                                              " && ProcessButton(this)" +
                                                              ";");
                            }
                            btnScheduleCancel.Attributes.Add("onclick", "return ProcessButton(this);");
                            chkScheduleWeekly.Attributes.Add("onclick", "ShowHideDiv2('" + divScheduleWeekly.ClientID + "');");
                        }
                    }
                    else
                    {
                        panDomain.Visible = true;
                        DataSet  dsSchedules = oTSM.GetSchedules(intDomain, 0);
                        DataView dvSchedules = dsSchedules.Tables[0].DefaultView;
                        if (Request.QueryString["sort"] != null)
                        {
                            dvSchedules.Sort = Request.QueryString["sort"];
                        }
                        else
                        {
                            dvSchedules.Sort = "name";
                        }
                        rptSchedules.DataSource = dvSchedules;
                        rptSchedules.DataBind();
                        lblSchedules.Visible = (rptSchedules.Items.Count == 0);
                        if (!IsPostBack)
                        {
                            LoadLists();
                            DataSet ds = oTSM.GetDomain(intDomain);
                            if (ds.Tables[0].Rows.Count > 0)
                            {
                                lblCrumbs.Text                   += strSpacer + oTSM.GetDomain(intDomain, "name");
                                txtDomainName.Text                = ds.Tables[0].Rows[0]["name"].ToString();
                                chkDomainEngineering.Checked      = (ds.Tables[0].Rows[0]["engineering"].ToString() == "1");
                                chkDomainTest.Checked             = (ds.Tables[0].Rows[0]["test"].ToString() == "1");
                                chkDomainQA.Checked               = (ds.Tables[0].Rows[0]["qa"].ToString() == "1");
                                chkDomainProduction.Checked       = (ds.Tables[0].Rows[0]["prod"].ToString() == "1");
                                chkDomainWindows.Checked          = (ds.Tables[0].Rows[0]["windows"].ToString() == "1");
                                chkDomainUnix.Checked             = (ds.Tables[0].Rows[0]["unix"].ToString() == "1");
                                ddlDomainResiliency.SelectedValue = ds.Tables[0].Rows[0]["resiliencyid"].ToString();
                                chkDomainEnabled.Checked          = (ds.Tables[0].Rows[0]["enabled"].ToString() == "1");
                                btnDomainUpdate.Visible           = true;
                                btnDomainUpdate.Attributes.Add("onclick", "return ValidateText('" + txtDomainName.ClientID + "','Please enter a name for this domain')" +
                                                               " && ValidateDropDown('" + ddlDomainResiliency.ClientID + "','Please select a Resiliency')" +
                                                               " && ProcessButton(this)" +
                                                               ";");
                                btnDomainDelete.Visible = true;
                                btnDomainDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this domain')" +
                                                               " && ProcessButton(this)" +
                                                               ";");
                            }
                            else
                            {
                                btnDomainAdd.Visible = true;
                                btnDomainAdd.Attributes.Add("onclick", "return ValidateText('" + txtDomainName.ClientID + "','Please enter a name for this domain')" +
                                                            " && ValidateDropDown('" + ddlDomainResiliency.ClientID + "','Please select a Resiliency')" +
                                                            " && ProcessButton(this)" +
                                                            ";");
                                btnAddSchedule.Enabled = false;
                            }
                            btnDomainCancel.Attributes.Add("onclick", "return ProcessButton(this);");
                        }
                    }
                }
                else
                {
                    panServer.Visible = true;
                    DataSet  dsDomains = oTSM.GetDomains(intServer, 0);
                    DataView dvDomains = dsDomains.Tables[0].DefaultView;
                    if (Request.QueryString["sort"] != null)
                    {
                        dvDomains.Sort = Request.QueryString["sort"];
                    }
                    else
                    {
                        dvDomains.Sort = "name";
                    }
                    rptDomains.DataSource = dvDomains;
                    rptDomains.DataBind();
                    lblDomains.Visible = (rptDomains.Items.Count == 0);
                    // Mnemonics
                    rptMnemonics.DataSource = oTSM.GetMnemonics(intServer, 0);
                    rptMnemonics.DataBind();
                    lblMnemonics.Visible = (rptMnemonics.Items.Count == 0);
                    if (!IsPostBack)
                    {
                        int     intLocation = Int32.Parse(ConfigurationManager.AppSettings["OPSLocationID"]);
                        DataSet ds          = oTSM.Get(intServer);
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            lblCrumbs.Text    += strSpacer + oTSM.Get(intServer, "name");
                            txtServerName.Text = ds.Tables[0].Rows[0]["name"].ToString();
                            txtServerPort.Text = ds.Tables[0].Rows[0]["port"].ToString();
                            Int32.TryParse(ds.Tables[0].Rows[0]["addressid"].ToString(), out intLocation);
                            txtServerPath.Text = ds.Tables[0].Rows[0]["path"].ToString();
                            if (txtServerPath.Text != "")
                            {
                                hypServerPath.NavigateUrl = txtServerPath.Text;
                            }
                            else
                            {
                                hypServerPath.Enabled = false;
                            }
                            chkServerEnabled.Checked = (ds.Tables[0].Rows[0]["enabled"].ToString() == "1");
                            btnServerUpdate.Visible  = true;
                            btnServerUpdate.Attributes.Add("onclick", "return ValidateText('" + txtServerName.ClientID + "','Please enter a name for this server')" +
                                                           " && ValidateNumber0('" + txtServerPort.ClientID + "','Please enter a port number')" +
                                                           " && ProcessButton(this)" +
                                                           ";");
                            btnServerDelete.Visible = true;
                            btnServerDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this server')" +
                                                           " && ProcessButton(this)" +
                                                           ";");
                        }
                        else
                        {
                            btnServerAdd.Visible = true;
                            btnServerAdd.Attributes.Add("onclick", "return ValidateText('" + txtServerName.ClientID + "','Please enter a name for this server')" +
                                                        " && ValidateNumber0('" + txtServerPort.ClientID + "','Please enter a port number')" +
                                                        " && ProcessButton(this)" +
                                                        ";");
                            btnAddDomain.Enabled   = false;
                            btnAddMnemonic.Enabled = false;
                        }
                        btnServerCancel.Attributes.Add("onclick", "return ProcessButton(this);");
                        strLocation       = oLocation.LoadDDL("ddlState", "ddlCity", "ddlAddress", hdnLocation.ClientID, intLocation, true, "ddlCommon");
                        hdnLocation.Value = intLocation.ToString();
                    }
                    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("Domains", "");
                    oTab.AddTab("Associated Mnemonics", "");
                    strMenuTab1 = oTab.GetTabs();
                }
            }
            else
            {
                panServers.Visible = true;
                DataSet  dsTSM = oTSM.Gets(1, 0, 0);
                DataView dvTSM = dsTSM.Tables[0].DefaultView;
                if (Request.QueryString["sort"] != null)
                {
                    dvTSM.Sort = Request.QueryString["sort"];
                }
                else
                {
                    dvTSM.Sort = "name";
                }
                rptServers.DataSource = dvTSM;
                rptServers.DataBind();
                lblServers.Visible = (rptServers.Items.Count == 0);
            }
            Variables oVariable = new Variables(intEnvironment);

            txtMnemonic.Attributes.Add("onkeyup", "return AJAXTextBoxGet(this,'500','195','" + divMnemonic.ClientID + "','" + lstMnemonic.ClientID + "','" + hdnMnemonic.ClientID + "','" + oVariable.URL() + "/frame/ajax/ajax_mnemonics.aspx',2);");
            lstMnemonic.Attributes.Add("ondblclick", "AJAXClickRow();");
            btnAddDomain.Attributes.Add("onclick", "return ProcessButton(this);");
            btnAddSchedule.Attributes.Add("onclick", "return ProcessButton(this);");
            btnAddServer.Attributes.Add("onclick", "return ProcessButton(this);");
        }