SetWD_PorgramInfo.aspx.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. using System.IO;
  14. namespace HNWD.Pregrant.WebService.MgrCSharp
  15. {
  16. public partial class SetWD_PorgramInfo : PageBase
  17. {
  18. protected void Page_Load(object sender, EventArgs e)
  19. {
  20. string actionflag = this.GetValueByKey("actionflag");
  21. string data = this.GetValueByKey("data");
  22. string deviceid = this.GetValueByKey("deviceid");
  23. string programid = this.GetValueByKey("programid");
  24. if (string.IsNullOrEmpty(actionflag))
  25. {
  26. this.ResponseDefaultError();
  27. return;
  28. }
  29. WD_ProgramInfoBusinessLogic wd_ProgramInfoBusinessLogic = new WD_ProgramInfoBusinessLogic(deviceid, programid);
  30. if (!wd_ProgramInfoBusinessLogic.bSuccess)
  31. {
  32. Response.Write(JsonHelper.SerializeWithSuffix(wd_ProgramInfoBusinessLogic.Message));
  33. return;
  34. }
  35. if (actionflag.ToLower() == "query")
  36. {
  37. Response.Write(JsonHelper.SerializeWithSuffix(wd_ProgramInfoBusinessLogic.Query()));
  38. return;
  39. }
  40. if (actionflag.ToLower() == "querybyparent")
  41. {
  42. Response.Write(JsonHelper.SerializeWithSuffix(wd_ProgramInfoBusinessLogic.QueryByParentID()));
  43. return;
  44. }
  45. if (actionflag.ToLower() == "business")
  46. {
  47. Response.Write(JsonHelper.SerializeWithSuffix(wd_ProgramInfoBusinessLogic.Business(data)));
  48. return;
  49. }
  50. }
  51. }
  52. }