protected void dxMenu_OnItemDataBound(object sender, MenuItemEventArgs e) { var itm = e.Item; SQL_utils sql = new SQL_utils("backend"); int mastertitleID = sql.IntScalar_from_SQLstring("select mastertitleID from vwStudyMastertitle where studyID = " + Master_studyID.ToString()); sql.Close(); List <string> nodes_to_hide = new List <string>(); if (mastertitleID != 1) { nodes_to_hide.AddRange(new List <string> { "Clinic", "Calendar", "Other ID's", "Bernier Lab", "Tadpole", "PATH", "IBIS", "ESS" , "Sleep Pilot", "(old) Data Projects", "IntHx Data Summary", "IntHx Tx Types & Categories", "Reliability Tracking" }); } if (mastertitleID != 2) { nodes_to_hide.Add("AVH"); } itm.Visible = (nodes_to_hide.Contains(itm.Text)) ? false : true; }
protected void SetTitles() { string title = ConfigurationManager.AppSettings["MasterTitle"]; string subtitle = ConfigurationManager.AppSettings["MasterSubtitle"]; //title += " [backend=" + ConfigurationManager.ConnectionStrings["TRACKING_CONN_STRING"] + "]"; SQL_utils sql = new SQL_utils("backend"); title = (Master_studyID > 0) ? sql.StringScalar_from_SQLstring("select coalesce(mastertitle, 'UWAC DB') mastertitle from vwStudyMastertitle where studyID=" + Master_studyID.ToString()) : "UWAC DB (no default study selected)"; placeholderMasterTitle.Controls.Clear(); Literal litTitle = new Literal { Text = title }; Label lblSubtitle = new Label { Text = String.Format(" {0}", subtitle), ForeColor = System.Drawing.Color.Gray }; placeholderMasterTitle.Controls.Add(litTitle); placeholderMasterTitle.Controls.Add(lblSubtitle); sql.Close(); }