/// <summary> /// 确定 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void buttonControl1_Click(object sender, EventArgs e) { //System.Environment.Exit(0); if (this.treeHostile.EditValue.ToString() == "") { Xr.Common.MessageBoxUtils.Show("请选择医院", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1, null); return; } if (treeKeshi.EditValue.ToString() == "") { Xr.Common.MessageBoxUtils.Show("请选择科室", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1, null); return; } if (treeClinc.EditValue.ToString() == "") { Xr.Common.MessageBoxUtils.Show("请选择诊室", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1, null); return; } string WhetherToDisplay = ""; string WhetherToAssign = ""; string IsStart = ""; if (radioButton1.Checked) { WhetherToAssign = "true"; } else if (radioButton2.Checked) { WhetherToAssign = "false"; } if (radioButton3.Checked) { WhetherToDisplay = "true"; } else if (radioButton4.Checked) { WhetherToDisplay = "false"; } if (radioButton5.Checked) { IsStart = "true"; } else if (radioButton6.Checked) { IsStart = "false"; } SaveConfigSeting(treeHostile.EditValue.ToString(), treeClinc.Text.Trim(), treeKeshi.EditValue.ToString(), "1", WhetherToDisplay, WhetherToAssign, IsStart); UpdateClincQuery(treeClinc.EditValue.ToString(), "1"); System.Configuration.ConfigurationManager.RefreshSection("appSettings");//重新加载新的配置文件 if (this.txtDoctorCode.Text.Trim() == "") { EncryptionClass.NewAddText(""); } else { EncryptionClass.NewAddText(this.txtDoctorCode.Text.Trim()); } Xr.RtCall.Model.AppContext.Load(); Form1 ttf = new Form1(); this.Hide(); ttf.Show(); //Application.ExitThread(); //Application.Exit(); //Application.Restart(); //System.Diagnostics.Process.GetCurrentProcess().Kill(); }