You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWeb/Search/MultipleSearchService.aspx.cs

84 lines
2.4 KiB
C#

3 years ago
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Text.RegularExpressions;
using System.Text;
namespace DSWeb.Search
{
public partial class MultipleSearchService : System.Web.UI.Page
{
private string strHandle;
private string strSearchCacheName;
private string strSearchContent;//查询内容
private int iSearchType;//1-海运出口委托
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString["handle"] != null)
{
strHandle = Request.QueryString["handle"].ToString().Trim().ToLower();
}
if (Request.QueryString["searchcachename"] != null)
{
strSearchCacheName = Request.QueryString["searchcachename"].ToString();
}
if (Request.QueryString["search"] != null)
{
UnicodeEncoding unicode = new UnicodeEncoding();
strSearchContent = unicode.GetString(unicode.GetBytes(Regex.Unescape(Request.QueryString["search"].ToString())));
}
if (Request.QueryString["searchtype"] != null)
{
iSearchType = int.Parse(Request.QueryString["searchtype"].ToString());
}
else
{
iSearchType = 0;
}
if (strHandle != null)
{
if (strHandle == "cachesearch" && strSearchCacheName != null && strSearchContent != null)
{
Response.Write(CacheMulipleSearchCondition(strSearchCacheName, strSearchContent, iSearchType));
}
}
}
private int CacheMulipleSearchCondition(string tempMultipleSearchCacheName,string strSearch,int tempSearchType)
{
int iResult = 0;
if (Session[tempMultipleSearchCacheName] != null)
{
Session[tempMultipleSearchCacheName] = strSearch;
iResult = 1;
}
else
{
Session[tempMultipleSearchCacheName] = strSearch;
iResult = 1;
}
return iResult;
}
}
public enum MultipleSearchType
{
OPSEAE = 1
}
}