private void GridControl1_Click(Object sender, EventArgs e)
        {
            //  '得到列表中的记录表
            DataTable d_DTable = (DataTable)GridControl1.DataSource;
            // '得到当前访问号
            if (d_DTable == null)
            {
                 ShowErr_Form d_form = new ShowErr_Form("请先查出要操作的记录", "错误");
                d_form.ShowDialog();
                return;
            }

            if (d_DTable.Rows.Count == 0)
            {
                ShowErr_Form d_form = new ShowErr_Form("请先查出要操作的记录", "错误");
                d_form.ShowDialog();
                return;
            }

            // 'Dim d_accessno = d_DTable.Rows(patexam_GridView.GetDataSourceRowIndex(patexam_GridView.FocusedRowHandle)).Item("accessno").ToString
            int d_id = Convert.ToInt32(d_DTable.Rows[GridView1.GetDataSourceRowIndex(GridView1.FocusedRowHandle)]["id"]);
            CONSULT_DIAG_Class d_DG_CONSULT_DIAG = new CONSULT_DIAG_Class(d_id);
            if (d_DG_CONSULT_DIAG.id == 0)
            {
                ShowErr_Form d_form = new ShowErr_Form("请先选择列表中的记录", "错误");
                d_form.ShowDialog();
                return;
            }
            BL_HisText.Text = d_DG_CONSULT_DIAG.CONSULTATION_INFO;
            reportend_RichTextBox.Text = d_DG_CONSULT_DIAG.CONSULTATION_END;
            //   'If d_DG_CONSULT_DIAG.EXPERT_DOCTOR <> "" ){
            advancedoc_ComboBoxEdit.Text = d_DG_CONSULT_DIAG.EXPERT_DOCTOR;

            reportdate_DateEdit.Text = d_DG_CONSULT_DIAG.CONSULTATION_DATE.ToShortDateString();
        }
        private void FillGridControl()
        {

            CONSULT_DIAG_Class CurDG_CONSULT_DIAG = new CONSULT_DIAG_Class();
            DataSet DG_CONSULT_DIAG_Ds = new DataSet();
            DG_CONSULT_DIAG_Ds = CONSULT_DIAG_Class.GETEXPERT_DOCTOR(CurPatexam.accessno);
            if (DG_CONSULT_DIAG_Ds == null)
            {
                return;
            }
            string d_EXPERT_DOCTOR = "";
            string d_CONSULTATION_END = "";
            DataTable dt = new DataTable();
            DataTable dt2 = new DataTable();
            DataRow dr;
            DataRow dr2;
            dt.Columns.Add("id");
            dt.Columns.Add("doctor");
            dt2.Columns.Add("id");
            dt2.Columns.Add("doctor");
            dt2.Columns.Add("consult_status");
            if (DG_CONSULT_DIAG_Ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < DG_CONSULT_DIAG_Ds.Tables[0].Rows.Count; i++)
                {
                    d_EXPERT_DOCTOR = d_EXPERT_DOCTOR + DG_CONSULT_DIAG_Ds.Tables[0].Rows[i]["EXPERT_DOCTOR"].ToString().Trim() + ",";
                    dr = dt.NewRow();
                    dr[0] = i + 1;
                    dr[1] = DG_CONSULT_DIAG_Ds.Tables[0].Rows[i]["EXPERT_DOCTOR"].ToString().Trim();
                    dt.Rows.Add(dr);
                    dr2 = dt2.NewRow();
                    dr2[0] = DG_CONSULT_DIAG_Ds.Tables[0].Rows[i]["ID"];
                    dr2[1] = DG_CONSULT_DIAG_Ds.Tables[0].Rows[i]["EXPERT_DOCTOR"].ToString().Trim();
                    d_CONSULTATION_END = DG_CONSULT_DIAG_Ds.Tables[0].Rows[i]["CONSULTATION_END"].ToString().Trim();
                    if (d_CONSULTATION_END == "")
                        dr2[2] = "否";
                    else
                        dr2[2] = "是";

                    dt2.Rows.Add(dr2);

                }
                ComboBoxEdit1.Text = DG_CONSULT_DIAG_Ds.Tables[0].Rows[0]["REQUEST_CAUSE"].ToString().Trim();
                requestdttm_DateEdit.Text = DG_CONSULT_DIAG_Ds.Tables[0].Rows[0]["REQUEST_DTTM"].ToString();
                requestdoctor_ComboBoxEdit.Text = DG_CONSULT_DIAG_Ds.Tables[0].Rows[0]["REQUEST_DOCTOR"].ToString().Trim();
                Immunol_GridControl.DataSource = dt;
                Immunol_GridView.RefreshData();
                GridControl1.DataSource = dt2;
                GridView1.RefreshData();
            }
            else
            {
                requestdoctor_ComboBoxEdit.Text = Share_Class.User.user_id;
            }
            for (int i = 0; i < user_id_CheckedListBoxControl.Items.Count; i++)
            {
                if (("," + d_EXPERT_DOCTOR + ",").IndexOf("," + user_id_CheckedListBoxControl.Items[i].Value.ToString().Trim() + ",") >= 0)
                {
                    user_id_CheckedListBoxControl.Items[i].CheckState = CheckState.Checked;
                }
            }
        }