PatientSelectTabInPatient.cs 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  1. using System;
  2. using System.Collections;
  3. using System.Drawing;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6. using System.Collections.Generic;
  7. using CLIP.eForm.Consent.UI.HospitalSvcRef;
  8. namespace CLIP.eForm.Consent.UI {
  9. /// <summary>
  10. /// 환자목록 > 입원 탭 클래스
  11. /// </summary>
  12. /// <remarks>
  13. /// <p>[설계자]</p>
  14. /// <p> 클립소프트 연구소 홍지철 (jchong@clipsoft.co.kr)</p>
  15. /// <p>[원본 작성자]</p>
  16. /// <p> 클립소프트 기술부 이인희</p>
  17. /// <p>[수정 작성자]</p>
  18. /// <p> </p>
  19. /// <p>----------------------------------------------------------------------------------------</p>
  20. /// <p>[HISTORY]</p>
  21. /// <p> 2016-07-11 : 최초작성</p>
  22. /// <p>----------------------------------------------------------------------------------------</p>
  23. /// </remarks>
  24. public partial class PatientSelectTabInPatient : UserControl {
  25. private IConsentMain consentMain = null;
  26. private ConsentCommandCtrl commandControl = null;
  27. private HospitalSvcRef.HospitalSvcSoapClient hospitalWebService = null;
  28. public PatientSelectTabInPatient() {
  29. InitializeComponent();
  30. }
  31. private void PatientSelectTabInPatient_Load(object sender, EventArgs e) {
  32. if (this.DesignMode || LicenseManager.UsageMode == LicenseUsageMode.Designtime) {
  33. return;
  34. }
  35. consentMain = ConsentMainControl.GetConsentMainInterface(this);
  36. if (commandControl == null) commandControl = consentMain.ConsentCommandCtrl as ConsentCommandCtrl;
  37. hospitalWebService = WebMethodCommon.GetHospitalWebService(consentMain.PluginExecuteInfo["hospitalSvcUrl"]);
  38. // 의사로 Agent 를 실행할 경우 입원 환자 탭에서 내환자 체크 박스 숨기기
  39. //if (commandControl.CurrentEndUser != null) {
  40. // if (!string.IsNullOrEmpty(commandControl.CurrentEndUser.jobkindcd)) {
  41. // if (!commandControl.CurrentEndUser.jobkindcd.Substring(0, 2).Equals("11")) {
  42. // chkMyPatient.Visible = false;
  43. // }
  44. // }
  45. //}
  46. this.dateTimePickerClnDate.Value = DateTime.Now;
  47. InitComboBind();
  48. foreach (DeptListVO ward in (DeptListVO[]) comboWard.DataSource) {
  49. if (ward.deptCd.Equals(commandControl.CurrentEndUser.deptcd)) {
  50. comboWard.SelectedValue = commandControl.CurrentEndUser.deptcd;
  51. break;
  52. }
  53. }
  54. InitDataGrid();
  55. }
  56. public Hashtable getQueryString() {
  57. //var result = new {
  58. // fromdd = dateTimePickerClnDate.Value.ToString("yyyyMMdd"),
  59. // wardcd = (this.comboWard.Items.Count > 0) ? this.comboWard.SelectedValue.ToString().Trim() : "",
  60. // deptcd = (this.comboDept.Items.Count > 0) ? this.comboDept.SelectedValue.ToString().Trim() : "",
  61. // doctorId = (this.comboDoctor.Items.Count > 0) ? this.comboDoctor.SelectedValue.ToString().Trim() : ""
  62. //};
  63. string srchDd = dateTimePickerClnDate.Value.ToString("yyyyMMdd");
  64. string wardCd = (this.comboWard.Items.Count > 0) ? this.comboWard.SelectedValue.ToString().Trim() : "";
  65. string deptCd = (this.comboDept.Items.Count > 0) ? this.comboDept.SelectedValue.ToString().Trim() : "";
  66. string doctorId = (this.comboDoctor.Items.Count > 0) ? this.comboDoctor.SelectedValue.ToString().Trim() : "";
  67. string pid = this.textBoxSearchText.Text;
  68. string strGubun = "";
  69. string myPatient = "N";
  70. DocListVO[] list = (DocListVO[]) comboDoctor.DataSource;
  71. var drKind = "";
  72. foreach(DocListVO vo in list) {
  73. if(vo != null && vo.doctorId.Equals(doctorId)) {
  74. drKind = vo.drKind;
  75. break;
  76. }
  77. }
  78. //string drKind = commandControl.CurrentEndUser.drkind;
  79. if (this.radioGubunIng.Checked) {
  80. strGubun = radioGubunIng.Tag.ToString();
  81. } else if (this.radioGubunOut.Checked) {
  82. strGubun = radioGubunOut.Tag.ToString();
  83. } else if (this.radioGubunFuture.Checked) {
  84. strGubun = radioGubunFuture.Tag.ToString();
  85. } else {
  86. strGubun = radioGubunTemp.Tag.ToString();
  87. }
  88. if (this.chkMyPatient.Checked == true) {
  89. myPatient = "Y";
  90. }
  91. Hashtable result = new Hashtable();
  92. result.Add("pid", pid);
  93. result.Add("srchDd", srchDd);
  94. result.Add("wardCd", wardCd);
  95. result.Add("ordDeptCd", deptCd);
  96. result.Add("doctorId", doctorId);
  97. result.Add("patientState", strGubun);
  98. result.Add("myPatient", myPatient);
  99. result.Add("ordType", "I");
  100. result.Add("drKind", drKind);
  101. return result;
  102. }
  103. private void InitComboBind() {
  104. // 병동 정보 가져오기 및 설정
  105. DeptListVO[] wardList = this.hospitalWebService.GetWardList(this.consentMain.ConsentExecuteInfo["dutinstcd"]);
  106. if (wardList != null) {
  107. this.comboWard.DisplayMember = "deptnm";
  108. this.comboWard.ValueMember = "deptcd";
  109. this.comboWard.DataSource = wardList;
  110. }
  111. // 진료과 정보 가져오기 및 설정
  112. //DeptListVO[] deptList = this.hospitalWebService.GetDeptList(GetSelectGubunValue(), this.consentMain.ConsentExecuteInfo["dutinstcd"]);
  113. DeptListVO[] deptList = this.hospitalWebService.GetOrgDeptList(GetSelectGubunValue(), this.consentMain.ConsentExecuteInfo["dutinstcd"]);
  114. if (deptList != null) {
  115. this.comboDept.DisplayMember = "deptnm";
  116. this.comboDept.ValueMember = "deptcd";
  117. this.comboDept.DataSource = deptList;
  118. }
  119. }
  120. private void InitDataGrid() {
  121. this.dataGridViewPatientSelectResult.AutoGenerateColumns = false;
  122. this.dataGridViewPatientSelectResult.AllowUserToAddRows = false;
  123. //this.dataGridViewPatientSelectResult.CellPainting += new DataGridViewCellPaintingEventHandler(this.dataGridViewPatientSelectResult_CellPainting);
  124. this.dataGridViewPatientSelectResult.ColumnHeaderMouseClick += new DataGridViewCellMouseEventHandler(this.dataGridViewPatientSelectResult_ColumnHeaderMouseClick);
  125. this.dataGridViewPatientSelectResult.RowPostPaint += new DataGridViewRowPostPaintEventHandler(this.dataGridViewPatientSelectResult_RowPostPaint);
  126. CommonUtil.AddNewCheckBoxColumnToDataGridView(this.dataGridViewPatientSelectResult, "□", "colCheck", false, 30, DataGridViewContentAlignment.MiddleCenter);
  127. CommonUtil.AddNewColumnToDataGridView(this.dataGridViewPatientSelectResult, "입원일자", "indd", true, 70);
  128. CommonUtil.AddNewColumnToDataGridView(this.dataGridViewPatientSelectResult, "병실", "roomcd", true, 40);
  129. CommonUtil.AddNewColumnToDataGridView(this.dataGridViewPatientSelectResult, "성별/나이", "hngnm", true, 90);
  130. CommonUtil.AddNewColumnToDataGridView(this.dataGridViewPatientSelectResult, "등록번호", "pid", true, 60);
  131. CommonUtil.AddNewColumnToDataGridView(this.dataGridViewPatientSelectResult, "진료과", "deptnm", true, 120);
  132. CommonUtil.AddNewColumnToDataGridView(this.dataGridViewPatientSelectResult, "담당교수", "doctornm", true, 80);
  133. CommonUtil.AddNewColumnToDataGridView(this.dataGridViewPatientSelectResult, "구분", "dschnoti", false, 80);
  134. //dataGridViewPatientSelectResult.Columns["colCheck"].Visible = false;
  135. }
  136. #region 환자 조회
  137. /// <summary>
  138. /// 선택된 구분 종류 반환
  139. /// </summary>
  140. /// <returns></returns>
  141. private string GetSelectGubunValue() {
  142. string strGubun = "";
  143. if (this.radioGubunTemp.Checked) {
  144. strGubun = this.radioGubunTemp.Tag.ToString();
  145. } else {
  146. RadioButton rdoTemp = null;
  147. if (this.radioGubunFuture.Checked)
  148. rdoTemp = radioGubunFuture;
  149. else if (this.radioGubunIng.Checked)
  150. rdoTemp = radioGubunIng;
  151. else if (this.radioGubunOut.Checked)
  152. rdoTemp = radioGubunOut;
  153. strGubun = rdoTemp.Tag.ToString();
  154. }
  155. return strGubun;
  156. }
  157. private void BindDataGridRows() {
  158. if (this.consentMain == null) consentMain = ConsentMainControl.GetConsentMainInterface(this);
  159. if (this.hospitalWebService == null) this.hospitalWebService = WebMethodCommon.GetHospitalWebService(consentMain.PluginExecuteInfo["hospitalSvcUrl"]);
  160. string srchdd = this.dateTimePickerClnDate.Value.ToString("yyyyMMdd");
  161. string orddeptcd = (this.comboDept.Items.Count > 0) ? this.comboDept.SelectedValue.ToString().Trim() : "";
  162. string doctorid = (this.comboDoctor.Items.Count > 0) ? this.comboDoctor.SelectedValue.ToString().Trim() : "";
  163. string pid = this.textBoxSearchText.Text.Trim();
  164. string wardcd = (this.comboWard.Items.Count > 0) ? this.comboWard.SelectedValue.ToString().Trim() : "";
  165. string patstat = GetSelectGubunValue();
  166. Cursor currentCursor = this.Cursor;
  167. this.Cursor = Cursors.WaitCursor;
  168. DocListVO doctorVo = (DocListVO)comboDoctor.SelectedItem;
  169. // 입원 환자 목록 조회
  170. PatListVO[] resultData =
  171. hospitalWebService.GetPatientList(
  172. "I", // 입원 환자 조회
  173. "N", //
  174. srchdd,
  175. orddeptcd,
  176. doctorid,
  177. pid,
  178. wardcd,
  179. patstat,
  180. consentMain.ConsentExecuteInfo["dutinstcd"],
  181. commandControl.CurrentEndUser.userId,
  182. chkMyPatient.Checked ? "Y" : string.Empty,
  183. doctorVo?.drKind ?? string.Empty);
  184. this.Cursor = currentCursor;
  185. if (resultData == null) {
  186. return;
  187. }
  188. this.dataGridViewPatientSelectResult.DataSource = new SortableBindingList<PatListVO>(resultData);
  189. }
  190. /// <summary>
  191. /// 진료과 콤보 박스 아이템 변경 이벤트
  192. /// </summary>
  193. /// <param name="sender">The source of the event.</param>
  194. /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
  195. private void comboDept_SelectedIndexChanged(object sender, EventArgs e) {
  196. DocListVO[] doctorList = null;
  197. if (this.comboDept.SelectedIndex == 0) {
  198. doctorList = new DocListVO[1];
  199. DocListVO doc = new DocListVO();
  200. doc.doctorId = "";
  201. doc.doctorNm = "진료의(전체)";
  202. doc.drKind = "";
  203. doctorList[0] = doc;
  204. this.comboDoctor.DisplayMember = "doctornm";
  205. this.comboDoctor.ValueMember = "doctorid";
  206. this.comboDoctor.DataSource = doctorList;
  207. return;
  208. }
  209. // 주치의 목록 가져오기
  210. doctorList = this.hospitalWebService.GetDoctorList(DateTime.Now.ToShortDateString().Replace("-", ""),
  211. (this.comboDept.Items.Count > 0) ? this.comboDept.SelectedValue.ToString() : "", this.consentMain.ConsentExecuteInfo["dutinstcd"]);
  212. if (doctorList != null) {
  213. this.comboDoctor.DisplayMember = "doctornm";
  214. this.comboDoctor.ValueMember = "doctorid";
  215. this.comboDoctor.DataSource = doctorList;
  216. }
  217. }
  218. /// <summary>
  219. /// 조회 버튼 클릭 이벤트
  220. /// </summary>
  221. /// <param name="sender">The source of the event.</param>
  222. /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
  223. private void buttonPatientSelect_Click(object sender, EventArgs e) {
  224. var selectedWardIndex = this.comboWard.SelectedIndex;
  225. var selectedDeptIndex = this.comboDept.SelectedIndex;
  226. var selectedDoctorIndex = this.comboDoctor.SelectedIndex;
  227. var patientNameValue = this.textBoxSearchText.Text;
  228. if (selectedWardIndex == 0 && selectedDeptIndex == 0 && selectedDoctorIndex == 0 && String.Empty.Equals(patientNameValue)) {
  229. MessageBox.Show("병동, 진료과, 등록번호 중 1가지 이상 입력해주세요.");
  230. return;
  231. }
  232. buttonPatientSelect.Enabled = false;
  233. Application.DoEvents();
  234. try {
  235. BindDataGridRows();
  236. } catch (Exception ex) {
  237. throw ex;
  238. } finally {
  239. buttonPatientSelect.Enabled = true;
  240. }
  241. }
  242. #endregion
  243. #region 환자찾기 버튼 클릭 이벤트
  244. /// <summary>
  245. /// 환자 찾기 버튼 클릭 이벤트, 환자 조회 팝업창 생성
  246. /// </summary>
  247. /// <param name="sender">The source of the event.</param>
  248. /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
  249. private void buttonSearchPop_Click(object sender, EventArgs e) {
  250. string strTemp = this.textBoxSearchText.Text.Trim();
  251. int iResult;
  252. if (int.TryParse(strTemp, out iResult) && strTemp.Length > 6) {
  253. this.buttonPatientSelect.PerformClick();
  254. } else {
  255. PatientSearchPopup popup = new PatientSearchPopup(textBoxSearchText.Text
  256. , consentMain.ConsentExecuteInfo["dutinstcd"]
  257. , consentMain.ConsentExecuteInfo["sysInstNm"]);
  258. DialogResult result = popup.ShowDialog();
  259. if (result == DialogResult.OK) {
  260. this.textBoxSearchText.Text = popup.PatientID;
  261. this.buttonPatientSelect.PerformClick();
  262. }
  263. popup.Close();
  264. }
  265. }
  266. /// <summary>
  267. /// 등록번호 입력 컨트롤 키보드 입력 이벤트
  268. /// </summary>
  269. /// <param name="sender">The source of the event.</param>
  270. /// <param name="e">The <see cref="KeyEventArgs"/> instance containing the event data.</param>
  271. private void textBoxSearchText_KeyDown(object sender, KeyEventArgs e) {
  272. if (e.KeyCode == Keys.Enter) {
  273. this.buttonPatientSelect.PerformClick();
  274. //this.buttonSearchPop.PerformClick();
  275. }
  276. }
  277. #endregion
  278. #region 그리드 이벤트
  279. /// <summary>
  280. /// 그리드 그리기 이벤트
  281. /// </summary>
  282. /// <param name="sender">The source of the event.</param>
  283. /// <param name="e">The <see cref="DataGridViewCellPaintingEventArgs"/> instance containing the event data.</param>
  284. private void dataGridViewPatientSelectResult_CellPainting(object sender, DataGridViewCellPaintingEventArgs e) {
  285. if (e.ColumnIndex == 0 && e.RowIndex == -1) {
  286. Image InfoIcon;
  287. // 체크박스 상태에 따른 아이콘 표시
  288. if (dataGridViewPatientSelectResult.Columns[0].HeaderText.Equals("□")) {
  289. InfoIcon = Image.FromFile(@"../../Resources/uncheck.png");
  290. } else {
  291. InfoIcon = Image.FromFile(@"../../Resources/check.png");
  292. }
  293. e.Paint(e.CellBounds, DataGridViewPaintParts.All);
  294. e.Graphics.DrawImage(InfoIcon, e.CellBounds);
  295. e.Handled = true;
  296. }
  297. }
  298. /// <summary>
  299. /// 컬럼 헤드 클릭 이벤트
  300. /// 선택 여부 체크박스 값 설정
  301. /// </summary>
  302. /// <param name="sender">The source of the event.</param>
  303. /// <param name="e">The <see cref="DataGridViewCellMouseEventArgs"/> instance containing the event data.</param>
  304. private void dataGridViewPatientSelectResult_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) {
  305. if (e.ColumnIndex == 0 && e.RowIndex == -1) {
  306. bool chkStatus = false;
  307. if (dataGridViewPatientSelectResult.Columns[0].HeaderText.Equals("□")) {
  308. dataGridViewPatientSelectResult.Columns[0].HeaderText = "☑";
  309. chkStatus = true;
  310. } else {
  311. dataGridViewPatientSelectResult.Columns[0].HeaderText = "□";
  312. }
  313. foreach (DataGridViewRow r in dataGridViewPatientSelectResult.Rows) {
  314. r.Cells["colCheck"].Value = chkStatus;
  315. }
  316. dataGridViewPatientSelectResult.RefreshEdit();
  317. }
  318. }
  319. /// <summary>
  320. /// 그리드 그리기 이후 이벤트, 행 번호 추가
  321. /// </summary>
  322. /// <param name="sender">The source of the event.</param>
  323. /// <param name="e">The <see cref="DataGridViewRowPostPaintEventArgs"/> instance containing the event data.</param>
  324. private void dataGridViewPatientSelectResult_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) {
  325. if (e.RowIndex >= 0) {
  326. string NumberingText = (e.RowIndex + 1).ToString();
  327. // 글자 사이즈 구하기.
  328. SizeF stringSize = e.Graphics.MeasureString(NumberingText, Font);
  329. // 글자에 맞춰 좌표계산.
  330. PointF StringPoint = new PointF
  331. (
  332. Convert.ToSingle(this.dataGridViewPatientSelectResult.RowHeadersWidth - 3 - stringSize.Width),
  333. Convert.ToSingle(e.RowBounds.Y) + this.dataGridViewPatientSelectResult[0, e.RowIndex].ContentBounds.Height * 0.3f
  334. );
  335. // 문자열 그리기.
  336. e.Graphics.DrawString
  337. (
  338. NumberingText,
  339. Font,
  340. Brushes.Black,
  341. StringPoint.X,
  342. StringPoint.Y
  343. );
  344. }
  345. }
  346. /// <summary>
  347. /// 입원 환자 목록 그리드 셀 더블클릭 이벤트
  348. /// </summary>
  349. /// <param name="sender">The source of the event.</param>
  350. /// <param name="e">The <see cref="DataGridViewCellEventArgs"/> instance containing the event data.</param>
  351. private void dataGridViewPatientSelectResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) {
  352. if (e.RowIndex > -1) {
  353. PatListVO vo = this.dataGridViewPatientSelectResult.Rows[e.RowIndex].DataBoundItem as PatListVO;
  354. // 현재 선택 환자를 변경한다
  355. consentMain.PatientListCtrl.SetChangePID(vo);
  356. }
  357. }
  358. #endregion
  359. public void ClearCheckBox() {
  360. bool chkStatus = false;
  361. dataGridViewPatientSelectResult.Columns[0].HeaderText = "□";
  362. foreach (DataGridViewRow r in dataGridViewPatientSelectResult.Rows) {
  363. r.Cells["colCheck"].Value = chkStatus;
  364. }
  365. dataGridViewPatientSelectResult.RefreshEdit();
  366. }
  367. public List<PatListVO> GetCheckPatList() {
  368. List<PatListVO> voList = new List<PatListVO>();
  369. foreach (DataGridViewRow r in dataGridViewPatientSelectResult.Rows) {
  370. if (Convert.ToBoolean(r.Cells["colCheck"].Value)) {
  371. voList.Add(r.DataBoundItem as PatListVO);
  372. }
  373. }
  374. return voList;
  375. }
  376. private void comboWard_DrawItem(object sender, DrawItemEventArgs e) {
  377. ComboBox box = sender as ComboBox;
  378. if (box is null)
  379. return;
  380. e.DrawBackground();
  381. if (e.Index >= 0) {
  382. Graphics g = e.Graphics;
  383. using (Brush brush = ((e.State & DrawItemState.Selected) == DrawItemState.Selected)
  384. ? new SolidBrush(SystemColors.Highlight)
  385. : new SolidBrush(e.BackColor)) {
  386. using (Brush textBrush = new SolidBrush(e.ForeColor)) {
  387. g.FillRectangle(brush, e.Bounds);
  388. g.DrawString(((DeptListVO[]) box.DataSource)[e.Index].deptNm,
  389. e.Font,
  390. textBrush,
  391. (float) e.Bounds.X,
  392. (float) (e.Bounds.Y) + 2.34F);
  393. }
  394. }
  395. }
  396. e.DrawFocusRectangle();
  397. }
  398. private void comboWard_MeasureItem(object sender, MeasureItemEventArgs e) {
  399. e.ItemHeight = 20;
  400. }
  401. private void comboDept_DrawItem(object sender, DrawItemEventArgs e) {
  402. ComboBox box = sender as ComboBox;
  403. if (box is null)
  404. return;
  405. e.DrawBackground();
  406. if (e.Index >= 0) {
  407. Graphics g = e.Graphics;
  408. using (Brush brush = ((e.State & DrawItemState.Selected) == DrawItemState.Selected)
  409. ? new SolidBrush(SystemColors.Highlight)
  410. : new SolidBrush(e.BackColor)) {
  411. using (Brush textBrush = new SolidBrush(e.ForeColor)) {
  412. g.FillRectangle(brush, e.Bounds);
  413. g.DrawString(((DeptListVO[]) box.DataSource)[e.Index].deptNm,
  414. e.Font,
  415. textBrush,
  416. (float) e.Bounds.X,
  417. (float) (e.Bounds.Y) + 2.34F);
  418. }
  419. }
  420. }
  421. e.DrawFocusRectangle();
  422. }
  423. private void comboDept_MeasureItem(object sender, MeasureItemEventArgs e) {
  424. e.ItemHeight = 20;
  425. }
  426. private void comboDoctor_DrawItem(object sender, DrawItemEventArgs e) {
  427. ComboBox box = sender as ComboBox;
  428. if (box is null)
  429. return;
  430. e.DrawBackground();
  431. if (e.Index >= 0) {
  432. Graphics g = e.Graphics;
  433. using (Brush brush = ((e.State & DrawItemState.Selected) == DrawItemState.Selected)
  434. ? new SolidBrush(SystemColors.Highlight)
  435. : new SolidBrush(e.BackColor)) {
  436. using (Brush textBrush = new SolidBrush(e.ForeColor)) {
  437. g.FillRectangle(brush, e.Bounds);
  438. g.DrawString(((DocListVO[]) box.DataSource)[e.Index].doctorNm,
  439. e.Font,
  440. textBrush,
  441. (float) e.Bounds.X,
  442. (float) (e.Bounds.Y) + 2.34F);
  443. }
  444. }
  445. }
  446. e.DrawFocusRectangle();
  447. }
  448. private void comboDoctor_MeasureItem(object sender, MeasureItemEventArgs e) {
  449. e.ItemHeight = 20;
  450. }
  451. }
  452. }