quick search: dd acceleration
This commit is contained in:
parent
c442403882
commit
ee3edfae7b
9 changed files with 55 additions and 16 deletions
|
@ -10848,7 +10848,8 @@ CREATE PROCEDURE [dbo].[GetSearchObject]
|
||||||
@MaximumRows int = 0,
|
@MaximumRows int = 0,
|
||||||
@Recursive bit,
|
@Recursive bit,
|
||||||
@ColType nvarchar(50) = '',
|
@ColType nvarchar(50) = '',
|
||||||
@FullType nvarchar(50) = ''
|
@FullType nvarchar(50) = '',
|
||||||
|
@OnlyFind bit
|
||||||
)
|
)
|
||||||
AS
|
AS
|
||||||
|
|
||||||
|
@ -10886,8 +10887,12 @@ DECLARE @Users TABLE
|
||||||
UserID int
|
UserID int
|
||||||
)
|
)
|
||||||
INSERT INTO @Users (UserID)
|
INSERT INTO @Users (UserID)
|
||||||
SELECT
|
SELECT '
|
||||||
U.UserID
|
|
||||||
|
IF @OnlyFind = 1
|
||||||
|
SET @sqlUsers = @sqlUsers + 'TOP ' + CAST(@MaximumRows AS varchar(12)) + ' '
|
||||||
|
|
||||||
|
SET @sqlUsers = @sqlUsers + 'U.UserID
|
||||||
FROM UsersDetailed AS U
|
FROM UsersDetailed AS U
|
||||||
WHERE
|
WHERE
|
||||||
U.UserID <> @UserID AND U.IsPeer = 0 AND
|
U.UserID <> @UserID AND U.IsPeer = 0 AND
|
||||||
|
@ -10937,8 +10942,12 @@ SET @sqlSpace = '
|
||||||
ItemID int
|
ItemID int
|
||||||
)
|
)
|
||||||
INSERT INTO @ItemsService (ItemID)
|
INSERT INTO @ItemsService (ItemID)
|
||||||
SELECT
|
SELECT '
|
||||||
SI.ItemID
|
|
||||||
|
IF @OnlyFind = 1
|
||||||
|
SET @sqlSpace = @sqlSpace + 'TOP ' + CAST(@MaximumRows AS varchar(12)) + ' '
|
||||||
|
|
||||||
|
SET @sqlSpace = @sqlSpace + 'SI.ItemID
|
||||||
FROM ServiceItems AS SI
|
FROM ServiceItems AS SI
|
||||||
INNER JOIN Packages AS P ON P.PackageID = SI.PackageID
|
INNER JOIN Packages AS P ON P.PackageID = SI.PackageID
|
||||||
INNER JOIN UsersDetailed AS U ON P.UserID = U.UserID
|
INNER JOIN UsersDetailed AS U ON P.UserID = U.UserID
|
||||||
|
|
|
@ -926,6 +926,22 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
});
|
});
|
||||||
return ((System.Data.DataSet)(results[0]));
|
return ((System.Data.DataSet)(results[0]));
|
||||||
}
|
}
|
||||||
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetSearchObjectQuickFind", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
|
public System.Data.DataSet GetSearchObjectQuickFind(int userId, string filterColumn, string filterValue, int statusId, int roleId, string sortColumn, int maximumRows, string colType, string fullType)
|
||||||
|
{
|
||||||
|
object[] results = this.Invoke("GetSearchObjectQuickFind", new object[] {
|
||||||
|
userId,
|
||||||
|
filterColumn,
|
||||||
|
filterValue,
|
||||||
|
statusId,
|
||||||
|
roleId,
|
||||||
|
sortColumn,
|
||||||
|
maximumRows,
|
||||||
|
colType,
|
||||||
|
fullType
|
||||||
|
});
|
||||||
|
return ((System.Data.DataSet)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
//TODO END
|
//TODO END
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,8 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
//TODO START
|
//TODO START
|
||||||
public static DataSet GetSearchObject(int actorId, int userId, string filterColumn, string filterValue,
|
public static DataSet GetSearchObject(int actorId, int userId, string filterColumn, string filterValue,
|
||||||
int statusId, int roleId, string sortColumn, int startRow, int maximumRows, string colType, string fullType, bool recursive)
|
int statusId, int roleId, string sortColumn, int startRow, int maximumRows, string colType, string fullType,
|
||||||
|
bool recursive, bool onlyFind)
|
||||||
{
|
{
|
||||||
return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure,
|
return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure,
|
||||||
ObjectQualifier + "GetSearchObject",
|
ObjectQualifier + "GetSearchObject",
|
||||||
|
@ -156,7 +157,8 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
new SqlParameter("@MaximumRows", maximumRows),
|
new SqlParameter("@MaximumRows", maximumRows),
|
||||||
new SqlParameter("@Recursive", recursive),
|
new SqlParameter("@Recursive", recursive),
|
||||||
new SqlParameter("@ColType", colType),
|
new SqlParameter("@ColType", colType),
|
||||||
new SqlParameter("@FullType", fullType));
|
new SqlParameter("@FullType", fullType),
|
||||||
|
new SqlParameter("@OnlyFind", onlyFind));
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO END
|
//TODO END
|
||||||
|
|
|
@ -319,10 +319,12 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
//TODO START
|
//TODO START
|
||||||
public static DataSet GetSearchObject(int userId, string filterColumn, string filterValue,
|
public static DataSet GetSearchObject(int userId, string filterColumn, string filterValue,
|
||||||
int statusId, int roleId, string sortColumn, int startRow, int maximumRows, string colType, string fullType)
|
int statusId, int roleId, string sortColumn, int startRow, int maximumRows, string colType,
|
||||||
|
string fullType, bool onlyFind)
|
||||||
{
|
{
|
||||||
return DataProvider.GetSearchObject(SecurityContext.User.UserId, userId,
|
return DataProvider.GetSearchObject(SecurityContext.User.UserId, userId,
|
||||||
filterColumn, filterValue, statusId, roleId, sortColumn, startRow, maximumRows, colType, fullType, false);
|
filterColumn, filterValue, statusId, roleId, sortColumn, startRow,
|
||||||
|
maximumRows, colType, fullType, false, onlyFind);
|
||||||
}
|
}
|
||||||
//TODO END
|
//TODO END
|
||||||
|
|
||||||
|
|
|
@ -140,7 +140,14 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
public DataSet GetSearchObject(int userId, string filterColumn, string filterValue,
|
public DataSet GetSearchObject(int userId, string filterColumn, string filterValue,
|
||||||
int statusId, int roleId, string sortColumn, int startRow, int maximumRows, string colType, string fullType)
|
int statusId, int roleId, string sortColumn, int startRow, int maximumRows, string colType, string fullType)
|
||||||
{
|
{
|
||||||
return PackageController.GetSearchObject(userId, filterColumn, filterValue, statusId, roleId, sortColumn, startRow, maximumRows, colType, fullType);
|
return PackageController.GetSearchObject(userId, filterColumn, filterValue, statusId, roleId, sortColumn, startRow, maximumRows, colType, fullType, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public DataSet GetSearchObjectQuickFind(int userId, string filterColumn, string filterValue,
|
||||||
|
int statusId, int roleId, string sortColumn, int maximumRows, string colType, string fullType)
|
||||||
|
{
|
||||||
|
return PackageController.GetSearchObject(userId, filterColumn, filterValue, statusId, roleId, sortColumn, 0, maximumRows, colType, fullType, true);
|
||||||
}
|
}
|
||||||
//TODO END
|
//TODO END
|
||||||
|
|
||||||
|
|
|
@ -5874,4 +5874,7 @@
|
||||||
<data name="Error.SEND_USER_PASSWORD_RESET_SMS" xml:space="preserve">
|
<data name="Error.SEND_USER_PASSWORD_RESET_SMS" xml:space="preserve">
|
||||||
<value>Sms was not sent.</value>
|
<value>Sms was not sent.</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SearchObject.NOT_FOUND" xml:space="preserve">
|
||||||
|
<value>Not found</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -54,9 +54,8 @@ namespace WebsitePanel.WebPortal
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DataSet dsObjectItems = ES.Services.Packages.GetSearchObject(PanelSecurity.EffectiveUserId, null,
|
DataSet dsObjectItems = ES.Services.Packages.GetSearchObjectQuickFind(PanelSecurity.EffectiveUserId, null,
|
||||||
String.Format("%{0}%", filterValue),
|
String.Format("%{0}%", filterValue), 0, 0, "", iNumResults, 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)
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
AllowPaging="True" AllowSorting="True"
|
AllowPaging="True" AllowSorting="True"
|
||||||
CssSelectorClass="NormalGridView"
|
CssSelectorClass="NormalGridView"
|
||||||
DataSourceID="odsObjectsPaged" EnableViewState="False"
|
DataSourceID="odsObjectsPaged" EnableViewState="False"
|
||||||
EmptyDataText="gvObjects">
|
EmptyDataText=<%# GetSharedLocalizedString("SearchObject.NOT_FOUND") %>>
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="gvType" SortExpression="ColumnType">
|
<asp:TemplateField HeaderText="gvType" SortExpression="ColumnType">
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
|
|
|
@ -45,8 +45,9 @@
|
||||||
$("#<%= tbObjectId.ClientID %>").val(item.code.ItemID);
|
$("#<%= tbObjectId.ClientID %>").val(item.code.ItemID);
|
||||||
$("#<%= tbPackageId.ClientID %>").val(item.code.PackageID);
|
$("#<%= tbPackageId.ClientID %>").val(item.code.PackageID);
|
||||||
$("#<%= tbAccountId.ClientID %>").val(item.code.AccountID);
|
$("#<%= tbAccountId.ClientID %>").val(item.code.AccountID);
|
||||||
$("#<%= ImageButton1.ClientID %>").trigger("click");
|
var $ImgBtn = $("#<%= ImageButton1.ClientID %>");
|
||||||
$("#<%= ImageButton1.ClientID %>").attr('disabled','disabled');
|
$ImgBtn.trigger("click");
|
||||||
|
$ImgBtn.attr('disabled', 'disabled');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});//]]>
|
});//]]>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue