DoctorList.aspx.cs 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. using System;
  2. using System.Collections.Generic;
  3. using CLIP.eForm.Consent.Dfh.WebService;
  4. using CLIP.eForm.Consent.Dfh.Entity;
  5. using System.Web.Services;
  6. namespace CLIP.eForm.Consent.Dfh.Web
  7. {
  8. public partial class DoctorList : System.Web.UI.Page
  9. {
  10. protected void Page_Load(object sender, EventArgs e)
  11. {
  12. // srchdd = (string.IsNullOrEmpty(this.Request.Params["IO_ADdate"])) ? DateTime.Now.ToShortDateString() : this.Request.Params["IO_ADdate"];
  13. }
  14. [WebMethod]
  15. public static string SetDeptDropdown(string gubun)
  16. {
  17. CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("SetDeptDropdown : {0}", gubun));
  18. List<DeptListVO> resultList = null;
  19. string sResultJson = string.Empty;
  20. using (HospitalSvc svc = new HospitalSvc())
  21. {
  22. //수술,시술 선택에 따른 진료과 정보 바인딩
  23. resultList = svc.GetDeptList(gubun);
  24. resultList.Remove(resultList.Find(kvp => kvp.deptcd.Trim() == ""));
  25. if (resultList != null)
  26. {
  27. if (resultList != null && resultList.Count > 0)
  28. {
  29. sResultJson = "[";
  30. int i = 0;
  31. foreach (DeptListVO cVO in resultList)
  32. {
  33. if (i > 0) sResultJson += ",";
  34. else sResultJson += "{ \"DeptListVo\":{ \"deptnm\":\"선택\",\"deptcd\":\"\"} },";
  35. sResultJson += "{\"DeptListVo\":{";
  36. sResultJson += "\"deptnm\":\"" + cVO.deptnm + "\",";
  37. sResultJson += "\"deptcd\":\"" + cVO.deptcd + "\",";
  38. sResultJson += "\"No\":\"" + (i + 1) + "\"";
  39. sResultJson += "} }";
  40. i++;
  41. }
  42. sResultJson += "]";
  43. }
  44. }
  45. }
  46. return sResultJson;
  47. }
  48. [WebMethod]
  49. public static string SetDoctorList(string deptCd, string deptNm, string srchdd)
  50. {
  51. CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("SetDoctorList : deptCd[{0}]", deptCd));
  52. CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("SetDoctorList : deptNm[{0}]", deptNm));
  53. CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("SetDoctorList : srchdd[{0}]", srchdd));
  54. List<DocListVO> resultList = null;
  55. string sResultJson = string.Empty;
  56. using (HospitalSvc svc = new HospitalSvc())
  57. {
  58. resultList = svc.GetDoctorList(srchdd.Replace("-", "").Replace("/", ""), deptCd);
  59. if (resultList != null)
  60. {
  61. if (resultList != null && resultList.Count > 0)
  62. {
  63. sResultJson = "[";
  64. int i = 0;
  65. foreach (DocListVO cVO in resultList)
  66. {
  67. if (i > 0) sResultJson += ",";
  68. sResultJson += "{";
  69. sResultJson += "\"doctorid\":\"" + cVO.doctorid + "\",";
  70. sResultJson += "\"doctornm\":\"" + cVO.doctornm + "\",";
  71. sResultJson += "\"deptCd\":\"" + deptCd + "\",";
  72. sResultJson += "\"deptNm\":\"" + deptNm + "\",";
  73. sResultJson += "\"No\":\"" + (i + 1) + "\"";
  74. sResultJson += "}";
  75. i++;
  76. }
  77. sResultJson += "]";
  78. }
  79. }
  80. }
  81. return sResultJson;
  82. }
  83. }
  84. }