示例#1
0
 private void ReadConfig_Click(object sender, EventArgs e)
 {
     AuthSystem.AuthModel.AMSystemConfig amsc = new AuthSystem.AuthModel.AMSystemConfig();
     ADConfig ac = new ADConfig();
     tb_Status.Text = ac.ReadConfig(out amsc);
     tb_Conn.Text = amsc.ConnectionString;
     tb_password.Text = amsc.LoginPassword;
     tb_Username.Text = amsc.LoginUserNames;
     cb_isSave.Checked = amsc.LoginSavePass;
 }
示例#2
0
 private void SaveConfig_Click(object sender, EventArgs e)
 {
     string tmpConnString = tb_Conn.Text;
     string tmpUsername = tb_Username.Text;
     string tmpPassword = tb_password.Text;
     bool tmpIsSave = cb_isSave.Checked;
     AuthSystem.AuthModel.AMSystemConfig amsc = new AuthSystem.AuthModel.AMSystemConfig();
     amsc.ConnectionString = tmpConnString;
     amsc.LoginUserNames = tmpUsername;
     amsc.LoginPassword = tmpPassword;
     amsc.LoginSavePass = tmpIsSave;
     ADConfig ac = new ADConfig();
     tb_Status.Text = ac.SaveConfig(amsc);
 }