FormSvc.aspx.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 System.Text;
  8. using System.Security.Cryptography;
  9. using CLIP.eForm.Consent.WebService;
  10. namespace CLIP.eForm.Consent.Web {
  11. public partial class FormSvc : System.Web.UI.Page {
  12. protected void Page_Load(object sender, EventArgs e) {
  13. RijndaelManaged aes = new RijndaelManaged();
  14. //aes.KeySize = 256;
  15. //aes.BlockSize = 128;
  16. //aes.Mode = CipherMode.CBC;
  17. //aes.Padding = PaddingMode.PKCS7;
  18. //aes.Key = Encoding.UTF8.GetBytes("qwerasdfghjzxcvqwe54~!@#$%^*())A");
  19. //aes.IV = new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
  20. var method = this.Request.HttpMethod;
  21. if (method.Equals("POST")) {
  22. string value = Request.Params["params"];
  23. String consentMstRid = Request.Params["consentMstRid"] ?? String.Empty;
  24. if (!consentMstRid.Equals(String.Empty)) {
  25. using(ConsentSvc svc = new ConsentSvc()) {
  26. String result = svc.GetConsentFormXml(Int32.Parse(consentMstRid));
  27. Response.ContentType = "plain/text";
  28. Response.Clear();
  29. Response.BinaryWrite(Encoding.UTF8.GetBytes(result));
  30. }
  31. }
  32. }
  33. }
  34. }
  35. }