Exemplo n.º 1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            bool   isValid = false;
            string s       = txtValue.Text;

            //switch(_settingType)
            //{
            //    case EnumSettingTypes.enumText:
            //        isValid = true;
            //        break;

            //    case EnumSettingTypes.enumInt:
            //        Int32 i = 0;
            //        isValid = Int32.TryParse(s, out i);
            //        break;

            //    case EnumSettingTypes.enumBool:
            //        bool b = false; ;
            //        isValid = bool.TryParse(s, out b);
            //        break;

            //    case EnumSettingTypes.enumUrl:
            //        isValid = true;
            //        break;

            //    default:
            //        break;

            //}


            isValid = true;

            if (isValid)
            {
                BllProxySettings.SetSetting(lblName.Text, hfSettingCategory.Value, txtValue.Text);
                lblMessage.Text = "Saved";
            }
            else
            {
            }
        }
 public void BindData(string categoryName)
 {
     SettingsDS.SettingsDSDataTable dt1 = BllProxySettings.GetAllSettings(categoryName);
     rptSettingsCtxServer.DataSource = dt1;
     rptSettingsCtxServer.DataBind();
 }