This commit is contained in:
me 2015-04-29 17:53:02 +04:00
commit bc673d852c
15 changed files with 227 additions and 49 deletions

View file

@ -10733,7 +10733,8 @@ CREATE PROCEDURE [dbo].[GetSearchObject]
@StartRow int, @StartRow int,
@MaximumRows int = 0, @MaximumRows int = 0,
@Recursive bit, @Recursive bit,
@ColType nvarchar(50) = '' @ColType nvarchar(50) = '',
@FillType nvarchar(50) = ''
) )
AS AS
@ -10923,7 +10924,11 @@ IF @SortColumn <> '' AND @SortColumn IS NOT NULL
SET @sqlReturn = @sqlReturn + ' ORDER BY ' + @SortColumn + ' ' SET @sqlReturn = @sqlReturn + ' ORDER BY ' + @SortColumn + ' '
SET @sqlReturn = @sqlReturn + ' SET @sqlReturn = @sqlReturn + '
SELECT COUNT(ItemID) FROM @ItemsReturn; SELECT COUNT(ItemID) FROM @ItemsReturn;
SELECT DISTINCT(ColumnType) FROM @ItemsReturn; SELECT DISTINCT(ColumnType) FROM @ItemsReturn WHERE (1 = 1) ';
IF @FullType <> ''
SET @sqlReturn = @sqlReturn + ' AND FullType = ''' + @FullType + '''';
SET @sqlReturn = @sqlReturn + '; ';
SET @sqlReturn = @sqlReturn + '
SELECT ItemPosition, ItemID, TextSearch, ColumnType, FullType, PackageID SELECT ItemPosition, ItemID, TextSearch, ColumnType, FullType, PackageID
FROM @ItemsReturn AS IR WHERE (1 = 1) FROM @ItemsReturn AS IR WHERE (1 = 1)
' '
@ -10934,6 +10939,9 @@ SET @sqlReturn = @sqlReturn + ' AND IR.ItemPosition BETWEEN @StartRow AND @EndRo
IF @ColType <> '' IF @ColType <> ''
SET @sqlReturn = @sqlReturn + ' AND ColumnType in ( ' + @ColType + ' ) '; SET @sqlReturn = @sqlReturn + ' AND ColumnType in ( ' + @ColType + ' ) ';
IF @FullType <> ''
SET @sqlReturn = @sqlReturn + ' AND FullType = ''' + @FullType + '''';
exec sp_executesql @sqlReturn, N'@StartRow int, @MaximumRows int, @FilterValue nvarchar(50), @curSpaceValue cursor, @curUsersValue cursor', exec sp_executesql @sqlReturn, N'@StartRow int, @MaximumRows int, @FilterValue nvarchar(50), @curSpaceValue cursor, @curUsersValue cursor',
@StartRow, @MaximumRows, @FilterValue, @curSpace, @curUsers @StartRow, @MaximumRows, @FilterValue, @curSpace, @curUsers
@ -10942,3 +10950,4 @@ DEALLOCATE @curSpace
CLOSE @curUsers CLOSE @curUsers
DEALLOCATE @curUsers DEALLOCATE @curUsers
RETURN RETURN

View file

@ -910,7 +910,7 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/> /// <remarks/>
/// //TODO START /// //TODO START
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetSearchObject", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetSearchObject", 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 GetSearchObject(int userId, string filterColumn, string filterValue, int statusId, int roleId, string sortColumn, int startRow, int maximumRows, string colType) public System.Data.DataSet GetSearchObject(int userId, string filterColumn, string filterValue, int statusId, int roleId, string sortColumn, int startRow, int maximumRows, string colType, string fullType)
{ {
object[] results = this.Invoke("GetSearchObject", new object[] { object[] results = this.Invoke("GetSearchObject", new object[] {
userId, userId,
@ -921,7 +921,8 @@ namespace WebsitePanel.EnterpriseServer {
sortColumn, sortColumn,
startRow, startRow,
maximumRows, maximumRows,
colType colType,
fullType
}); });
return ((System.Data.DataSet)(results[0])); return ((System.Data.DataSet)(results[0]));
} }

View file

@ -141,7 +141,7 @@ 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, bool recursive) int statusId, int roleId, string sortColumn, int startRow, int maximumRows, string colType, string fullType, bool recursive)
{ {
return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure,
ObjectQualifier + "GetSearchObject", ObjectQualifier + "GetSearchObject",
@ -155,7 +155,8 @@ namespace WebsitePanel.EnterpriseServer
new SqlParameter("@startRow", startRow), new SqlParameter("@startRow", startRow),
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));
} }
//TODO END //TODO END

View file

@ -319,10 +319,10 @@ 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) int statusId, int roleId, string sortColumn, int startRow, int maximumRows, string colType, string fullType)
{ {
return DataProvider.GetSearchObject(SecurityContext.User.UserId, userId, return DataProvider.GetSearchObject(SecurityContext.User.UserId, userId,
filterColumn, filterValue, statusId, roleId, sortColumn, startRow, maximumRows, colType, false); filterColumn, filterValue, statusId, roleId, sortColumn, startRow, maximumRows, colType, fullType, false);
} }
//TODO END //TODO END

View file

@ -138,9 +138,9 @@ namespace WebsitePanel.EnterpriseServer
[WebMethod] [WebMethod]
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) 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); return PackageController.GetSearchObject(userId, filterColumn, filterValue, statusId, roleId, sortColumn, startRow, maximumRows, colType, fullType);
} }
//TODO END //TODO END

View file

@ -32,6 +32,8 @@ namespace WebsitePanel.WebPortal
Dictionary<string, string> obj = new Dictionary<string, string>(); Dictionary<string, string> obj = new Dictionary<string, string>();
obj["ColumnType"] = "PackageName"; obj["ColumnType"] = "PackageName";
obj["TextSearch"] = row["PackageName"].ToString(); obj["TextSearch"] = row["PackageName"].ToString();
obj["ItemID"] = row["ItemID"].ToString();
obj["PackageID"] = row["PackageID"].ToString();
obj["FullType"] = "Space"; obj["FullType"] = "Space";
dataList.Add(obj); dataList.Add(obj);
} }
@ -45,17 +47,22 @@ 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); 0, 0, "", 0, 100, 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];
Dictionary<string, string> obj = new Dictionary<string, string>(); if ((fullType == null) || (fullType.Length == 0) || (fullType == row["FullType"].ToString()))
obj["ColumnType"] = row["ColumnType"].ToString(); {
obj["TextSearch"] = row["TextSearch"].ToString(); Dictionary<string, string> obj = new Dictionary<string, string>();
obj["FullType"] = row["FullType"].ToString(); obj["ColumnType"] = row["ColumnType"].ToString();
dataList.Add(obj); obj["TextSearch"] = row["TextSearch"].ToString();
obj["ItemID"] = row["ItemID"].ToString();
obj["PackageID"] = row["PackageID"].ToString();
obj["FullType"] = row["FullType"].ToString();
dataList.Add(obj);
}
} }
var jsonSerialiser = new JavaScriptSerializer(); var jsonSerialiser = new JavaScriptSerializer();

View file

@ -250,25 +250,25 @@ namespace WebsitePanel.Portal
#region Service Items Paged Search #region Service Items Paged Search
DataSet dsObjectItemsPaged; DataSet dsObjectItemsPaged;
public int SearchObjectItemsPagedCount(string filterColumn, string filterValue, string colType) public int SearchObjectItemsPagedCount(string filterColumn, string filterValue, string fullType, string colType)
{ {
return (int)dsObjectItemsPaged.Tables[0].Rows[0][0]; return (int)dsObjectItemsPaged.Tables[0].Rows[0][0];
} }
public DataTable SearchObjectItemsPaged(int maximumRows, int startRowIndex, string sortColumn, public DataTable SearchObjectItemsPaged(int maximumRows, int startRowIndex, string sortColumn,
string filterColumn, string filterValue, string colType) string filterColumn, string filterValue, string colType, string fullType)
{ {
dsObjectItemsPaged = ES.Services.Packages.GetSearchObject(PanelSecurity.EffectiveUserId, filterColumn, dsObjectItemsPaged = ES.Services.Packages.GetSearchObject(PanelSecurity.EffectiveUserId, filterColumn,
String.Format("%{0}%", filterValue), String.Format("%{0}%", filterValue),
0, 0, sortColumn, startRowIndex, maximumRows, colType); 0, 0, sortColumn, startRowIndex, maximumRows, colType, fullType);
return dsObjectItemsPaged.Tables[2]; return dsObjectItemsPaged.Tables[2];
} }
public DataTable SearchObjectTypes(string filterColumn, string filterValue, string sortColumn) public DataTable SearchObjectTypes(string filterColumn, string filterValue, string fullType, string sortColumn)
{ {
dsObjectItemsPaged = ES.Services.Packages.GetSearchObject(PanelSecurity.EffectiveUserId, filterColumn, dsObjectItemsPaged = ES.Services.Packages.GetSearchObject(PanelSecurity.EffectiveUserId, filterColumn,
String.Format("%{0}%", filterValue), String.Format("%{0}%", filterValue),
0, 0, sortColumn, 0, 0, ""); 0, 0, sortColumn, 0, 0, "",fullType);
return dsObjectItemsPaged.Tables[1]; return dsObjectItemsPaged.Tables[1];
} }
//TODO END //TODO END

View file

@ -91,6 +91,7 @@
<SelectParameters> <SelectParameters>
<asp:QueryStringParameter Name="filterColumn" QueryStringField="Criteria" /> <asp:QueryStringParameter Name="filterColumn" QueryStringField="Criteria" />
<asp:QueryStringParameter Name="filterValue" QueryStringField="Query" /> <asp:QueryStringParameter Name="filterValue" QueryStringField="Query" />
<asp:QueryStringParameter Name="fullType" QueryStringField="FullType" />
</SelectParameters> </SelectParameters>
</asp:ObjectDataSource> </asp:ObjectDataSource>
@ -99,6 +100,7 @@
<SelectParameters> <SelectParameters>
<asp:QueryStringParameter Name="filterColumn" QueryStringField="Criteria" /> <asp:QueryStringParameter Name="filterColumn" QueryStringField="Criteria" />
<asp:QueryStringParameter Name="filterValue" QueryStringField="Query" /> <asp:QueryStringParameter Name="filterValue" QueryStringField="Query" />
<asp:QueryStringParameter Name="fullType" QueryStringField="FullType" />
</SelectParameters> </SelectParameters>
</asp:ObjectDataSource> </asp:ObjectDataSource>

View file

@ -6,6 +6,14 @@
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[
$("#<%= tbSearch.ClientID %>").keypress(function (e) {
if (e.keyCode != 13) { // VK_RETURN
$("#<%= tbSearchText.ClientID %>").val('');
$("#<%= tbObjectId.ClientID %>").val('');
$("#<%= tbPackageId.ClientID %>").val('');
}
});
$(document).ready(function () { $(document).ready(function () {
$("#<%= tbSearch.ClientID %>").autocomplete({ $("#<%= tbSearch.ClientID %>").autocomplete({
zIndex: 100, zIndex: 100,
@ -33,12 +41,15 @@
$("#<%= tbSearchColumnType.ClientID %>").val(item.code.ColumnType); $("#<%= tbSearchColumnType.ClientID %>").val(item.code.ColumnType);
$("#<%= tbSearchFullType.ClientID %>").val(item.code.FullType); $("#<%= tbSearchFullType.ClientID %>").val(item.code.FullType);
$("#<%= tbSearchText.ClientID %>").val(item.code.TextSearch); $("#<%= tbSearchText.ClientID %>").val(item.code.TextSearch);
$("#<%= tbObjectId.ClientID %>").val(item.code.ItemID);
$("#<%= tbPackageId.ClientID %>").val(item.code.PackageID);
$("#<%= ImageButton1.ClientID %>").trigger("click");
} }
}); });
});//]]> });//]]>
</script> </script>
<asp:UpdatePanel runat="server" ID="updatePanelUsers" UpdateMode="Conditional" ChildrenAsTriggers="true"> <asp:Panel runat="server" ID="updatePanelUsers" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate> <ContentTemplate>
<table cellpadding="0" cellspacing="0" align="right"> <table cellpadding="0" cellspacing="0" align="right">
<tr> <tr>
@ -70,6 +81,18 @@
type="hidden" type="hidden"
> >
</asp:TextBox> </asp:TextBox>
<asp:TextBox
ID="tbObjectId"
runat="server"
type="hidden"
>
</asp:TextBox>
<asp:TextBox
ID="tbPackageId"
runat="server"
type="hidden"
>
</asp:TextBox>
<asp:ImageButton <asp:ImageButton
ID="ImageButton1" ID="ImageButton1"
@ -84,4 +107,4 @@
</tr> </tr>
</table> </table>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:Panel>

View file

@ -44,6 +44,13 @@ namespace WebsitePanel.Portal.SkinControls
{ {
public partial class GlobalSearch : WebsitePanelControlBase public partial class GlobalSearch : WebsitePanelControlBase
{ {
const string TYPE_WEBSITE = "WebSite";
const string TYPE_DOMAIN = "Domain";
const string TYPE_ORGANIZATION = "Organization";
const string PID_SPACE_WEBSITES = "SpaceWebSites";
const string PID_SPACE_DIMAINS = "SpaceDomains";
const string PID_SPACE_EXCHANGESERVER = "SpaceExchangeServer";
class Tab class Tab
{ {
int index; int index;
@ -115,6 +122,41 @@ namespace WebsitePanel.Portal.SkinControls
"ItemTypeID=" + ddlItemType.SelectedValue)); */ "ItemTypeID=" + ddlItemType.SelectedValue)); */
} }
public string GetItemPageUrl(string fullType, string itemType, int itemId, int spaceId)
{
string res = "";
if (fullType.Equals("Users"))
{
res = PortalUtils.GetUserHomePageUrl(itemId);
}
else
{
switch (itemType)
{
case TYPE_WEBSITE:
res = PortalUtils.NavigatePageURL(PID_SPACE_WEBSITES, "ItemID", itemId.ToString(),
PortalUtils.SPACE_ID_PARAM + "=" + spaceId, "ctl=edit_item",
"moduleDefId=websites");
break;
case TYPE_DOMAIN:
res = PortalUtils.NavigatePageURL(PID_SPACE_DIMAINS, "DomainID", itemId.ToString(),
PortalUtils.SPACE_ID_PARAM + "=" + spaceId, "ctl=edit_item",
"moduleDefId=domains");
break;
case TYPE_ORGANIZATION:
res = PortalUtils.NavigatePageURL(PID_SPACE_EXCHANGESERVER, "ItemID", itemId.ToString(),
PortalUtils.SPACE_ID_PARAM + "=" + spaceId, "ctl=edit_item",
"moduleDefId=ExchangeServer");
break;
default:
res = PortalUtils.GetSpaceHomePageUrl(itemId);
break;
}
}
return res;
}
//TODO START //TODO START
protected void btnSearchObject_Click(object sender, EventArgs e) protected void btnSearchObject_Click(object sender, EventArgs e)
{ {
@ -125,25 +167,46 @@ namespace WebsitePanel.Portal.SkinControls
{ {
if (strFullType == "Users") if (strFullType == "Users")
{ {
Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetUsersSearchPageId(), if (tbObjectId.Text.Length > 0)
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(), {
"Query=" + Server.UrlEncode(strText), Response.Redirect(PortalUtils.GetUserHomePageUrl(Int32.Parse(tbObjectId.Text)));
"Criteria=" + Server.UrlEncode(strColumnType) }
)); else
{
Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetUsersSearchPageId(),
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
"Query=" + Server.UrlEncode(strText),
"Criteria=" + Server.UrlEncode(strColumnType)
));
}
} }
else if (strFullType == "Space") else if (strFullType == "Space")
{ {
Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetSpacesSearchPageId(), if (tbObjectId.Text.Length > 0)
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(), {
"Query=" + Server.UrlEncode(strText), Response.Redirect(GetItemPageUrl(strFullType,tbSearchColumnType.Text,Int32.Parse(tbObjectId.Text),Int32.Parse(tbPackageId.Text)));
"Criteria=" + Server.UrlEncode(strColumnType) }
)); else
{
Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetSpacesSearchPageId(),
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
"Query=" + Server.UrlEncode(strText),
"Criteria=" + Server.UrlEncode(strColumnType)
));
}
} }
else else
{ {
Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetObjectSearchPageId(), if (tbObjectId.Text.Length > 0)
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(), {
"Query=" + Server.UrlEncode(strText))); Response.Redirect(GetItemPageUrl(strFullType, tbSearchColumnType.Text, Int32.Parse(tbObjectId.Text), Int32.Parse(tbPackageId.Text)));
}
else
{
Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetObjectSearchPageId(),
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
"Query=" + Server.UrlEncode(strText)));
}
} }
} }
else else

View file

@ -19,7 +19,7 @@ namespace WebsitePanel.Portal.SkinControls {
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.UpdatePanel updatePanelUsers; protected global::System.Web.UI.WebControls.Panel updatePanelUsers;
/// <summary> /// <summary>
/// tbSearch control. /// tbSearch control.
@ -57,6 +57,24 @@ namespace WebsitePanel.Portal.SkinControls {
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.TextBox tbSearchText; protected global::System.Web.UI.WebControls.TextBox tbSearchText;
/// <summary>
/// tbObjectId control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox tbObjectId;
/// <summary>
/// tbPackageId control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox tbPackageId;
/// <summary> /// <summary>
/// ImageButton1 control. /// ImageButton1 control.
/// </summary> /// </summary>

View file

@ -3,8 +3,12 @@
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[
$(document).ready(function () { $(document).ready(function () {
$("#tbSearch").keypress(function () { $("#tbSearch").keypress(function (e) {
$("#tbSearchText").val(''); if (e.keyCode != 13) { // VK_RETURN
$("#tbSearchText").val('');
$("#tbObjectId").val('');
$("#tbPackageId").val('');
}
}); });
$("#tbSearch").autocomplete({ $("#tbSearch").autocomplete({
@ -15,14 +19,14 @@
dataType: "json", dataType: "json",
data: { data: {
term: request.term, term: request.term,
fullType: '', fullType: 'Users'
columnType: "'" + $("#ddlFilterColumn").val() + "'" // columnType: "'" + $("#ddlFilterColumn").val() + "'"
}, },
url: "AjaxHandler.ashx", url: "AjaxHandler.ashx",
success: function (data) { success: function (data) {
response($.map(data, function (item) { response($.map(data, function (item) {
return { return {
label: item.TextSearch, label: item.TextSearch + " [" + item.ColumnType + "]",
code: item code: item
}; };
})); }));
@ -34,6 +38,9 @@
$("#ddlFilterColumn").val(item.code.ColumnType); $("#ddlFilterColumn").val(item.code.ColumnType);
$("#tbSearchFullType").val(item.code.FullType); $("#tbSearchFullType").val(item.code.FullType);
$("#tbSearchText").val(item.code.TextSearch); $("#tbSearchText").val(item.code.TextSearch);
$("#tbObjectId").val(item.code.ItemID);
$("#tbPackageId").val(item.code.PackageID);
$("#<%= cmdSearch.ClientID %>").trigger("click");
} }
}); });
});//]]> });//]]>
@ -45,7 +52,7 @@
<table> <table>
<tr> <tr>
<td> <td>
<asp:DropDownList ClientIDMode="Static" ID="ddlFilterColumn" runat="server" CssClass="NormalTextBox" resourcekey="ddlFilterColumn"> <asp:DropDownList ClientIDMode="Static" ID="ddlFilterColumn" runat="server" CssClass="NormalTextBox" resourcekey="ddlFilterColumn" style="display:none">
</asp:DropDownList> </asp:DropDownList>
</td> </td>
<td> <td>
@ -76,7 +83,20 @@
type="hidden" type="hidden"
> >
</asp:TextBox> </asp:TextBox>
<asp:TextBox
ID="tbObjectId"
ClientIDMode="Static"
runat="server"
type="hidden"
>
</asp:TextBox>
<asp:TextBox
ID="tbPackageId"
ClientIDMode="Static"
runat="server"
type="hidden"
>
</asp:TextBox>
<asp:ImageButton <asp:ImageButton
ID="cmdSearch" ID="cmdSearch"
runat="server" runat="server"

View file

@ -98,10 +98,27 @@ namespace WebsitePanel.Portal
protected void cmdSearch_Click(object sender, ImageClickEventArgs e) protected void cmdSearch_Click(object sender, ImageClickEventArgs e)
{ {
Response.Redirect(NavigatePageURL(PortalUtils.GetUserCustomersPageId(), if (tbObjectId.Text.Length > 0)
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(), {
"FilterColumn=" + ddlFilterColumn.SelectedValue, Response.Redirect(PortalUtils.GetUserHomePageUrl(Int32.Parse(tbObjectId.Text)));
"FilterValue=" + Server.UrlEncode(FilterValue))); }
else
{
String strText = tbSearchText.Text;
if (strText.Length > 0)
{
Response.Redirect(NavigatePageURL(PortalUtils.GetUserCustomersPageId(),
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
"FilterColumn=" + ddlFilterColumn.SelectedValue,
"FilterValue=" + Server.UrlEncode(FilterValue)));
}
else
{
Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetObjectSearchPageId(),
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
"Query=" + Server.UrlEncode(tbSearch.Text),"FullType=Users"));
}
}
} }
} }
} }

View file

@ -66,6 +66,24 @@ namespace WebsitePanel.Portal {
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.TextBox tbSearchText; protected global::System.Web.UI.WebControls.TextBox tbSearchText;
/// <summary>
/// tbObjectId control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox tbObjectId;
/// <summary>
/// tbPackageId control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox tbPackageId;
/// <summary> /// <summary>
/// cmdSearch control. /// cmdSearch control.
/// </summary> /// </summary>

View file

@ -4898,7 +4898,6 @@
<Content Include="ProviderControls\HyperV2012R2_Settings.ascx" /> <Content Include="ProviderControls\HyperV2012R2_Settings.ascx" />
<Content Include="SearchObject.ascx" /> <Content Include="SearchObject.ascx" />
<Content Include="ScheduleTaskControls\UserPasswordExpirationNotificationView.ascx" /> <Content Include="ScheduleTaskControls\UserPasswordExpirationNotificationView.ascx" />
<Content Include="SearchObject.ascx" />
<Content Include="SettingsUserPasswordExpirationLetter.ascx" /> <Content Include="SettingsUserPasswordExpirationLetter.ascx" />
<Content Include="SettingsUserPasswordResetLetter.ascx" /> <Content Include="SettingsUserPasswordResetLetter.ascx" />
<Content Include="VPS2012\RemoteDesktop\Connect.aspx" /> <Content Include="VPS2012\RemoteDesktop\Connect.aspx" />