merge
This commit is contained in:
commit
bf3ec75c08
2 changed files with 18 additions and 13 deletions
|
@ -10848,7 +10848,7 @@ SET @sqlSpace = '
|
||||||
SI.ItemID as ItemID,
|
SI.ItemID as ItemID,
|
||||||
SI.ItemName as TextSearch,
|
SI.ItemName as TextSearch,
|
||||||
STYPE.DisplayName as ColumnType,
|
STYPE.DisplayName as ColumnType,
|
||||||
SI.ItemName as FullType,
|
STYPE.DisplayName as FullType,
|
||||||
SI.PackageID as PackageID
|
SI.PackageID as PackageID
|
||||||
FROM @ItemsService AS I
|
FROM @ItemsService AS I
|
||||||
INNER JOIN ServiceItems AS SI ON I.ItemID = SI.ItemID
|
INNER JOIN ServiceItems AS SI ON I.ItemID = SI.ItemID
|
||||||
|
|
|
@ -16,6 +16,14 @@ namespace WebsitePanel.WebPortal
|
||||||
String filterValue = context.Request.Params["term"];
|
String filterValue = context.Request.Params["term"];
|
||||||
String fullType = context.Request.Params["fullType"];
|
String fullType = context.Request.Params["fullType"];
|
||||||
String columnType = context.Request.Params["columnType"];
|
String columnType = context.Request.Params["columnType"];
|
||||||
|
String numResults = context.Request.Params["itemCount"];
|
||||||
|
int iNumResults = 15;
|
||||||
|
if ((numResults != null) && (numResults.Length > 0))
|
||||||
|
{
|
||||||
|
int num = Int32.Parse(numResults);
|
||||||
|
if (num > 0)
|
||||||
|
iNumResults = num;
|
||||||
|
}
|
||||||
|
|
||||||
if (fullType == "Spaces")
|
if (fullType == "Spaces")
|
||||||
{
|
{
|
||||||
|
@ -23,7 +31,7 @@ namespace WebsitePanel.WebPortal
|
||||||
int itemType = Int32.Parse(strItemType);
|
int itemType = Int32.Parse(strItemType);
|
||||||
DataSet dsObjectItems = ES.Services.Packages.SearchServiceItemsPaged(PanelSecurity.EffectiveUserId, itemType,
|
DataSet dsObjectItems = ES.Services.Packages.SearchServiceItemsPaged(PanelSecurity.EffectiveUserId, itemType,
|
||||||
String.Format("%{0}%", filterValue),
|
String.Format("%{0}%", filterValue),
|
||||||
"",0, 100);
|
"", 0, iNumResults);
|
||||||
DataTable dt = dsObjectItems.Tables[1];
|
DataTable dt = dsObjectItems.Tables[1];
|
||||||
List<Dictionary<string, string>> dataList = new List<Dictionary<string, string>>();
|
List<Dictionary<string, string>> dataList = new List<Dictionary<string, string>>();
|
||||||
for (int i = 0; i < dt.Rows.Count; ++i)
|
for (int i = 0; i < dt.Rows.Count; ++i)
|
||||||
|
@ -47,14 +55,12 @@ namespace WebsitePanel.WebPortal
|
||||||
{
|
{
|
||||||
DataSet dsObjectItems = ES.Services.Packages.GetSearchObject(PanelSecurity.EffectiveUserId, null,
|
DataSet dsObjectItems = ES.Services.Packages.GetSearchObject(PanelSecurity.EffectiveUserId, null,
|
||||||
String.Format("%{0}%", filterValue),
|
String.Format("%{0}%", filterValue),
|
||||||
0, 0, "", 0, 100, columnType,fullType);
|
0, 0, "", 0, iNumResults, columnType, fullType);
|
||||||
DataTable dt = dsObjectItems.Tables[2];
|
DataTable dt = dsObjectItems.Tables[2];
|
||||||
List<Dictionary<string, string>> dataList = new List<Dictionary<string, string>>();
|
List<Dictionary<string, string>> dataList = new List<Dictionary<string, string>>();
|
||||||
for (int i = 0; i < dt.Rows.Count; ++i)
|
for (int i = 0; i < dt.Rows.Count; ++i)
|
||||||
{
|
{
|
||||||
DataRow row = dt.Rows[i];
|
DataRow row = dt.Rows[i];
|
||||||
if ((fullType == null) || (fullType.Length == 0) || (fullType == row["FullType"].ToString()))
|
|
||||||
{
|
|
||||||
Dictionary<string, string> obj = new Dictionary<string, string>();
|
Dictionary<string, string> obj = new Dictionary<string, string>();
|
||||||
obj["ColumnType"] = row["ColumnType"].ToString();
|
obj["ColumnType"] = row["ColumnType"].ToString();
|
||||||
obj["TextSearch"] = row["TextSearch"].ToString();
|
obj["TextSearch"] = row["TextSearch"].ToString();
|
||||||
|
@ -63,7 +69,6 @@ namespace WebsitePanel.WebPortal
|
||||||
obj["FullType"] = row["FullType"].ToString();
|
obj["FullType"] = row["FullType"].ToString();
|
||||||
dataList.Add(obj);
|
dataList.Add(obj);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
var jsonSerialiser = new JavaScriptSerializer();
|
var jsonSerialiser = new JavaScriptSerializer();
|
||||||
var json = jsonSerialiser.Serialize(dataList);
|
var json = jsonSerialiser.Serialize(dataList);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue