CallingBed_cost.aspx.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.UI;
  6. using System.Web.UI.WebControls;
  7. using HNWD.Pregrant.WebService;
  8. using HNWD.Pregrant.Model;
  9. using System.Text;
  10. using HNWD.Pregrant.DataAccess;
  11. using HNWD.Pregrant.Common;
  12. using HNWD.Pregrant.BusinessLogic;
  13. namespace HNWD.Pregrant.WebService.WDFJ_I
  14. {
  15. public partial class CallingBed_cost : PageBase
  16. {
  17. protected void Page_Load(object sender, EventArgs e)
  18. {
  19. string deviceHumanID = this.GetValueByKey("deviceHumanId");
  20. if(string.IsNullOrEmpty(deviceHumanID))
  21. {
  22. this.ResponseDefaultError();
  23. return;
  24. }
  25. if(!this.InitializeDataAccess())
  26. {
  27. this.ResponseDefaultError(PromptingMessage.Error_PatientInfo);
  28. return;
  29. }
  30. WD_PatientInfo wd_PatientInfo = this.wd_PatientInfoDataAccess.ext.messageDataList.Find(f=>f.ID == deviceHumanID.Trim());
  31. if(wd_PatientInfo == null)
  32. {
  33. this.ResponseDefaultError(PromptingMessage.Error_PatientInfo);
  34. return;
  35. }
  36. wd_PatientInfo.name = wd_PatientInfo.PATIENT_NAME;
  37. wd_PatientInfo.inpatientNum = wd_PatientInfo.PATIENT_ID;
  38. this.wd_CostInfoDataAccess.ext.messageDataList.FindAll(f=>f.COST_PATIENT_ID == deviceHumanID).ForEach(f=> wd_PatientInfo.CostArray.Add(new Cost(){ costName = f.COST_NAME , date = f.COST_CREATEDATE , money = f.COST_VALUE }));
  39. this.Response.Write(JsonHelper.SerializeWithSuffix(wd_PatientInfo));
  40. WD_SysLogInfo wd_SysLogInfo = new WD_SysLogInfo();
  41. wd_SysLogInfo.LOG_TYPE = "3";
  42. wd_SysLogInfo.LOG_SOURCE ="病人ID号【" + deviceHumanID + "】";
  43. wd_SysLogInfo.LOG_CONTENT ="请求【费用清单】数据!";
  44. this.DataBaseLog(wd_SysLogInfo);
  45. }
  46. }
  47. }