12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- using System;
- using System.Collections.Generic;
- using System.Collections.Specialized;
- using System.Linq;
- using System.Text;
- using System.Web;
- using Bowin.Common;
- namespace EMIS.Utility
- {
- public class HttpHelper
- {
- public static string GetMenuNo()
- {
- try
- {
- var menuNo = HttpContext.Current.Request["MNU"];
- if (string.IsNullOrEmpty(menuNo))
- {
- menuNo = HttpContext.Current.Request.UrlReferrer.GetQueryStringByPath("MNU");
- }
- return menuNo;
- }
- catch
- {
- return "WINFORM";
- }
- }
- public static SortedDictionary<string, string> GetRequestPost()
- {
- int i = 0;
- SortedDictionary<string, string> sArray = new SortedDictionary<string, string>();
- NameValueCollection coll;
- //Load Form variables into NameValueCollection variable.
- coll = HttpContext.Current.Request.Form;
- // Get names of all forms into a string array.
- String[] requestItem = coll.AllKeys;
- for (i = 0; i < requestItem.Length; i++)
- {
- sArray.Add(requestItem[i], HttpContext.Current.Request.Form[requestItem[i]]);
- }
- return sArray;
- }
- }
- }
|