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,
|
||||
@Recursive bit,
|
||||
@ColType nvarchar(50) = '',
|
||||
@FullType nvarchar(50) = ''
|
||||
@FullType nvarchar(50) = '',
|
||||
@OnlyFind bit
|
||||
)
|
||||
AS
|
||||
|
||||
|
@ -10886,8 +10887,12 @@ DECLARE @Users TABLE
|
|||
UserID int
|
||||
)
|
||||
INSERT INTO @Users (UserID)
|
||||
SELECT
|
||||
U.UserID
|
||||
SELECT '
|
||||
|
||||
IF @OnlyFind = 1
|
||||
SET @sqlUsers = @sqlUsers + 'TOP ' + CAST(@MaximumRows AS varchar(12)) + ' '
|
||||
|
||||
SET @sqlUsers = @sqlUsers + 'U.UserID
|
||||
FROM UsersDetailed AS U
|
||||
WHERE
|
||||
U.UserID <> @UserID AND U.IsPeer = 0 AND
|
||||
|
@ -10937,8 +10942,12 @@ SET @sqlSpace = '
|
|||
ItemID int
|
||||
)
|
||||
INSERT INTO @ItemsService (ItemID)
|
||||
SELECT
|
||||
SI.ItemID
|
||||
SELECT '
|
||||
|
||||
IF @OnlyFind = 1
|
||||
SET @sqlSpace = @sqlSpace + 'TOP ' + CAST(@MaximumRows AS varchar(12)) + ' '
|
||||
|
||||
SET @sqlSpace = @sqlSpace + 'SI.ItemID
|
||||
FROM ServiceItems AS SI
|
||||
INNER JOIN Packages AS P ON P.PackageID = SI.PackageID
|
||||
INNER JOIN UsersDetailed AS U ON P.UserID = U.UserID
|
||||
|
|
|
@ -926,6 +926,22 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
});
|
||||
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
|
||||
|
||||
|
|
|
@ -141,7 +141,8 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
//TODO START
|
||||
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,
|
||||
ObjectQualifier + "GetSearchObject",
|
||||
|
@ -156,7 +157,8 @@ namespace WebsitePanel.EnterpriseServer
|
|||
new SqlParameter("@MaximumRows", maximumRows),
|
||||
new SqlParameter("@Recursive", recursive),
|
||||
new SqlParameter("@ColType", colType),
|
||||
new SqlParameter("@FullType", fullType));
|
||||
new SqlParameter("@FullType", fullType),
|
||||
new SqlParameter("@OnlyFind", onlyFind));
|
||||
}
|
||||
|
||||
//TODO END
|
||||
|
|
|
@ -319,10 +319,12 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
//TODO START
|
||||
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,
|
||||
filterColumn, filterValue, statusId, roleId, sortColumn, startRow, maximumRows, colType, fullType, false);
|
||||
filterColumn, filterValue, statusId, roleId, sortColumn, startRow,
|
||||
maximumRows, colType, fullType, false, onlyFind);
|
||||
}
|
||||
//TODO END
|
||||
|
||||
|
|
|
@ -140,7 +140,14 @@ namespace WebsitePanel.EnterpriseServer
|
|||
public DataSet GetSearchObject(int userId, string filterColumn, string filterValue,
|
||||
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
|
||||
|
||||
|
|
|
@ -5874,4 +5874,7 @@
|
|||
<data name="Error.SEND_USER_PASSWORD_RESET_SMS" xml:space="preserve">
|
||||
<value>Sms was not sent.</value>
|
||||
</data>
|
||||
<data name="SearchObject.NOT_FOUND" xml:space="preserve">
|
||||
<value>Not found</value>
|
||||
</data>
|
||||
</root>
|
|
@ -54,9 +54,8 @@ namespace WebsitePanel.WebPortal
|
|||
}
|
||||
else
|
||||
{
|
||||
DataSet dsObjectItems = ES.Services.Packages.GetSearchObject(PanelSecurity.EffectiveUserId, null,
|
||||
String.Format("%{0}%", filterValue),
|
||||
0, 0, "", 0, iNumResults, columnType, fullType);
|
||||
DataSet dsObjectItems = ES.Services.Packages.GetSearchObjectQuickFind(PanelSecurity.EffectiveUserId, null,
|
||||
String.Format("%{0}%", filterValue), 0, 0, "", iNumResults, columnType, fullType);
|
||||
DataTable dt = dsObjectItems.Tables[2];
|
||||
List<Dictionary<string, string>> dataList = new List<Dictionary<string, string>>();
|
||||
for (int i = 0; i < dt.Rows.Count; ++i)
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
AllowPaging="True" AllowSorting="True"
|
||||
CssSelectorClass="NormalGridView"
|
||||
DataSourceID="odsObjectsPaged" EnableViewState="False"
|
||||
EmptyDataText="gvObjects">
|
||||
EmptyDataText=<%# GetSharedLocalizedString("SearchObject.NOT_FOUND") %>>
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="gvType" SortExpression="ColumnType">
|
||||
<HeaderTemplate>
|
||||
|
|
|
@ -45,8 +45,9 @@
|
|||
$("#<%= tbObjectId.ClientID %>").val(item.code.ItemID);
|
||||
$("#<%= tbPackageId.ClientID %>").val(item.code.PackageID);
|
||||
$("#<%= tbAccountId.ClientID %>").val(item.code.AccountID);
|
||||
$("#<%= ImageButton1.ClientID %>").trigger("click");
|
||||
$("#<%= ImageButton1.ClientID %>").attr('disabled','disabled');
|
||||
var $ImgBtn = $("#<%= ImageButton1.ClientID %>");
|
||||
$ImgBtn.trigger("click");
|
||||
$ImgBtn.attr('disabled', 'disabled');
|
||||
}
|
||||
});
|
||||
});//]]>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue