public SearchResult SearchRole(Sender sender, SearchRoleArgs args) { try { using (ObjectProxy op = new ObjectProxy()) { return(op.SearchRole(args)); } } catch (Exception ex) { PLogger.LogError(ex); throw ex; } }
/// <summary> /// List /// </summary> public void List() { using (ProxyBE p = new ProxyBE()) { try { SearchRoleArgs sargs = new SearchRoleArgs(); sargs.OrderBy = pagingParm.SortOrder; sargs.RowNumberFrom = pagingParm.RowNumberFrom; sargs.RowNumberTo = pagingParm.RowNumberTo; SearchResult sr = p.Client.SearchRole(SenderUser, sargs); Response.Write(JSONHelper.Dataset2Json(sr.DataSet)); } catch (Exception ex) { WriteError(ex.Message, ex); } } }