コード例 #1
0
        private void SetupPage()
        {
            string[]        familyArray;
            string[]        groupArray;
            List <SETTINGS> settings = SQMSettings.SelectSettingsGroupExposed("", "");

            // select all of the Families
            familyArray = settings.Select(s => s.SETTING_FAMILY).Distinct().ToArray();
            // Select all of the groups for the default family
            if (familyArray.Count() > 0)
            {
                ddlSettingFamily.DataSource = familyArray;
                ddlSettingFamily.DataBind();

                groupArray = settings.Where(s => s.SETTING_FAMILY == familyArray[0]).Select(s => s.SETTING_GROUP).Distinct().ToArray();
                ddlSettingGroup.DataSource = groupArray;
                ddlSettingGroup.DataBind();

                if (groupArray.Count() > 0)
                {
                    // we need to populate the repeater
                    List <SETTINGS> set = SQMSettings.SelectSettingsGroupExposed(groupArray[0], familyArray[0]);
                    rptSettingList.DataSource = set;
                    rptSettingList.DataBind();
                }
            }
            ClearPage();
        }
コード例 #2
0
        protected void btnSettingSearch_Click(object sender, EventArgs e)
        {
            // we need to populate the repeater
            List <SETTINGS> set = SQMSettings.SelectSettingsGroupExposed(ddlSettingGroup.SelectedValue.ToString(), ddlSettingFamily.SelectedValue.ToString());

            rptSettingList.DataSource = set;
            rptSettingList.DataBind();
        }
コード例 #3
0
        protected void ddlSettingFamily_SelectedIndexChanged(object sender, EventArgs e)
        {
            string[]        groupArray;
            List <SETTINGS> settings = SQMSettings.SelectSettingsGroupExposed("", ddlSettingFamily.SelectedValue.ToString());

            groupArray = settings.Select(s => s.SETTING_GROUP).Distinct().ToArray();
            ddlSettingGroup.DataSource = groupArray;
            ddlSettingGroup.DataBind();

            //if (groupArray.Count() > 0)
            //{
            //	// we need to populate the repeater
            //	List<SETTINGS> set = SQMSettings.SelectSettingsGroup(groupArray[0], "");
            //	rptSettingList.DataSource = set;
            //	rptSettingList.DataBind();
            //}
        }
コード例 #4
0
        private void uclSearchBar_OnSaveClick()
        {
            lblErrorUpdating.Visible    = false;
            lblConfirmMustMatch.Visible = false;
            if (hdnEncrypt.Value.ToString().Equals("True") && !tbValue.Text.ToString().Equals(tbValueConfirm.Text.ToString()))
            {
                lblConfirmMustMatch.Visible = true;
                return;
            }
            bool success = SaveSettings(true);

            if (success)
            {
                ClearPage();
                List <SETTINGS> set = SQMSettings.SelectSettingsGroupExposed(ddlSettingGroup.SelectedValue.ToString(), ddlSettingFamily.SelectedValue.ToString());
                rptSettingList.DataSource = set;
                rptSettingList.DataBind();
            }
            else
            {
                lblErrorUpdating.Visible = true;
            }
        }