GetWD_LatticeDeviceInfo.aspx.cs 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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.MgrCSharp
  14. {
  15. public partial class GetWD_LatticeDeviceInfo : PageBase
  16. {
  17. protected void Page_Load(object sender, EventArgs e)
  18. {
  19. string deviceType = this.GetValueByKey("DEVICE_TYPE");
  20. string partID = this.GetValueByKey("partid");
  21. if (string.IsNullOrEmpty(deviceType))
  22. {
  23. deviceType = "6";
  24. }
  25. if (!this.InitializeDataAccess())
  26. {
  27. this.ResponseDefaultError(PromptingMessage.Error_Data_Initialized);
  28. return;
  29. }
  30. if (string.IsNullOrEmpty(partID) || partID == "-1" )
  31. {
  32. wd_DeviceInfoDataAccess.ext.messageDataList = wd_DeviceInfoDataAccess.ext.messageDataList.FindAll(f => f.DEVICE_TYPE == deviceType);
  33. }
  34. else
  35. {
  36. wd_DeviceInfoDataAccess.ext.messageDataList = wd_DeviceInfoDataAccess.ext.messageDataList.FindAll(f => f.DEVICE_TYPE == deviceType && f.PARTID == partID);
  37. wd_DeviceInfoDataAccess.ext.messageDataList.ForEach(f => f.id = f.ID);
  38. }
  39. wd_DeviceInfoDataAccess.ext.Rows = wd_DeviceInfoDataAccess.ext.messageDataList.Count;
  40. wd_DeviceInfoDataAccess.ext.BedInfoArray = wd_DeviceInfoDataAccess.ext.messageDataList;
  41. wd_DeviceInfoDataAccess.ext.DeviceInfoArray = wd_DeviceInfoDataAccess.ext.messageDataList;
  42. this.Response.Write(JsonHelper.SerializeWithSuffix(wd_DeviceInfoDataAccess.ext));
  43. ///////////////////////////////////////////
  44. WD_SysLogInfo wd_SysLogInfo = new WD_SysLogInfo();
  45. wd_SysLogInfo.LOG_TYPE = "3";
  46. wd_SysLogInfo.LOG_SOURCE ="MGR";
  47. wd_SysLogInfo.LOG_CONTENT ="下载了【DEVICE_TYPE】为" + deviceType + "的设备数据";
  48. this.DataBaseLog(wd_SysLogInfo);
  49. }
  50. }
  51. }