quick search: dd acceleration

This commit is contained in:
doctogonzo 2015-05-06 09:58:34 +02:00
parent c442403882
commit ee3edfae7b
9 changed files with 55 additions and 16 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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>

View file

@ -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)

View file

@ -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>

View file

@ -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');
}
});
});//]]>