41 lines
1.1 KiB
C#
41 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.Specialized;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Web;
|
|
|
|
namespace Taloyhtio.CustomFBADataSource.CodeFiles
|
|
{
|
|
public class SearchParams
|
|
{
|
|
public string UserName { get; set; }
|
|
|
|
public SearchParams(string userName)
|
|
{
|
|
this.UserName = userName;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return string.Format("{0}={1}",
|
|
Constants.QUERY_STRING_USERNAME, HttpUtility.UrlEncode(this.UserName));
|
|
}
|
|
|
|
public static SearchParams Create(NameValueCollection queryString)
|
|
{
|
|
if (queryString == null)
|
|
{
|
|
return new SearchParams(string.Empty);
|
|
}
|
|
|
|
string userName = string.Empty;
|
|
if (!string.IsNullOrEmpty(queryString[Constants.QUERY_STRING_USERNAME]))
|
|
{
|
|
userName = queryString[Constants.QUERY_STRING_USERNAME];
|
|
}
|
|
return new SearchParams(userName);
|
|
}
|
|
}
|
|
}
|