private void LoadLists() { DataSet ds = oPlatform.GetAssets(1); ddlPlatform.DataValueField = "platformid"; ddlPlatform.DataTextField = "name"; ddlPlatform.DataSource = ds; ddlPlatform.DataBind(); ddlPlatform.Items.Insert(0, new ListItem("-- SELECT --", "0")); if (Request.QueryString["pid"] != null && Request.QueryString["pid"] != "") { intPlatform = Int32.Parse(Request.QueryString["pid"]); } if (oPlatform.Get(intPlatform).Tables[0].Rows.Count > 0) { ddlPlatform.SelectedValue = intPlatform.ToString(); panTypes.Visible = true; ds = oType.Gets(intPlatform, 1); ddlTypes.DataValueField = "id"; ddlTypes.DataTextField = "name"; ddlTypes.DataSource = ds; ddlTypes.DataBind(); ddlTypes.Items.Insert(0, new ListItem("-- SELECT --", "0")); if (Request.QueryString["tid"] != null && Request.QueryString["tid"] != "") { intType = Int32.Parse(Request.QueryString["tid"]); } if (oType.Get(intType).Tables[0].Rows.Count > 0) { panPath.Visible = true; ddlTypes.SelectedValue = intType.ToString(); } } }
private void LoadLists() { DataSet ds = oPlatform.GetAssets(1); ddlPlatform.DataValueField = "platformid"; ddlPlatform.DataTextField = "name"; ddlPlatform.DataSource = ds; ddlPlatform.DataBind(); ddlPlatform.Items.Insert(0, new ListItem("-- SELECT --", "0")); int intPlatform = 0; if (Request.QueryString["pid"] != null && Request.QueryString["pid"] != "") { intPlatform = Int32.Parse(Request.QueryString["pid"]); } if (oPlatform.Get(intPlatform).Tables[0].Rows.Count > 0) { string strPath = oPlatform.Get(intPlatform, "asset_checkin_path"); if (strPath != "") { PHImport.Controls.Add((Control)LoadControl(strPath)); } ddlPlatform.SelectedValue = intPlatform.ToString(); panTypes.Visible = true; ds = oType.Gets(intPlatform, 1); ddlTypes.DataValueField = "id"; ddlTypes.DataTextField = "name"; ddlTypes.DataSource = ds; ddlTypes.DataBind(); ddlTypes.Items.Insert(0, new ListItem("-- SELECT --", "0")); int intType = 0; if (Request.QueryString["tid"] != null && Request.QueryString["tid"] != "") { intType = Int32.Parse(Request.QueryString["tid"]); } if (oType.Get(intType).Tables[0].Rows.Count > 0) { panPath.Visible = true; ddlTypes.SelectedValue = intType.ToString(); strPath = oType.Get(intType, "asset_checkin_path"); if (strPath != "") { PHControl.Controls.Add((Control)LoadControl(strPath)); } else { panNoPath.Visible = true; } } } }
private void LoadLists() { //Menu int intMenuTab = 0; if (Request.QueryString["menu_tab"] != null && Request.QueryString["menu_tab"] != "") { intMenuTab = Int32.Parse(Request.QueryString["menu_tab"]); } Tab oTab = new Tab(hdnType.ClientID, intMenuTab, "divMenu1", true, false); //End Menu ddlPlatform.DataValueField = "platformid"; ddlPlatform.DataTextField = "name"; ddlPlatform.DataSource = oPlatform.GetAssets(1); ddlPlatform.DataBind(); ddlPlatform.Items.Insert(0, new ListItem("-- SELECT --", "0")); ddlPlatformDepot.DataValueField = "platformid"; ddlPlatformDepot.DataTextField = "name"; ddlPlatformDepot.DataSource = oPlatform.GetAssets(1); ddlPlatformDepot.DataBind(); ddlPlatformDepot.Items.Insert(0, new ListItem("-- SELECT --", "0")); ddlPlatformClass.DataValueField = "platformid"; ddlPlatformClass.DataTextField = "name"; ddlPlatformClass.DataSource = oPlatform.GetAssets(1); ddlPlatformClass.DataBind(); ddlPlatformClass.Items.Insert(0, new ListItem("-- SELECT --", "0")); int intPlatform = 0; if (Request.QueryString["pid"] != null && Request.QueryString["pid"] != "") { intPlatform = Int32.Parse(Request.QueryString["pid"]); } if (oPlatform.Get(intPlatform).Tables[0].Rows.Count > 0) { ddlPlatform.SelectedValue = intPlatform.ToString(); ddlPlatformDepot.SelectedValue = intPlatform.ToString(); ddlPlatformClass.SelectedValue = intPlatform.ToString(); // Types ddlTypes.DataValueField = "id"; ddlTypes.DataTextField = "name"; ddlTypes.DataSource = oType.Gets(intPlatform, 1); ddlTypes.DataBind(); ddlTypes.Items.Insert(0, new ListItem("-- ALL --", "0")); // Classes ddlClass.DataValueField = "id"; ddlClass.DataTextField = "name"; ddlClass.DataSource = oClasses.Gets(1); ddlClass.DataBind(); ddlClass.Items.Insert(0, new ListItem("-- SELECT --", "0")); int intClass = 0; if (Request.QueryString["cid"] != null && Request.QueryString["cid"] != "") { intClass = Int32.Parse(Request.QueryString["cid"]); } if (oClasses.Get(intClass).Tables[0].Rows.Count > 0) { ddlClass.SelectedValue = intClass.ToString(); ddlEnvironment.DataValueField = "id"; ddlEnvironment.DataTextField = "name"; ddlEnvironment.DataSource = oClasses.GetEnvironment(intClass, 0); ddlEnvironment.DataBind(); ddlEnvironment.Items.Insert(0, new ListItem("-- ALL --", "0")); } else { ddlEnvironment.Items.Insert(0, new ListItem("-- SELECT --", "0")); ddlEnvironment.Enabled = false; } // Depot ddlDepot.DataValueField = "id"; ddlDepot.DataTextField = "name"; ddlDepot.DataSource = oDepot.Gets(1); ddlDepot.DataBind(); ddlDepot.Items.Insert(0, new ListItem("-- SELECT --", "0")); int intType = 0; if (Request.QueryString["tid"] != null && Request.QueryString["tid"] != "") { intType = Int32.Parse(Request.QueryString["tid"]); } if (oType.Get(intType).Tables[0].Rows.Count > 0) { ddlTypes.SelectedValue = intType.ToString(); ddlModel.DataValueField = "id"; ddlModel.DataTextField = "name"; ddlModel.DataSource = oModel.Gets(intType, 1); ddlModel.DataBind(); ddlModel.Items.Insert(0, new ListItem("-- ALL --", "0")); } else { ddlModel.Items.Insert(0, new ListItem("-- ALL --", "0")); ddlModel.Enabled = false; } } else { ddlTypes.Items.Insert(0, new ListItem("-- SELECT --", "0")); ddlTypes.Enabled = false; ddlModel.Items.Insert(0, new ListItem("-- SELECT --", "0")); ddlModel.Enabled = false; ddlDepot.Items.Insert(0, new ListItem("-- SELECT --", "0")); ddlDepot.Enabled = false; ddlClass.Items.Insert(0, new ListItem("-- SELECT --", "0")); ddlClass.Enabled = false; ddlEnvironment.Items.Insert(0, new ListItem("-- SELECT --", "0")); ddlEnvironment.Enabled = false; } //if (boolClass == false && boolType == false && boolDepot == false) //{ // boolName = true; // hdnType.Value = "N"; //strMenuTab1 += "<td><img src=\"/images/TabOnLeftCap.gif\"></td><td nowrap background=\"/images/TabOnBackground.gif\"><a href=\"javascript:void(0);\" onclick=\"ChangeTab(this,'divTab1','" + hdnType.ClientID + "','N',true);\" class=\"tabheader\">Search By Name / Serial / Asset</a></td><td><img src=\"/images/TabOnRightCap.gif\"></td>"; //strMenuTab1 += "<td><img src=\"/images/TabOffLeftCap.gif\"></td><td nowrap background=\"/images/TabOffBackground.gif\"><a href=\"javascript:void(0);\" onclick=\"ChangeTab(this,'divTab2','" + hdnType.ClientID + "','C',true);\" class=\"tabheader\">Search By Class / Environment</a></td><td><img src=\"/images/TabOffRightCap.gif\"></td>"; //strMenuTab1 += "<td><img src=\"/images/TabOffLeftCap.gif\"></td><td nowrap background=\"/images/TabOffBackground.gif\"><a href=\"javascript:void(0);\" onclick=\"ChangeTab(this,'divTab3','" + hdnType.ClientID + "','T',true);\" class=\"tabheader\">Search By Type / Model</a></td><td><img src=\"/images/TabOffRightCap.gif\"></td>"; //strMenuTab1 += "<td><img src=\"/images/TabOffLeftCap.gif\"></td><td nowrap background=\"/images/TabOffBackground.gif\"><a href=\"javascript:void(0);\" onclick=\"ChangeTab(this,'divTab4','" + hdnType.ClientID + "','D',true);\" class=\"tabheader\">Search By Depot</a></td><td><img src=\"/images/TabOffRightCap.gif\"></td>"; oTab.AddTab("Search By Name / Serial / Asset", ""); oTab.AddTab("Search By Class / Environment", ""); oTab.AddTab("Search By Type / Model", ""); oTab.AddTab("Search By Depot", ""); //} //else //{ // //strMenuTab1 += "<td><img src=\"/images/TabOffLeftCap.gif\"></td><td nowrap background=\"/images/TabOffBackground.gif\"><a href=\"javascript:void(0);\" onclick=\"ChangeTab(this,'divTab1','" + hdnType.ClientID + "','N',true);\" class=\"tabheader\">Search By Name / Serial / Asset</a></td><td><img src=\"/images/TabOffRightCap.gif\"></td>"; // oTab.AddTab("Search By Name / Serial / Asset", ""); // if (boolClass == true) // //strMenuTab1 += "<td><img src=\"/images/TabOnLeftCap.gif\"></td><td nowrap background=\"/images/TabOnBackground.gif\"><a href=\"javascript:void(0);\" onclick=\"ChangeTab(this,'divTab2','" + hdnType.ClientID + "','C',true);\" class=\"tabheader\">Search By Class / Environment</a></td><td><img src=\"/images/TabOnRightCap.gif\"></td>"; // oTab.AddTab("Search By Class / Environment", ""); // else // //strMenuTab1 += "<td><img src=\"/images/TabOffLeftCap.gif\"></td><td nowrap background=\"/images/TabOffBackground.gif\"><a href=\"javascript:void(0);\" onclick=\"ChangeTab(this,'divTab2','" + hdnType.ClientID + "','C',true);\" class=\"tabheader\">Search By Class / Environment</a></td><td><img src=\"/images/TabOffRightCap.gif\"></td>"; // oTab.AddTab("Search By Class / Environment", ""); // if (boolType == true) // //strMenuTab1 += "<td><img src=\"/images/TabOnLeftCap.gif\"></td><td nowrap background=\"/images/TabOnBackground.gif\"><a href=\"javascript:void(0);\" onclick=\"ChangeTab(this,'divTab3','" + hdnType.ClientID + "','T',true);\" class=\"tabheader\">Search By Type / Model</a></td><td><img src=\"/images/TabOnRightCap.gif\"></td>"; // oTab.AddTab("Search By Type / Model", ""); // else // //strMenuTab1 += "<td><img src=\"/images/TabOffLeftCap.gif\"></td><td nowrap background=\"/images/TabOffBackground.gif\"><a href=\"javascript:void(0);\" onclick=\"ChangeTab(this,'divTab3','" + hdnType.ClientID + "','T',true);\" class=\"tabheader\">Search By Type / Model</a></td><td><img src=\"/images/TabOffRightCap.gif\"></td>"; // oTab.AddTab("Search By Type / Model", ""); // if (boolDepot == true) // //strMenuTab1 += "<td><img src=\"/images/TabOnLeftCap.gif\"></td><td nowrap background=\"/images/TabOnBackground.gif\"><a href=\"javascript:void(0);\" onclick=\"ChangeTab(this,'divTab4','" + hdnType.ClientID + "','D',true);\" class=\"tabheader\">Search By Depot</a></td><td><img src=\"/images/TabOnRightCap.gif\"></td>"; // oTab.AddTab("Search By Depot", ""); // else // //strMenuTab1 += "<td><img src=\"/images/TabOffLeftCap.gif\"></td><td nowrap background=\"/images/TabOffBackground.gif\"><a href=\"javascript:void(0);\" onclick=\"ChangeTab(this,'divTab4','" + hdnType.ClientID + "','D',true);\" class=\"tabheader\">Search By Depot</a></td><td><img src=\"/images/TabOffRightCap.gif\"></td>"; // oTab.AddTab("Search By Depot", ""); //} strMenuTab1 = oTab.GetTabs(); }