DoctorList.aspx.cs 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. using System;
  2. using System.Collections.Generic;
  3. using CLIP.eForm.Consent.WebService;
  4. using CLIP.eForm.Consent.Entity;
  5. using System.Web.Services;
  6. namespace CLIP.eForm.Consent.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, string dutinstcd)
  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, dutinstcd);
  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, string dutinstcd)
  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, dutinstcd);
  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 += "\"doctorkind\":\"" + cVO.doctorKind + "\",";
  74. sResultJson += "\"No\":\"" + (i + 1) + "\"";
  75. sResultJson += "}";
  76. i++;
  77. }
  78. sResultJson += "]";
  79. }
  80. }
  81. }
  82. return sResultJson;
  83. }
  84. }
  85. }