protected void btn_DebuggingSave_Click(object sender, EventArgs e)
 {
     ConfigAccess config = new ConfigAccess();
     config.SetAppSetting(ConfigAccess.APPSETTINGKEY_EnableDebuggingOn, (cb_EnableDebuggingOn.Checked ? Constants.Yes : Constants.No).ToString());
     if (cb_EnableDebuggingOn.Checked)
     {
         config.SetAppSetting(ConfigAccess.APPSETTINGKEY_DebuggingUserName, txt_DebuggUserName.Value.Trim());
         config.SetAppSetting(ConfigAccess.APPSETTINGKEY_DebuggingPassword, txt_DebuggPassword.Value.Trim());
     }
     txt_DebuggUserName.Disabled = !cb_EnableDebuggingOn.Checked;
     txt_DebuggPassword.Disabled = !cb_EnableDebuggingOn.Checked;
 }
Exemple #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         ConfigAccess oCinfig = new ConfigAccess();
         string strIsEnable = oCinfig.GetAppSetting(ConfigAccess.APPSETTINGKEY_EnableDebuggingOn);
         if (strIsEnable == Constants.Yes.ToString())
         {
             txt_UserName.Value = oCinfig.GetAppSetting(ConfigAccess.APPSETTINGKEY_DebuggingUserName);
             txt_Password.Value = oCinfig.GetAppSetting(ConfigAccess.APPSETTINGKEY_DebuggingPassword);
             btnLogin_Click(null, null);
         }
     }
 }
 private void _InitDebuggingTab()
 {
     ConfigAccess config = new ConfigAccess();
     string strIsEnable = config.GetAppSetting(ConfigAccess.APPSETTINGKEY_EnableDebuggingOn);
     cb_EnableDebuggingOn.Checked = strIsEnable == Constants.Yes.ToString();
     if (cb_EnableDebuggingOn.Checked)
     {
         txt_DebuggUserName.Value = config.GetAppSetting(ConfigAccess.APPSETTINGKEY_DebuggingUserName);
         txt_DebuggPassword.Value = config.GetAppSetting(ConfigAccess.APPSETTINGKEY_DebuggingPassword);
     }
     txt_DebuggUserName.Disabled = !cb_EnableDebuggingOn.Checked;
     txt_DebuggPassword.Disabled = !cb_EnableDebuggingOn.Checked;
 }