Added a check to see if the current user has any packages in his account.
If not return an empty hashtable.
This commit is contained in:
parent
12725bbbf6
commit
9584fb2dd7
1 changed files with 8 additions and 6 deletions
|
@ -169,6 +169,7 @@ namespace WebsitePanel.Portal
|
|||
Hashtable ret = new Hashtable();
|
||||
|
||||
DataTable table = ES.Services.Packages.GetRawMyPackages(PanelSecurity.SelectedUserId).Tables[0];
|
||||
if(table.Rows.Count > 0) {
|
||||
System.Collections.Generic.IEnumerable<DataRow> dr = table.AsEnumerable().Skip(PackagesPerPage * index - PackagesPerPage).Take(PackagesPerPage);
|
||||
|
||||
DataSet set = new DataSet();
|
||||
|
@ -176,6 +177,7 @@ namespace WebsitePanel.Portal
|
|||
|
||||
ret.Add("DataSet", set);
|
||||
ret.Add("RowCount", table.Rows.Count);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue